| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation |
| 5 | */ |
| 6 | |
| 7 | #ifndef BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H |
| 8 | #define BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H |
| 9 | |
| 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 | |
| 58 | extern bt_ctf_bool bt_ctf_clock_class_is_absolute( |
| 59 | struct bt_ctf_clock_class *clock_class); |
| 60 | |
| 61 | extern int bt_ctf_clock_class_set_is_absolute( |
| 62 | struct bt_ctf_clock_class *clock_class, bt_ctf_bool is_absolute); |
| 63 | |
| 64 | extern const uint8_t *bt_ctf_clock_class_get_uuid( |
| 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, |
| 68 | const uint8_t *uuid); |
| 69 | #ifdef __cplusplus |
| 70 | } |
| 71 | #endif |
| 72 | |
| 73 | #endif /* BABELTRACE2_CTF_WRITER_CLOCK_CLASS_H */ |