summaryrefslogtreecommitdiff
path: root/package/gentoo
AgeCommit message (Expand)Author
2020-04-15licenses: Add SPDX headers to Gentoo ebuildLaurent Pinchart
2019-10-05libcamera: controls: Auto-generate control_ids.h and control_ids.cppLaurent Pinchart
2019-05-02package: gentoo: Add libcamera ebuildJacopo Mondi
23 24 25 26 27 28 29 30 31 32 33 34
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) 2024, Ideas on Board Oy
 *
 * Anonymous file creation
 */

#pragma once

#include <stddef.h>

#include <libcamera/base/flags.h>
#include <libcamera/base/unique_fd.h>

namespace libcamera {

class MemFd
{
public:
	enum class Seal {
		None = 0,
		Shrink = (1 << 0),
		Grow = (1 << 1),
	};

	using Seals = Flags<Seal>;

	static UniqueFD create(const char *name, std::size_t size,
			       Seals seals = Seal::None);
};

LIBCAMERA_FLAGS_ENABLE_OPERATORS(MemFd::Seal)

} /* namespace libcamera */