Namespace struct stream_pos
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 15 Feb 2013 19:18:47 +0000 (14:18 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Feb 2013 19:18:47 +0000 (14:18 -0500)
This struct is exposed by the API, so we need to namespace it.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
30 files changed:
converter/babeltrace.c
formats/bt-dummy/bt-dummy.c
formats/ctf-text/ctf-text.c
formats/ctf-text/types/array.c
formats/ctf-text/types/enum.c
formats/ctf-text/types/float.c
formats/ctf-text/types/integer.c
formats/ctf-text/types/sequence.c
formats/ctf-text/types/string.c
formats/ctf-text/types/struct.c
formats/ctf-text/types/variant.c
formats/ctf/ctf.c
formats/ctf/types/array.c
formats/ctf/types/enum.c
formats/ctf/types/float.c
formats/ctf/types/integer.c
formats/ctf/types/sequence.c
formats/ctf/types/string.c
formats/ctf/types/struct.c
formats/ctf/types/variant.c
include/babeltrace/context.h
include/babeltrace/ctf-text/types.h
include/babeltrace/ctf/types.h
include/babeltrace/format.h
include/babeltrace/types.h
lib/context.c
types/array.c
types/sequence.c
types/struct.c
types/variant.c

index 31e3d6e7c869cecfb3fb85dd256e23ba772dd801..b1f32c94b4d097d425e34910c56b1e68728b802c 100644 (file)
@@ -461,7 +461,7 @@ static int traverse_trace_dir(const char *fpath, const struct stat *sb,
  */
 int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
                const char *format_str,
  */
 int bt_context_add_traces_recursive(struct bt_context *ctx, const char *path,
                const char *format_str,
-               void (*packet_seek)(struct stream_pos *pos,
+               void (*packet_seek)(struct bt_stream_pos *pos,
                        size_t offset, int whence))
 {
 
                        size_t offset, int whence))
 {
 
index b55dd696daee73847954e0df0c95be42125a072f..537e6bbba1206308feecff945cc61111d57f7904 100644 (file)
 #include <stdlib.h>
 
 static
 #include <stdlib.h>
 
 static
-int bt_dummy_write_event(struct stream_pos *ppos, struct ctf_stream_definition *stream)
+int bt_dummy_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definition *stream)
 {
        return 0;
 }
 
 static
 struct trace_descriptor *bt_dummy_open_trace(const char *path, int flags,
 {
        return 0;
 }
 
 static
 struct trace_descriptor *bt_dummy_open_trace(const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
        struct ctf_text_stream_pos *pos;
                        int whence), FILE *metadata_fp)
 {
        struct ctf_text_stream_pos *pos;
index d344c1c0ce7d193532165bec1cd02456a9cdb57c..1f798b2bc372c522e369f9d2d86e0b66965bcc8b 100644 (file)
@@ -88,7 +88,7 @@ enum bt_loglevel {
 
 static
 struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
 
 static
 struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp);
 static
 int ctf_text_close_trace(struct trace_descriptor *descriptor);
                        int whence), FILE *metadata_fp);
 static
 int ctf_text_close_trace(struct trace_descriptor *descriptor);
@@ -232,7 +232,7 @@ const char *print_loglevel(int value)
 }
 
 static
 }
 
 static
-int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream_definition *stream)
+int ctf_text_write_event(struct bt_stream_pos *ppos, struct ctf_stream_definition *stream)
                         
 {
        struct ctf_text_stream_pos *pos =
                         
 {
        struct ctf_text_stream_pos *pos =
@@ -556,7 +556,7 @@ error:
 
 static
 struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
 
 static
 struct trace_descriptor *ctf_text_open_trace(const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
        struct ctf_text_stream_pos *pos;
                        int whence), FILE *metadata_fp)
 {
        struct ctf_text_stream_pos *pos;
index e2ed7b331e5dd94faa46305f143755f9501087f6..9e7d49fa3e202b855c038e2ca6fa38a65ea9a259 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_array_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_array_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_array *array_definition =
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_array *array_definition =
index 9df8da84e40615058f2f1d3e061d76358af9ff56..8a2463bb7db54cc300d7b7dceb7d6dc8957d88b7 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
 #include <stdio.h>
 #include <stdint.h>
 
-int ctf_text_enum_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_enum_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
index 199b01337ada4622dba4170b4d3c43842f58f485..a9254800ff4d74a5513f30550adefcf67d286b59 100644 (file)
@@ -31,7 +31,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_float_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_float_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
index 0886b0628fffc6a5ffb8784f8fb610b401e41fd3..3a469f611ae2e2bd1a4c483d4742df19ef3ba15b 100644 (file)
@@ -32,7 +32,7 @@
 #include <stdint.h>
 #include <babeltrace/bitfield.h>
 
 #include <stdint.h>
 #include <babeltrace/bitfield.h>
 
-int ctf_text_integer_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_integer_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
index 12574eec844cfe42f127946d9e8a4d352c3604ac..61be860194eb10abcc7454741c59b525fb3f04d5 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_sequence_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_sequence_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_sequence *sequence_definition =
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        struct definition_sequence *sequence_definition =
index 44aeb40d640cf9c76764e92107172e2dcf550f10..f49d1b7e4459ff239a3d7e1bc93525f0f5bdf1b9 100644 (file)
@@ -31,7 +31,7 @@
 #include <limits.h>            /* C99 limits */
 #include <string.h>
 
 #include <limits.h>            /* C99 limits */
 #include <string.h>
 
-int ctf_text_string_write(struct stream_pos *ppos,
+int ctf_text_string_write(struct bt_stream_pos *ppos,
                          struct definition *definition)
 {
        struct definition_string *string_definition =
                          struct definition *definition)
 {
        struct definition_string *string_definition =
index e9365affe83ec9a30796ed7c1f3074968479aaff..a727a89c97deb3579c1d5a536f2eae862dc44c72 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_struct_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_struct_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct declaration_struct *struct_declaration =
 {
        struct declaration *declaration = definition->declaration;
        struct declaration_struct *struct_declaration =
index e7e50ace953ca03d16bba960c206589bf5c6ff82..ca7c1ae0b8d8e24d70e0adfbd09f85078745c10e 100644 (file)
@@ -29,7 +29,7 @@
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
 #include <babeltrace/ctf-text/types.h>
 #include <stdio.h>
 
-int ctf_text_variant_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_text_variant_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        int field_nr_saved;
 {
        struct ctf_text_stream_pos *pos = ctf_text_pos(ppos);
        int field_nr_saved;
index 552133c3238719ecc63a1acfb2fa3f27831b24ab..c6b148cc1cc99b0889c4f3e8ef70bfe9fdaf23f9 100644 (file)
@@ -77,13 +77,13 @@ extern int yydebug;
 
 static
 struct trace_descriptor *ctf_open_trace(const char *path, int flags,
 
 static
 struct trace_descriptor *ctf_open_trace(const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
 struct trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
                        int whence),
                FILE *metadata_fp);
 static
 struct trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp);
 static
                        int whence),
                FILE *metadata_fp);
 static
@@ -392,7 +392,7 @@ void ctf_print_timestamp(FILE *fp,
 }
 
 static
 }
 
 static
-int ctf_read_event(struct stream_pos *ppos, struct ctf_stream_definition *stream)
+int ctf_read_event(struct bt_stream_pos *ppos, struct ctf_stream_definition *stream)
 {
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
 {
        struct ctf_stream_pos *pos =
                container_of(ppos, struct ctf_stream_pos, parent);
@@ -504,7 +504,7 @@ error:
 }
 
 static
 }
 
 static
-int ctf_write_event(struct stream_pos *pos, struct ctf_stream_definition *stream)
+int ctf_write_event(struct bt_stream_pos *pos, struct ctf_stream_definition *stream)
 {
        struct ctf_stream_declaration *stream_class = stream->stream_class;
        struct ctf_event_definition *event;
 {
        struct ctf_stream_declaration *stream_class = stream->stream_class;
        struct ctf_event_definition *event;
@@ -617,7 +617,7 @@ int ctf_fini_pos(struct ctf_stream_pos *pos)
  * for SEEK_CUR: go to next packet.
  * for SEEK_POS: go to packet numer (index).
  */
  * for SEEK_CUR: go to next packet.
  * for SEEK_POS: go to packet numer (index).
  */
-void ctf_packet_seek(struct stream_pos *stream_pos, size_t index, int whence)
+void ctf_packet_seek(struct bt_stream_pos *stream_pos, size_t index, int whence)
 {
        struct ctf_stream_pos *pos =
                container_of(stream_pos, struct ctf_stream_pos, parent);
 {
        struct ctf_stream_pos *pos =
                container_of(stream_pos, struct ctf_stream_pos, parent);
@@ -1018,7 +1018,7 @@ int ctf_open_trace_metadata_stream_read(struct ctf_trace *td, FILE **fp,
 
 static
 int ctf_open_trace_metadata_read(struct ctf_trace *td,
 
 static
 int ctf_open_trace_metadata_read(struct ctf_trace *td,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
        struct ctf_scanner *scanner;
                        int whence), FILE *metadata_fp)
 {
        struct ctf_scanner *scanner;
@@ -1523,7 +1523,7 @@ error:
  */
 static
 int ctf_open_file_stream_read(struct ctf_trace *td, const char *path, int flags,
  */
 static
 int ctf_open_file_stream_read(struct ctf_trace *td, const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence))
 {
        int ret, fd, closeret;
                        int whence))
 {
        int ret, fd, closeret;
@@ -1600,7 +1600,7 @@ error:
 static
 int ctf_open_trace_read(struct ctf_trace *td,
                const char *path, int flags,
 static
 int ctf_open_trace_read(struct ctf_trace *td,
                const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
        int ret, closeret;
                        int whence), FILE *metadata_fp)
 {
        int ret, closeret;
@@ -1696,7 +1696,7 @@ error:
  */
 static
 struct trace_descriptor *ctf_open_trace(const char *path, int flags,
  */
 static
 struct trace_descriptor *ctf_open_trace(const char *path, int flags,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence), FILE *metadata_fp)
 {
        struct ctf_trace *td;
                        int whence), FILE *metadata_fp)
 {
        struct ctf_trace *td;
@@ -1786,7 +1786,7 @@ end:
 static
 int ctf_open_mmap_stream_read(struct ctf_trace *td,
                struct mmap_stream *mmap_info,
 static
 int ctf_open_mmap_stream_read(struct ctf_trace *td,
                struct mmap_stream *mmap_info,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence))
 {
        int ret;
                        int whence))
 {
        int ret;
@@ -1828,7 +1828,7 @@ error_def:
 static
 int ctf_open_mmap_trace_read(struct ctf_trace *td,
                struct mmap_stream_list *mmap_list,
 static
 int ctf_open_mmap_trace_read(struct ctf_trace *td,
                struct mmap_stream_list *mmap_list,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp)
 {
                        int whence),
                FILE *metadata_fp)
 {
@@ -1861,7 +1861,7 @@ error:
 static
 struct trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
 static
 struct trace_descriptor *ctf_open_mmap_trace(
                struct mmap_stream_list *mmap_list,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                FILE *metadata_fp)
 {
                        int whence),
                FILE *metadata_fp)
 {
index 006f0cecffd6c1763e4a7cc0cf7702785a15d1a3..b1cbe2ffc77748a3e7389217ea495857e0faae87 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_array_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_array_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
@@ -64,7 +64,7 @@ int ctf_array_read(struct stream_pos *ppos, struct definition *definition)
        return bt_array_rw(ppos, definition);
 }
 
        return bt_array_rw(ppos, definition);
 }
 
-int ctf_array_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_array_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
index 189117554b9506f90276fedac9561edcb1ee9086..9371b27735aae6b192555c7bb3c41b6cee0e9999 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdint.h>
 #include <glib.h>
 
 #include <stdint.h>
 #include <glib.h>
 
-int ctf_enum_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_enum_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
@@ -69,7 +69,7 @@ int ctf_enum_read(struct stream_pos *ppos, struct definition *definition)
        return 0;
 }
 
        return 0;
 }
 
-int ctf_enum_write(struct stream_pos *pos, struct definition *definition)
+int ctf_enum_write(struct bt_stream_pos *pos, struct definition *definition)
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
 {
        struct definition_enum *enum_definition =
                container_of(definition, struct definition_enum, p);
index 2dfef86ee49dc4df4f017c39d8ce0be128602ddf..f46e26aee2e8dabdbdea6b7d0544ed87ff4d8900 100644 (file)
@@ -96,9 +96,9 @@ static void float_unlock(void)
        assert(!ret);
 }
 
        assert(!ret);
 }
 
-static int _ctf_float_copy(struct stream_pos *destp,
+static int _ctf_float_copy(struct bt_stream_pos *destp,
                    struct definition_float *dest_definition,
                    struct definition_float *dest_definition,
-                   struct stream_pos *srcp,
+                   struct bt_stream_pos *srcp,
                    const struct definition_float *src_definition)
 {
        int ret;
                    const struct definition_float *src_definition)
 {
        int ret;
@@ -165,7 +165,7 @@ static int _ctf_float_copy(struct stream_pos *destp,
        return 0;
 }
 
        return 0;
 }
 
-int ctf_float_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_float_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
@@ -222,7 +222,7 @@ end:
        return ret;
 }
 
        return ret;
 }
 
-int ctf_float_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_float_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
 {
        struct definition_float *float_definition =
                container_of(definition, struct definition_float, p);
index 66036ae2511004fafe8bd3056cb848949f11a209..1267925d3f9304ac0f7fc94089f63a7de9b0fe41 100644 (file)
@@ -39,7 +39,7 @@
  */
 
 static
  */
 
 static
-int _aligned_integer_read(struct stream_pos *ppos,
+int _aligned_integer_read(struct bt_stream_pos *ppos,
                          struct definition *definition)
 {
        struct definition_integer *integer_definition =
                          struct definition *definition)
 {
        struct definition_integer *integer_definition =
@@ -141,7 +141,7 @@ int _aligned_integer_read(struct stream_pos *ppos,
 }
 
 static
 }
 
 static
-int _aligned_integer_write(struct stream_pos *ppos,
+int _aligned_integer_write(struct bt_stream_pos *ppos,
                            struct definition *definition)
 {
        struct definition_integer *integer_definition =
                            struct definition *definition)
 {
        struct definition_integer *integer_definition =
@@ -211,7 +211,7 @@ end:
        return 0;
 }
 
        return 0;
 }
 
-int ctf_integer_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_integer_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
@@ -256,7 +256,7 @@ int ctf_integer_read(struct stream_pos *ppos, struct definition *definition)
        return 0;
 }
 
        return 0;
 }
 
-int ctf_integer_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_integer_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
 {
        struct definition_integer *integer_definition =
                container_of(definition, struct definition_integer, p);
index 2ff31b7be0e65b2f1b7a8ec4c2ebff15fec3f017..b2221eaf686a2b731c3c6d95dbb73a49e3dd3a19 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_sequence_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_sequence_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
@@ -63,7 +63,7 @@ int ctf_sequence_read(struct stream_pos *ppos, struct definition *definition)
        return bt_sequence_rw(ppos, definition);
 }
 
        return bt_sequence_rw(ppos, definition);
 }
 
-int ctf_sequence_write(struct stream_pos *ppos, struct definition *definition)
+int ctf_sequence_write(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
index 357e273a4e8929a130445ed764f6473e61ea0892..5771733b63ba35c42ddb3da3e06a22c5c2baa7f7 100644 (file)
@@ -31,7 +31,7 @@
 #include <limits.h>            /* C99 limits */
 #include <string.h>
 
 #include <limits.h>            /* C99 limits */
 #include <string.h>
 
-int ctf_string_read(struct stream_pos *ppos, struct definition *definition)
+int ctf_string_read(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_string *string_definition =
                container_of(definition, struct definition_string, p);
 {
        struct definition_string *string_definition =
                container_of(definition, struct definition_string, p);
@@ -68,7 +68,7 @@ int ctf_string_read(struct stream_pos *ppos, struct definition *definition)
        return 0;
 }
 
        return 0;
 }
 
-int ctf_string_write(struct stream_pos *ppos,
+int ctf_string_write(struct bt_stream_pos *ppos,
                      struct definition *definition)
 {
        struct definition_string *string_definition =
                      struct definition *definition)
 {
        struct definition_string *string_definition =
index b0d9e4a6eb5a5d6cae10220b1f9917da0a96f833..7c1562bbf19dc6f43d5933921e12942c91dd415a 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_struct_rw(struct stream_pos *ppos, struct definition *definition)
+int ctf_struct_rw(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
index f3559f55ebae7242a8c6394f824481ef0abc59a2..3c0c371f4d5922a708e300009fa910be3ab0d96d 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <babeltrace/ctf/types.h>
 
 
 #include <babeltrace/ctf/types.h>
 
-int ctf_variant_rw(struct stream_pos *ppos, struct definition *definition)
+int ctf_variant_rw(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
 {
        struct declaration *declaration = definition->declaration;
        struct ctf_stream_pos *pos = ctf_pos(ppos);
index f29ccf083f034c5e73a36132b42103668a3dfa19..f3763e1f570f303d378cfe61d71554e455fe71f2 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
 
 /* struct bt_context is opaque to the user */
 struct bt_context;
 
 /* struct bt_context is opaque to the user */
 struct bt_context;
-struct stream_pos;
+struct bt_stream_pos;
 struct bt_ctf_event;
 
 /*
 struct bt_ctf_event;
 
 /*
@@ -82,7 +82,7 @@ struct bt_context *bt_context_create(void);
  */
 int bt_context_add_trace(struct bt_context *ctx, const char *path,
                const char *format,
  */
 int bt_context_add_trace(struct bt_context *ctx, const char *path,
                const char *format,
-               void (*packet_seek)(struct stream_pos *pos,
+               void (*packet_seek)(struct bt_stream_pos *pos,
                        size_t index, int whence),
                struct mmap_stream_list *stream_list,
                FILE *metadata);
                        size_t index, int whence),
                struct mmap_stream_list *stream_list,
                FILE *metadata);
index debecfef93728e56ed4cc417f13ddb12549b1df0..8681f39d64b64cee3f0ab72dbcb3b7bc675206db 100644 (file)
 #include <babeltrace/format.h>
 
 /*
 #include <babeltrace/format.h>
 
 /*
- * Inherit from both struct stream_pos and struct trace_descriptor.
+ * Inherit from both struct bt_stream_pos and struct trace_descriptor.
  */
 struct ctf_text_stream_pos {
  */
 struct ctf_text_stream_pos {
-       struct stream_pos parent;
+       struct bt_stream_pos parent;
        struct trace_descriptor trace_descriptor;
        FILE *fp;               /* File pointer. NULL if unset. */
        int depth;
        struct trace_descriptor trace_descriptor;
        FILE *fp;               /* File pointer. NULL if unset. */
        int depth;
@@ -53,7 +53,7 @@ struct ctf_text_stream_pos {
 };
 
 static inline
 };
 
 static inline
-struct ctf_text_stream_pos *ctf_text_pos(struct stream_pos *pos)
+struct ctf_text_stream_pos *ctf_text_pos(struct bt_stream_pos *pos)
 {
        return container_of(pos, struct ctf_text_stream_pos, parent);
 }
 {
        return container_of(pos, struct ctf_text_stream_pos, parent);
 }
@@ -62,21 +62,21 @@ struct ctf_text_stream_pos *ctf_text_pos(struct stream_pos *pos)
  * Write only is supported for now.
  */
 BT_HIDDEN
  * Write only is supported for now.
  */
 BT_HIDDEN
-int ctf_text_integer_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_integer_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_float_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_float_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_string_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_string_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_enum_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_enum_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_struct_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_struct_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_variant_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_variant_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_array_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_array_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_text_sequence_write(struct stream_pos *pos, struct definition *definition);
+int ctf_text_sequence_write(struct bt_stream_pos *pos, struct definition *definition);
 
 static inline
 void print_pos_tabs(struct ctf_text_stream_pos *pos)
 
 static inline
 void print_pos_tabs(struct ctf_text_stream_pos *pos)
index 8bd01027c4cc505ecab3c13ad2748b289dc8b663..f7b93d36907f5a5f25f07e219a8082c9d00e0ca9 100644 (file)
@@ -59,7 +59,7 @@ struct packet_index {
  * Always update ctf_stream_pos with ctf_move_pos and ctf_init_pos.
  */
 struct ctf_stream_pos {
  * Always update ctf_stream_pos with ctf_move_pos and ctf_init_pos.
  */
 struct ctf_stream_pos {
-       struct stream_pos parent;
+       struct bt_stream_pos parent;
        int fd;                 /* backing file fd. -1 if unset. */
        GArray *packet_cycles_index;    /* contains struct packet_index in cycles */
        GArray *packet_real_index;      /* contains struct packet_index in ns */
        int fd;                 /* backing file fd. -1 if unset. */
        GArray *packet_cycles_index;    /* contains struct packet_index in cycles */
        GArray *packet_real_index;      /* contains struct packet_index in ns */
@@ -77,7 +77,7 @@ struct ctf_stream_pos {
        int64_t last_offset;    /* offset before the last read_event */
        uint64_t cur_index;     /* current index in packet index */
        uint64_t last_events_discarded; /* last known amount of event discarded */
        int64_t last_offset;    /* offset before the last read_event */
        uint64_t cur_index;     /* current index in packet index */
        uint64_t last_events_discarded; /* last known amount of event discarded */
-       void (*packet_seek)(struct stream_pos *pos, size_t index,
+       void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence); /* function called to switch packet */
 
        int dummy;              /* dummy position, for length calculation */
                        int whence); /* function called to switch packet */
 
        int dummy;              /* dummy position, for length calculation */
@@ -85,41 +85,41 @@ struct ctf_stream_pos {
 };
 
 static inline
 };
 
 static inline
-struct ctf_stream_pos *ctf_pos(struct stream_pos *pos)
+struct ctf_stream_pos *ctf_pos(struct bt_stream_pos *pos)
 {
        return container_of(pos, struct ctf_stream_pos, parent);
 }
 
 BT_HIDDEN
 {
        return container_of(pos, struct ctf_stream_pos, parent);
 }
 
 BT_HIDDEN
-int ctf_integer_read(struct stream_pos *pos, struct definition *definition);
+int ctf_integer_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_integer_write(struct stream_pos *pos, struct definition *definition);
+int ctf_integer_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_float_read(struct stream_pos *pos, struct definition *definition);
+int ctf_float_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_float_write(struct stream_pos *pos, struct definition *definition);
+int ctf_float_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_string_read(struct stream_pos *pos, struct definition *definition);
+int ctf_string_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_string_write(struct stream_pos *pos, struct definition *definition);
+int ctf_string_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_enum_read(struct stream_pos *pos, struct definition *definition);
+int ctf_enum_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_enum_write(struct stream_pos *pos, struct definition *definition);
+int ctf_enum_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_struct_rw(struct stream_pos *pos, struct definition *definition);
+int ctf_struct_rw(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_variant_rw(struct stream_pos *pos, struct definition *definition);
+int ctf_variant_rw(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_array_read(struct stream_pos *pos, struct definition *definition);
+int ctf_array_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_array_write(struct stream_pos *pos, struct definition *definition);
+int ctf_array_write(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_sequence_read(struct stream_pos *pos, struct definition *definition);
+int ctf_sequence_read(struct bt_stream_pos *pos, struct definition *definition);
 BT_HIDDEN
 BT_HIDDEN
-int ctf_sequence_write(struct stream_pos *pos, struct definition *definition);
+int ctf_sequence_write(struct bt_stream_pos *pos, struct definition *definition);
 
 
-void ctf_packet_seek(struct stream_pos *pos, size_t index, int whence);
+void ctf_packet_seek(struct bt_stream_pos *pos, size_t index, int whence);
 
 int ctf_init_pos(struct ctf_stream_pos *pos, int fd, int open_flags);
 int ctf_fini_pos(struct ctf_stream_pos *pos);
 
 int ctf_init_pos(struct ctf_stream_pos *pos, int fd, int open_flags);
 int ctf_fini_pos(struct ctf_stream_pos *pos);
index c6faca71d9ada4774e82483e5f527904037a6761..fa0e3251ad839973685816ede43a0183b6664289 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
 typedef int bt_intern_str;
 
 /* forward declaration */
 typedef int bt_intern_str;
 
 /* forward declaration */
-struct stream_pos;
+struct bt_stream_pos;
 struct bt_context;
 struct bt_trace_handle;
 
 struct bt_context;
 struct bt_trace_handle;
 
@@ -62,12 +62,12 @@ struct format {
        bt_intern_str name;
 
        struct trace_descriptor *(*open_trace)(const char *path, int flags,
        bt_intern_str name;
 
        struct trace_descriptor *(*open_trace)(const char *path, int flags,
-                       void (*packet_seek)(struct stream_pos *pos,
+                       void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
        struct trace_descriptor *(*open_mmap_trace)(
                        struct mmap_stream_list *mmap_list,
                                size_t index, int whence),
                        FILE *metadata_fp);
        struct trace_descriptor *(*open_mmap_trace)(
                        struct mmap_stream_list *mmap_list,
-                       void (*packet_seek)(struct stream_pos *pos,
+                       void (*packet_seek)(struct bt_stream_pos *pos,
                                size_t index, int whence),
                        FILE *metadata_fp);
        int (*close_trace)(struct trace_descriptor *descriptor);
                                size_t index, int whence),
                        FILE *metadata_fp);
        int (*close_trace)(struct trace_descriptor *descriptor);
index d742b40ff730044f99d28a3ab6aca708909dc0d7..310a269fdb35dea1b09a4895ea5c097cc23804fe 100644 (file)
@@ -43,7 +43,7 @@
 #define DEFAULT_NR_STRUCT_FIELDS 8
 
 struct ctf_stream_definition;
 #define DEFAULT_NR_STRUCT_FIELDS 8
 
 struct ctf_stream_definition;
-struct stream_pos;
+struct bt_stream_pos;
 struct format;
 struct definition;
 struct ctf_clock;
 struct format;
 struct definition;
 struct ctf_clock;
@@ -106,19 +106,19 @@ struct definition {
        struct definition_scope *scope;
 };
 
        struct definition_scope *scope;
 };
 
-typedef int (*rw_dispatch)(struct stream_pos *pos,
+typedef int (*rw_dispatch)(struct bt_stream_pos *pos,
                           struct definition *definition);
 
 /* Parent of per-plugin positions */
                           struct definition *definition);
 
 /* Parent of per-plugin positions */
-struct stream_pos {
+struct bt_stream_pos {
        /* read/write dispatch table. Specific to plugin used for stream. */
        rw_dispatch *rw_table;  /* rw dispatch table */
        /* read/write dispatch table. Specific to plugin used for stream. */
        rw_dispatch *rw_table;  /* rw dispatch table */
-       int (*event_cb)(struct stream_pos *pos,
+       int (*event_cb)(struct bt_stream_pos *pos,
                        struct ctf_stream_definition *stream);
 };
 
 static inline
                        struct ctf_stream_definition *stream);
 };
 
 static inline
-int generic_rw(struct stream_pos *pos, struct definition *definition)
+int generic_rw(struct bt_stream_pos *pos, struct definition *definition)
 {
        enum ctf_type_id dispatch_id = definition->declaration->id;
        rw_dispatch call;
 {
        enum ctf_type_id dispatch_id = definition->declaration->id;
        rw_dispatch call;
@@ -450,7 +450,7 @@ bt_struct_declaration_get_field_from_index(struct declaration_struct *struct_dec
 struct definition *
 bt_struct_definition_get_field_from_index(struct definition_struct *struct_definition,
                                       int index);
 struct definition *
 bt_struct_definition_get_field_from_index(struct definition_struct *struct_definition,
                                       int index);
-int bt_struct_rw(struct stream_pos *pos, struct definition *definition);
+int bt_struct_rw(struct bt_stream_pos *pos, struct definition *definition);
 uint64_t bt_struct_declaration_len(struct declaration_struct *struct_declaration);
 
 /*
 uint64_t bt_struct_declaration_len(struct declaration_struct *struct_declaration);
 
 /*
@@ -480,7 +480,7 @@ int variant_definition_set_tag(struct definition_variant *variant,
  * to.
  */
 struct definition *bt_variant_get_current_field(struct definition_variant *variant);
  * to.
  */
 struct definition *bt_variant_get_current_field(struct definition_variant *variant);
-int bt_variant_rw(struct stream_pos *pos, struct definition *definition);
+int bt_variant_rw(struct bt_stream_pos *pos, struct definition *definition);
 
 /*
  * elem_declaration passed as parameter now belongs to the array. No
 
 /*
  * elem_declaration passed as parameter now belongs to the array. No
@@ -492,7 +492,7 @@ struct declaration_array *
                struct declaration_scope *parent_scope);
 uint64_t bt_array_len(struct definition_array *array);
 struct definition *bt_array_index(struct definition_array *array, uint64_t i);
                struct declaration_scope *parent_scope);
 uint64_t bt_array_len(struct definition_array *array);
 struct definition *bt_array_index(struct definition_array *array, uint64_t i);
-int bt_array_rw(struct stream_pos *pos, struct definition *definition);
+int bt_array_rw(struct bt_stream_pos *pos, struct definition *definition);
 GString *bt_get_char_array(const struct definition *field);
 int bt_get_array_len(const struct definition *field);
 
 GString *bt_get_char_array(const struct definition *field);
 int bt_get_array_len(const struct definition *field);
 
@@ -506,7 +506,7 @@ struct declaration_sequence *
                struct declaration_scope *parent_scope);
 uint64_t bt_sequence_len(struct definition_sequence *sequence);
 struct definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
                struct declaration_scope *parent_scope);
 uint64_t bt_sequence_len(struct definition_sequence *sequence);
 struct definition *bt_sequence_index(struct definition_sequence *sequence, uint64_t i);
-int bt_sequence_rw(struct stream_pos *pos, struct definition *definition);
+int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition);
 
 /*
  * in: path (dot separated), out: q (GArray of GQuark)
 
 /*
  * in: path (dot separated), out: q (GArray of GQuark)
index b728298cb799c43f16300238004ccc29633ecf43..18e2e22c7891011229412e613b93828eccf1c904 100644 (file)
@@ -67,7 +67,7 @@ struct bt_context *bt_context_create(void)
 
 int bt_context_add_trace(struct bt_context *ctx, const char *path,
                const char *format_name,
 
 int bt_context_add_trace(struct bt_context *ctx, const char *path,
                const char *format_name,
-               void (*packet_seek)(struct stream_pos *pos, size_t index,
+               void (*packet_seek)(struct bt_stream_pos *pos, size_t index,
                        int whence),
                struct mmap_stream_list *stream_list,
                FILE *metadata)
                        int whence),
                struct mmap_stream_list *stream_list,
                FILE *metadata)
index 30699b1f1ef87c545b2883432cabc9bf39c80025..43decb50574bb190f3521d0a7f698427a453730d 100644 (file)
@@ -38,7 +38,7 @@ struct definition *_array_definition_new(struct declaration *declaration,
 static
 void _array_definition_free(struct definition *definition);
 
 static
 void _array_definition_free(struct definition *definition);
 
-int bt_array_rw(struct stream_pos *pos, struct definition *definition)
+int bt_array_rw(struct bt_stream_pos *pos, struct definition *definition)
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
 {
        struct definition_array *array_definition =
                container_of(definition, struct definition_array, p);
index 2646cef493b426be12f76c16a96d9c1c05be9b30..a91a2494c8a01f8791786ee8bec4fbd8f75c558a 100644 (file)
@@ -39,7 +39,7 @@ struct definition *_sequence_definition_new(struct declaration *declaration,
 static
 void _sequence_definition_free(struct definition *definition);
 
 static
 void _sequence_definition_free(struct definition *definition);
 
-int bt_sequence_rw(struct stream_pos *pos, struct definition *definition)
+int bt_sequence_rw(struct bt_stream_pos *pos, struct definition *definition)
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
 {
        struct definition_sequence *sequence_definition =
                container_of(definition, struct definition_sequence, p);
index 5da9033e7a419ee1116bc7bfcf809d421791ff7e..219d523078fa26aa6a2a9df27c761b4824214adc 100644 (file)
@@ -43,7 +43,7 @@ struct definition *_struct_definition_new(struct declaration *declaration,
 static
 void _struct_definition_free(struct definition *definition);
 
 static
 void _struct_definition_free(struct definition *definition);
 
-int bt_struct_rw(struct stream_pos *ppos, struct definition *definition)
+int bt_struct_rw(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_struct *struct_definition =
                container_of(definition, struct definition_struct, p);
 {
        struct definition_struct *struct_definition =
                container_of(definition, struct definition_struct, p);
index ebaf43c1fdd463cff09e669627b60adc14950627..4db0de9b4c9f9546f2d4ac7ecb10e68fadbb7bc6 100644 (file)
@@ -39,7 +39,7 @@ struct definition *_variant_definition_new(struct declaration *declaration,
 static
 void _variant_definition_free(struct definition *definition);
 
 static
 void _variant_definition_free(struct definition *definition);
 
-int bt_variant_rw(struct stream_pos *ppos, struct definition *definition)
+int bt_variant_rw(struct bt_stream_pos *ppos, struct definition *definition)
 {
        struct definition_variant *variant_definition =
                container_of(definition, struct definition_variant, p);
 {
        struct definition_variant *variant_definition =
                container_of(definition, struct definition_variant, p);
This page took 0.043001 seconds and 4 git commands to generate.