Namespace the struct format
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 15 Feb 2013 19:21:31 +0000 (14:21 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Feb 2013 19:21:31 +0000 (14:21 -0500)
This struct is exposed in the public API, we need to namespace it.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
converter/babeltrace.c
formats/bt-dummy/bt-dummy.c
formats/ctf-text/ctf-text.c
formats/ctf/ctf.c
include/babeltrace/format.h
include/babeltrace/trace-handle-internal.h
include/babeltrace/types.h
lib/context.c
lib/registry.c

index ef5016ed3a1907f91176ff9ba3ce59e352d7c6e4..20ded00495e9e7262a32677088231ab512c04482 100644 (file)
@@ -68,7 +68,7 @@ static char *opt_input_format, *opt_output_format;
 static GPtrArray *opt_input_paths;
 static char *opt_output_path;
 
 static GPtrArray *opt_input_paths;
 static char *opt_output_path;
 
-static struct format *fmt_read;
+static struct bt_format *fmt_read;
 
 static
 void strlower(char *str)
 
 static
 void strlower(char *str)
@@ -555,7 +555,7 @@ error_iter:
 int main(int argc, char **argv)
 {
        int ret, partial_error = 0, open_success = 0;
 int main(int argc, char **argv)
 {
        int ret, partial_error = 0, open_success = 0;
-       struct format *fmt_write;
+       struct bt_format *fmt_write;
        struct bt_trace_descriptor *td_write;
        struct bt_context *ctx;
        int i;
        struct bt_trace_descriptor *td_write;
        struct bt_context *ctx;
        int i;
index f0ce913c2a0a88344ea1ad47349810673f1d4a70..9fde1c966316a85a465d7ba387a54f364ff0e0c6 100644 (file)
@@ -68,7 +68,7 @@ int bt_dummy_close_trace(struct bt_trace_descriptor *td)
 }
 
 static
 }
 
 static
-struct format bt_dummy_format = {
+struct bt_format bt_dummy_format = {
        .open_trace = bt_dummy_open_trace,
        .close_trace = bt_dummy_close_trace,
 };
        .open_trace = bt_dummy_open_trace,
        .close_trace = bt_dummy_close_trace,
 };
index 718865828cb3afaab98bdcc557e7e5a4f6d75d49..cd691250f417515ebd0fd64dea1ad12aef3125e5 100644 (file)
@@ -106,7 +106,7 @@ rw_dispatch write_dispatch_table[] = {
 };
 
 static
 };
 
 static
-struct format ctf_text_format = {
+struct bt_format ctf_text_format = {
        .open_trace = ctf_text_open_trace,
        .close_trace = ctf_text_close_trace,
 };
        .open_trace = ctf_text_open_trace,
        .close_trace = ctf_text_close_trace,
 };
index 3bd1cc1e2b454ce190102c4924eb1bb7fba49176..aea12a106014be06b2a6ca2a39fd409d82bb237d 100644 (file)
@@ -129,7 +129,7 @@ rw_dispatch write_dispatch_table[] = {
 };
 
 static
 };
 
 static
-struct format ctf_format = {
+struct bt_format ctf_format = {
        .open_trace = ctf_open_trace,
        .open_mmap_trace = ctf_open_mmap_trace,
        .close_trace = ctf_close_trace,
        .open_trace = ctf_open_trace,
        .open_mmap_trace = ctf_open_mmap_trace,
        .close_trace = ctf_close_trace,
index 8d4ac4b290a794af51af64006e029c80343015f2..f1f87632980a6e2c868a46d3327fe473bf3535e7 100644 (file)
@@ -58,7 +58,7 @@ struct bt_mmap_stream_list {
        struct bt_list_head head;
 };
 
        struct bt_list_head head;
 };
 
-struct format {
+struct bt_format {
        bt_intern_str name;
 
        struct bt_trace_descriptor *(*open_trace)(const char *path, int flags,
        bt_intern_str name;
 
        struct bt_trace_descriptor *(*open_trace)(const char *path, int flags,
@@ -82,10 +82,10 @@ struct format {
        int (*convert_index_timestamp)(struct bt_trace_descriptor *descriptor);
 };
 
        int (*convert_index_timestamp)(struct bt_trace_descriptor *descriptor);
 };
 
-extern struct format *bt_lookup_format(bt_intern_str qname);
+extern struct bt_format *bt_lookup_format(bt_intern_str qname);
 extern void bt_fprintf_format_list(FILE *fp);
 extern void bt_fprintf_format_list(FILE *fp);
-extern int bt_register_format(struct format *format);
-extern void bt_unregister_format(struct format *format);
+extern int bt_register_format(struct bt_format *format);
+extern void bt_unregister_format(struct bt_format *format);
 
 #ifdef __cplusplus
 }
 
 #ifdef __cplusplus
 }
index f7e2b8a89d98c20899c699613a05735ed6996959..5e9c1c6a943865ed3d45121ab73c56983cfefa66 100644 (file)
@@ -44,7 +44,7 @@
 struct bt_trace_handle {
        int id;
        struct bt_trace_descriptor *td;
 struct bt_trace_handle {
        int id;
        struct bt_trace_descriptor *td;
-       struct format *format;
+       struct bt_format *format;
        char path[PATH_MAX];
        uint64_t real_timestamp_begin;
        uint64_t real_timestamp_end;
        char path[PATH_MAX];
        uint64_t real_timestamp_begin;
        uint64_t real_timestamp_end;
index 310a269fdb35dea1b09a4895ea5c097cc23804fe..093ef0c8f6fee49e0e31565679b1bacad76cde57 100644 (file)
@@ -44,7 +44,7 @@
 
 struct ctf_stream_definition;
 struct bt_stream_pos;
 
 struct ctf_stream_definition;
 struct bt_stream_pos;
-struct format;
+struct bt_format;
 struct definition;
 struct ctf_clock;
 
 struct definition;
 struct ctf_clock;
 
index 00409726e0d6d38714387b8af44e4354b87da1e8..209cfde260582b99c8f90d137cc16e4d47d4cfaa 100644 (file)
@@ -73,7 +73,7 @@ int bt_context_add_trace(struct bt_context *ctx, const char *path,
                FILE *metadata)
 {
        struct bt_trace_descriptor *td;
                FILE *metadata)
 {
        struct bt_trace_descriptor *td;
-       struct format *fmt;
+       struct bt_format *fmt;
        struct bt_trace_handle *handle;
        int ret, closeret;
 
        struct bt_trace_handle *handle;
        int ret, closeret;
 
index 28af184f8c5da58c7122637a0353a09cc13b5453..bdce0c6d01e9cf306753791f44a588ed5cbe15a8 100644 (file)
@@ -67,7 +67,7 @@ void format_refcount_dec(void)
                format_cleanup();
 }
 
                format_cleanup();
 }
 
-struct format *bt_lookup_format(bt_intern_str name)
+struct bt_format *bt_lookup_format(bt_intern_str name)
 {
        if (!init_done)
                return NULL;
 {
        if (!init_done)
                return NULL;
@@ -103,7 +103,7 @@ void bt_fprintf_format_list(FILE *fp)
        fprintf(fp, ".\n");
 }
 
        fprintf(fp, ".\n");
 }
 
-int bt_register_format(struct format *format)
+int bt_register_format(struct bt_format *format)
 {
        if (!format)
                return -EINVAL;
 {
        if (!format)
                return -EINVAL;
@@ -121,7 +121,7 @@ int bt_register_format(struct format *format)
        return 0;
 }
 
        return 0;
 }
 
-void bt_unregister_format(struct format *format)
+void bt_unregister_format(struct bt_format *format)
 {
        assert(bt_lookup_format(format->name));
        g_hash_table_remove(format_registry,
 {
        assert(bt_lookup_format(format->name));
        g_hash_table_remove(format_registry,
This page took 0.029327 seconds and 4 git commands to generate.