cpp-common: remove unused include
[babeltrace.git] / src / lib / property.h
... / ...
CommitLineData
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (c) 2018 Philippe Proulx <pproulx@efficios.com>
5 */
6
7#ifndef BABELTRACE_PROPERTY_INTERNAL_H
8#define BABELTRACE_PROPERTY_INTERNAL_H
9
10#include "common/assert.h"
11#include <babeltrace2/babeltrace.h>
12#include <glib.h>
13#include <stdint.h>
14
15struct bt_property {
16 enum bt_property_availability avail;
17};
18
19struct bt_property_uint {
20 struct bt_property base;
21 uint64_t value;
22};
23
24static inline
25void bt_property_uint_set(struct bt_property_uint *prop, uint64_t value)
26{
27 BT_ASSERT(prop);
28 prop->base.avail = BT_PROPERTY_AVAILABILITY_AVAILABLE;
29 prop->value = value;
30}
31
32static inline
33void bt_property_uint_init(struct bt_property_uint *prop,
34 enum bt_property_availability avail, uint64_t value)
35{
36 BT_ASSERT(prop);
37 prop->base.avail = avail;
38 prop->value = value;
39}
40
41#endif /* BABELTRACE_PROPERTY_INTERNAL_H */
This page took 0.022995 seconds and 4 git commands to generate.