Commit | Line | Data |
---|---|---|
ec4644dd | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
ec4644dd | 3 | * |
0235b0db | 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
ec4644dd FD |
5 | */ |
6 | ||
0235b0db MJ |
7 | #ifndef BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H |
8 | #define BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H | |
9 | ||
ec4644dd FD |
10 | #include <stdint.h> |
11 | ||
12 | #ifdef __cplusplus | |
13 | extern "C" { | |
14 | #endif | |
15 | ||
16 | struct bt_ctf_clock_class; | |
17 | ||
18 | extern struct bt_ctf_clock_class *bt_ctf_clock_class_create(const char *name, | |
19 | uint64_t freq); | |
20 | ||
21 | extern const char *bt_ctf_clock_class_get_name( | |
22 | struct bt_ctf_clock_class *clock_class); | |
23 | ||
24 | extern int bt_ctf_clock_class_set_name(struct bt_ctf_clock_class *clock_class, | |
25 | const char *name); | |
26 | ||
27 | extern const char *bt_ctf_clock_class_get_description( | |
28 | struct bt_ctf_clock_class *clock_class); | |
29 | ||
30 | extern int bt_ctf_clock_class_set_description( | |
31 | struct bt_ctf_clock_class *clock_class, | |
32 | const char *desc); | |
33 | ||
34 | extern uint64_t bt_ctf_clock_class_get_frequency( | |
35 | struct bt_ctf_clock_class *clock_class); | |
36 | ||
37 | extern int bt_ctf_clock_class_set_frequency( | |
38 | struct bt_ctf_clock_class *clock_class, uint64_t freq); | |
39 | ||
40 | extern uint64_t bt_ctf_clock_class_get_precision( | |
41 | struct bt_ctf_clock_class *clock_class); | |
42 | ||
43 | extern int bt_ctf_clock_class_set_precision( | |
44 | struct bt_ctf_clock_class *clock_class, uint64_t precision); | |
45 | ||
46 | extern int bt_ctf_clock_class_get_offset_s( | |
47 | struct bt_ctf_clock_class *clock_class, int64_t *seconds); | |
48 | ||
49 | extern int bt_ctf_clock_class_set_offset_s( | |
50 | struct bt_ctf_clock_class *clock_class, int64_t seconds); | |
51 | ||
52 | extern int bt_ctf_clock_class_get_offset_cycles( | |
53 | struct bt_ctf_clock_class *clock_class, int64_t *cycles); | |
54 | ||
55 | extern int bt_ctf_clock_class_set_offset_cycles( | |
56 | struct bt_ctf_clock_class *clock_class, int64_t cycles); | |
57 | ||
00409097 | 58 | extern bt_ctf_bool bt_ctf_clock_class_is_absolute( |
ec4644dd FD |
59 | struct bt_ctf_clock_class *clock_class); |
60 | ||
61 | extern int bt_ctf_clock_class_set_is_absolute( | |
00409097 | 62 | struct bt_ctf_clock_class *clock_class, bt_ctf_bool is_absolute); |
ec4644dd | 63 | |
6162e6b7 | 64 | extern const uint8_t *bt_ctf_clock_class_get_uuid( |
ec4644dd FD |
65 | struct bt_ctf_clock_class *clock_class); |
66 | ||
67 | extern int bt_ctf_clock_class_set_uuid(struct bt_ctf_clock_class *clock_class, | |
6162e6b7 | 68 | const uint8_t *uuid); |
ec4644dd FD |
69 | #ifdef __cplusplus |
70 | } | |
71 | #endif | |
72 | ||
924dc299 | 73 | #endif /* BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H */ |