static
int find_update_struct_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class);
+ const struct bt_clock_class *writer_clock_class);
static
int find_update_array_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class);
+ const struct bt_clock_class *writer_clock_class);
static
int find_update_enum_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class);
+ const struct bt_clock_class *writer_clock_class);
static
int find_update_sequence_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class);
+ const struct bt_clock_class *writer_clock_class);
static
int find_update_variant_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class);
+ const struct bt_clock_class *writer_clock_class);
static
int copy_find_clock_int_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field);
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field);
static
int copy_find_clock_struct_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field);
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field);
static
int copy_find_clock_array_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field);
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field);
static
int copy_find_clock_sequence_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field);
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field);
static
-int copy_find_clock_variant_field(FILE *err, struct bt_event *event,
- struct bt_event *writer_event, struct bt_field *field,
- struct bt_field_type *type, struct bt_field *copy_field);
+int copy_find_clock_variant_field(FILE *err, const struct bt_event *event,
+ const struct bt_event *writer_event, const struct bt_field *field,
+ struct bt_field_type *type, const struct bt_field *copy_field);
static
-int copy_find_clock_enum_field(FILE *err, struct bt_event *event,
- struct bt_event *writer_event, struct bt_field *field,
- struct bt_field_type *type, struct bt_field *copy_field);
+int copy_find_clock_enum_field(FILE *err, const struct bt_event *event,
+ const struct bt_event *writer_event, const struct bt_field *field,
+ struct bt_field_type *type, const struct bt_field *copy_field);
static
int update_header_clock_int_field_type(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
- struct bt_clock_class *clock = NULL;
+ const struct bt_clock_class *clock = NULL;
int ret;
clock = bt_field_type_integer_get_mapped_clock_class(type);
static
int find_update_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int ret;
static
int find_update_variant_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int count, i, ret;
struct bt_field_type *entry_type = NULL;
static
int find_update_struct_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int count, i, ret;
struct bt_field_type *entry_type = NULL;
static
int find_update_sequence_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int ret;
struct bt_field_type *entry_type = NULL;
static
int find_update_array_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int ret = 0;
struct bt_field_type *entry_type = NULL;
static
int find_update_enum_clock_fields(FILE *err, struct bt_field_type *type,
- struct bt_clock_class *writer_clock_class)
+ const struct bt_clock_class *writer_clock_class)
{
int ret;
struct bt_field_type *entry_type = NULL;
BT_HIDDEN
struct bt_field_type *override_header_type(FILE *err,
struct bt_field_type *type,
- struct bt_trace *writer_trace)
+ const struct bt_trace *writer_trace)
{
struct bt_field_type *new_type = NULL;
- struct bt_clock_class *writer_clock_class = NULL;
+ const struct bt_clock_class *writer_clock_class = NULL;
int ret;
/* FIXME multi-clock? */
}
static
-int copy_float_field(FILE *err, struct bt_field *field,
+int copy_float_field(FILE *err, const struct bt_field *field,
struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_field *copy_field)
{
double value;
int ret;
}
static
-int copy_string_field(FILE *err, struct bt_field *field,
+int copy_string_field(FILE *err, const struct bt_field *field,
struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_field *copy_field)
{
const char *value;
int ret;
}
BT_HIDDEN
-int copy_override_field(FILE *err, struct bt_event *event,
- struct bt_event *writer_event, struct bt_field *field,
- struct bt_field *copy_field)
+int copy_override_field(FILE *err, const struct bt_event *event,
+ const struct bt_event *writer_event, const struct bt_field *field,
+ const struct bt_field *copy_field)
{
struct bt_field_type *type = NULL;
int ret = 0;
}
static
-int copy_find_clock_enum_field(FILE *err, struct bt_event *event,
- struct bt_event *writer_event, struct bt_field *field,
- struct bt_field_type *type, struct bt_field *copy_field)
+int copy_find_clock_enum_field(FILE *err, const struct bt_event *event,
+ const struct bt_event *writer_event, const struct bt_field *field,
+ struct bt_field_type *type, const struct bt_field *copy_field)
{
int ret;
- struct bt_field *container = NULL, *copy_container = NULL;
+ const struct bt_field *container = NULL, *copy_container = NULL;
container = bt_field_enumeration_get_container(field);
BT_ASSERT(container);
}
static
-int copy_find_clock_variant_field(FILE *err, struct bt_event *event,
- struct bt_event *writer_event, struct bt_field *field,
- struct bt_field_type *type, struct bt_field *copy_field)
+int copy_find_clock_variant_field(FILE *err, const struct bt_event *event,
+ const struct bt_event *writer_event, const struct bt_field *field,
+ struct bt_field_type *type, const struct bt_field *copy_field)
{
int ret;
- struct bt_field *tag = NULL;
- struct bt_field *variant_field = NULL, *copy_variant_field = NULL;
+ const struct bt_field *tag = NULL;
+ const struct bt_field *variant_field = NULL, *copy_variant_field = NULL;
tag = bt_field_variant_get_tag(field);
BT_ASSERT(tag);
static
int copy_find_clock_sequence_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field)
{
int ret;
uint64_t i, count;
- struct bt_field *length_field = NULL;
- struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ const struct bt_field *length_field = NULL;
+ const struct bt_field *entry_field = NULL, *entry_copy = NULL;
length_field = bt_field_sequence_get_length(field);
BT_ASSERT(length_field);
static
int copy_find_clock_array_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field)
{
int ret, count, i;
- struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ const struct bt_field *entry_field = NULL, *entry_copy = NULL;
count = bt_field_type_array_get_length(type);
for (i = 0; i < count; i++) {
static
int copy_find_clock_struct_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field)
{
int count, i, ret;
struct bt_field_type *entry_type = NULL;
- struct bt_field *entry_field = NULL, *entry_copy = NULL;
+ const struct bt_field *entry_field = NULL, *entry_copy = NULL;
count = bt_field_type_structure_get_field_count(type);
for (i = 0; i < count; i++) {
}
static
-int set_int_value(FILE *err, struct bt_field *field,
- struct bt_field *copy_field,
+int set_int_value(FILE *err, const struct bt_field *field,
+ const struct bt_field *copy_field,
struct bt_field_type *type)
{
uint64_t uvalue;
return ret;
}
-struct bt_clock_class *stream_class_get_clock_class(FILE *err,
- struct bt_stream_class *stream_class)
+const struct bt_clock_class *stream_class_get_clock_class(FILE *err,
+ const struct bt_stream_class *stream_class)
{
- struct bt_trace *trace = NULL;
- struct bt_clock_class *clock_class = NULL;
+ const struct bt_trace *trace = NULL;
+ const struct bt_clock_class *clock_class = NULL;
trace = bt_stream_class_get_trace(stream_class);
BT_ASSERT(trace);
return clock_class;
}
-struct bt_clock_class *event_get_clock_class(FILE *err, struct bt_event *event)
+const struct bt_clock_class *event_get_clock_class(FILE *err, const struct bt_event *event)
{
- struct bt_event_class *event_class = NULL;
- struct bt_stream_class *stream_class = NULL;
- struct bt_clock_class *clock_class = NULL;
+ const struct bt_event_class *event_class = NULL;
+ const struct bt_stream_class *stream_class = NULL;
+ const struct bt_clock_class *clock_class = NULL;
event_class = bt_event_get_class(event);
BT_ASSERT(event_class);
static
int copy_find_clock_int_field(FILE *err,
- struct bt_event *event, struct bt_event *writer_event,
- struct bt_field *field, struct bt_field_type *type,
- struct bt_field *copy_field)
+ const struct bt_event *event, const struct bt_event *writer_event,
+ const struct bt_field *field, struct bt_field_type *type,
+ const struct bt_field *copy_field)
{
- struct bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
+ const struct bt_clock_class *clock_class = NULL, *writer_clock_class = NULL;
struct bt_clock_value *clock_value = NULL, *writer_clock_value = NULL;
uint64_t value;
int ret;