#include <babeltrace/ctf/metadata.h>
#include <glib.h>
+#include "events-private.h"
+
/*
* thread local storage to store the last error that occured
* while reading a field, this variable must be accessed by
return NULL;
}
-enum ctf_type_id bt_ctf_field_type(struct definition *def)
+enum ctf_type_id bt_ctf_field_type(const struct definition *def)
{
if (def)
return def->declaration->id;
return -1;
}
+uint64_t bt_ctf_get_timestamp_raw(struct bt_ctf_event *event)
+{
+ if (event && event->stream->has_timestamp)
+ return ctf_get_timestamp_raw(event->stream,
+ event->stream->timestamp);
+ else
+ return -1ULL;
+}
+
uint64_t bt_ctf_get_timestamp(struct bt_ctf_event *event)
{
if (event && event->stream->has_timestamp)
- return event->stream->timestamp;
+ return ctf_get_timestamp(event->stream,
+ event->stream->timestamp);
else
- return 0;
+ return -1ULL;
}
static void bt_ctf_field_set_error(int error)
return ret;
}
-uint64_t bt_ctf_get_uint64(struct definition *field)
+uint64_t bt_ctf_get_uint64(const struct definition *field)
{
unsigned int ret = 0;
return ret;
}
-int64_t bt_ctf_get_int64(struct definition *field)
+int64_t bt_ctf_get_int64(const struct definition *field)
{
int ret = 0;
}
-char *bt_ctf_get_char_array(struct definition *field)
+char *bt_ctf_get_char_array(const struct definition *field)
{
char *ret = NULL;
return ret;
}
-char *bt_ctf_get_string(struct definition *field)
+char *bt_ctf_get_string(const struct definition *field)
{
char *ret = NULL;