X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fctf-ir%2Fclock-internal.h;h=7428126e42c62cfcedb76dfbeb685314595c8f79;hb=4841ccc167f5f99267a0c129a1e79214b60f553c;hp=89c271d3cb58bb42936192e26bdad3ac76198c05;hpb=bc37ae52aa6face901440bf7eb2171104b5343d8;p=babeltrace.git diff --git a/include/babeltrace/ctf-ir/clock-internal.h b/include/babeltrace/ctf-ir/clock-internal.h index 89c271d3..7428126e 100644 --- a/include/babeltrace/ctf-ir/clock-internal.h +++ b/include/babeltrace/ctf-ir/clock-internal.h @@ -27,15 +27,15 @@ * SOFTWARE. */ -#include #include #include +#include #include #include -#include +#include struct bt_ctf_clock { - struct bt_ctf_ref ref_count; + struct bt_ctf_base base; GString *name; GString *description; uint64_t frequency; @@ -44,6 +44,7 @@ struct bt_ctf_clock { uint64_t offset; /* Offset in ticks */ uint64_t time; /* Current clock value */ uuid_t uuid; + int uuid_set; int absolute; /* * A clock's properties can't be modified once it is added to a stream @@ -52,6 +53,24 @@ struct bt_ctf_clock { int frozen; }; +/* + * This is not part of the public API to prevent users from creating clocks + * in an invalid state (being nameless, in this case). + * + * The only legitimate use-case for this function is to allocate a clock + * while the TSDL metadata is being parsed. + */ +BT_HIDDEN +struct bt_ctf_clock *_bt_ctf_clock_create(void); + +/* + * Not exposed as part of the public API since the only usecase + * for this is when we are creating clocks from the TSDL metadata. + */ +BT_HIDDEN +int bt_ctf_clock_set_name(struct bt_ctf_clock *clock, + const char *name); + BT_HIDDEN void bt_ctf_clock_freeze(struct bt_ctf_clock *clock);