From d14fb122db9a0f322feca2ecfe8f4af574574d38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sun, 23 Oct 2016 21:33:51 -0400 Subject: [PATCH] Hide bt_ctf_trace_* symbols MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/trace.c | 22 +++++++++ include/Makefile.am | 2 +- include/babeltrace/ctf-ir/trace.h | 64 +++++++++++++++++--------- include/babeltrace/ctf-writer/writer.h | 1 - 4 files changed, 66 insertions(+), 23 deletions(-) diff --git a/formats/ctf/ir/trace.c b/formats/ctf/ir/trace.c index 4d9e97f9..60f2a2c4 100644 --- a/formats/ctf/ir/trace.c +++ b/formats/ctf/ir/trace.c @@ -71,6 +71,7 @@ const unsigned int field_type_aliases_sizes[] = { [FIELD_TYPE_ALIAS_UINT64_T] = 64, }; +BT_HIDDEN struct bt_ctf_trace *bt_ctf_trace_create(void) { struct bt_ctf_trace *trace = NULL; @@ -111,6 +112,7 @@ error: return trace; } +BT_HIDDEN void bt_ctf_trace_destroy(struct bt_object *obj) { struct bt_ctf_trace *trace; @@ -136,6 +138,7 @@ void bt_ctf_trace_destroy(struct bt_object *obj) g_free(trace); } +BT_HIDDEN int bt_ctf_trace_set_environment_field(struct bt_ctf_trace *trace, const char *name, struct bt_value *value) { @@ -180,6 +183,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_set_environment_field_string(struct bt_ctf_trace *trace, const char *name, const char *value) { @@ -225,6 +229,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_set_environment_field_integer(struct bt_ctf_trace *trace, const char *name, int64_t value) { @@ -268,6 +273,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_get_environment_field_count(struct bt_ctf_trace *trace) { int ret = 0; @@ -283,6 +289,7 @@ end: return ret; } +BT_HIDDEN const char * bt_ctf_trace_get_environment_field_name(struct bt_ctf_trace *trace, int index) @@ -299,6 +306,7 @@ end: return ret; } +BT_HIDDEN struct bt_value *bt_ctf_trace_get_environment_field_value( struct bt_ctf_trace *trace, int index) { @@ -314,6 +322,7 @@ end: return ret; } +BT_HIDDEN struct bt_value *bt_ctf_trace_get_environment_field_value_by_name( struct bt_ctf_trace *trace, const char *name) { @@ -330,6 +339,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace, struct bt_ctf_clock *clock) { @@ -367,6 +377,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace) { int ret = -1; @@ -380,6 +391,7 @@ end: return ret; } +BT_HIDDEN struct bt_ctf_clock *bt_ctf_trace_get_clock(struct bt_ctf_trace *trace, int index) { @@ -395,6 +407,7 @@ end: return clock; } +BT_HIDDEN int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, struct bt_ctf_stream_class *stream_class) { @@ -656,6 +669,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace) { int ret; @@ -670,6 +684,7 @@ end: return ret; } +BT_HIDDEN struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class( struct bt_ctf_trace *trace, int index) { @@ -685,6 +700,7 @@ end: return stream_class; } +BT_HIDDEN struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( struct bt_ctf_trace *trace, uint32_t id) { @@ -713,6 +729,7 @@ end: return stream_class; } +BT_HIDDEN struct bt_ctf_clock *bt_ctf_trace_get_clock_by_name( struct bt_ctf_trace *trace, const char *name) { @@ -881,6 +898,7 @@ loop_next: g_string_append(context->string, "};\n\n"); } +BT_HIDDEN char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace) { char *metadata = NULL; @@ -924,6 +942,7 @@ end: return metadata; } +BT_HIDDEN enum bt_ctf_byte_order bt_ctf_trace_get_byte_order(struct bt_ctf_trace *trace) { enum bt_ctf_byte_order ret = BT_CTF_BYTE_ORDER_UNKNOWN; @@ -946,6 +965,7 @@ end: return ret; } +BT_HIDDEN int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace, enum bt_ctf_byte_order byte_order) { @@ -988,6 +1008,7 @@ end: return ret; } +BT_HIDDEN struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type( struct bt_ctf_trace *trace) { @@ -1003,6 +1024,7 @@ end: return field_type; } +BT_HIDDEN int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace, struct bt_ctf_field_type *packet_header_type) { diff --git a/include/Makefile.am b/include/Makefile.am index 02141d4b..1f3c3dab 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -28,7 +28,6 @@ babeltracectfirinclude_HEADERS = \ babeltrace/ctf-ir/event.h \ babeltrace/ctf-ir/event-class.h \ babeltrace/ctf-ir/stream-class.h \ - babeltrace/ctf-ir/trace.h \ babeltrace/ctf-ir/utils.h noinst_HEADERS = \ @@ -74,6 +73,7 @@ noinst_HEADERS = \ babeltrace/ctf-ir/validation-internal.h \ babeltrace/ctf-ir/field-path.h \ babeltrace/ctf-ir/packet.h \ + babeltrace/ctf-ir/trace.h \ babeltrace/ctf-writer/functor-internal.h \ babeltrace/trace-handle-internal.h \ babeltrace/compat/uuid.h \ diff --git a/include/babeltrace/ctf-ir/trace.h b/include/babeltrace/ctf-ir/trace.h index ee740039..60eeaaa2 100644 --- a/include/babeltrace/ctf-ir/trace.h +++ b/include/babeltrace/ctf-ir/trace.h @@ -32,6 +32,7 @@ #include #include +#include #include #ifdef __cplusplus @@ -56,7 +57,8 @@ struct bt_ctf_clock; * * Returns a new trace on success, NULL on error. */ -extern struct bt_ctf_trace *bt_ctf_trace_create(void); +BT_HIDDEN +struct bt_ctf_trace *bt_ctf_trace_create(void); /* * bt_ctf_trace_set_environment_field: sets an environment field to the @@ -78,7 +80,8 @@ extern struct bt_ctf_trace *bt_ctf_trace_create(void); * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_set_environment_field( +BT_HIDDEN +int bt_ctf_trace_set_environment_field( struct bt_ctf_trace *trace, const char *name, struct bt_value *value); @@ -96,7 +99,8 @@ extern int bt_ctf_trace_set_environment_field( * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_set_environment_field_string( +BT_HIDDEN +int bt_ctf_trace_set_environment_field_string( struct bt_ctf_trace *trace, const char *name, const char *value); @@ -114,7 +118,8 @@ extern int bt_ctf_trace_set_environment_field_string( * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_set_environment_field_integer( +BT_HIDDEN +int bt_ctf_trace_set_environment_field_integer( struct bt_ctf_trace *trace, const char *name, int64_t value); @@ -127,7 +132,8 @@ extern int bt_ctf_trace_set_environment_field_integer( * * Returns the environment field count, a negative value on error. */ -extern int bt_ctf_trace_get_environment_field_count( +BT_HIDDEN +int bt_ctf_trace_get_environment_field_count( struct bt_ctf_trace *trace); /* @@ -142,7 +148,8 @@ extern int bt_ctf_trace_get_environment_field_count( * * Returns the environment field's name, NULL on error. */ -extern const char * +BT_HIDDEN +const char * bt_ctf_trace_get_environment_field_name(struct bt_ctf_trace *trace, int index); @@ -159,7 +166,8 @@ bt_ctf_trace_get_environment_field_name(struct bt_ctf_trace *trace, * * Returns the environment field's object value, NULL on error. */ -extern struct bt_value * +BT_HIDDEN +struct bt_value * bt_ctf_trace_get_environment_field_value(struct bt_ctf_trace *trace, int index); @@ -176,7 +184,8 @@ bt_ctf_trace_get_environment_field_value(struct bt_ctf_trace *trace, * * Returns the environment field's object value, NULL on error. */ -extern struct bt_value * +BT_HIDDEN +struct bt_value * bt_ctf_trace_get_environment_field_value_by_name(struct bt_ctf_trace *trace, const char *name); @@ -191,7 +200,8 @@ bt_ctf_trace_get_environment_field_value_by_name(struct bt_ctf_trace *trace, * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace, +BT_HIDDEN +int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace, struct bt_ctf_clock *clock); /* @@ -202,7 +212,8 @@ extern int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace, * * Returns the clock count on success, a negative value on error. */ -extern int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace); +BT_HIDDEN +int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace); /* * bt_ctf_trace_get_clock: get a trace's clock at index. @@ -212,7 +223,8 @@ extern int bt_ctf_trace_get_clock_count(struct bt_ctf_trace *trace); * * Return a clock instance on success, NULL on error. */ -extern struct bt_ctf_clock *bt_ctf_trace_get_clock( +BT_HIDDEN +struct bt_ctf_clock *bt_ctf_trace_get_clock( struct bt_ctf_trace *trace, int index); /* @@ -225,7 +237,8 @@ extern struct bt_ctf_clock *bt_ctf_trace_get_clock( * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, +BT_HIDDEN +int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, struct bt_ctf_stream_class *stream_class); /* @@ -236,7 +249,8 @@ extern int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace, * * Returns the stream class count on success, a negative value on error. */ -extern int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace); +BT_HIDDEN +int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace); /* * bt_ctf_trace_get_stream_class: get a trace's stream class at index. @@ -246,7 +260,8 @@ extern int bt_ctf_trace_get_stream_class_count(struct bt_ctf_trace *trace); * * Return a stream class on success, NULL on error. */ -extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class( +BT_HIDDEN +struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class( struct bt_ctf_trace *trace, int index); /* @@ -257,7 +272,8 @@ extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class( * * Return a stream class on success, NULL on error. */ -extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( +BT_HIDDEN +struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( struct bt_ctf_trace *trace, uint32_t id); /* @@ -268,7 +284,8 @@ extern struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( * * Return a clock instance on success, NULL on error. */ -extern struct bt_ctf_clock *bt_ctf_trace_get_clock_by_name( +BT_HIDDEN +struct bt_ctf_clock *bt_ctf_trace_get_clock_by_name( struct bt_ctf_trace *trace, const char *name); /* @@ -281,7 +298,8 @@ extern struct bt_ctf_clock *bt_ctf_trace_get_clock_by_name( * * Returns the metadata string on success, NULL on error. */ -extern char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace); +BT_HIDDEN +char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace); /* * bt_ctf_trace_get_byte_order: get a trace's byte order. @@ -292,7 +310,8 @@ extern char *bt_ctf_trace_get_metadata_string(struct bt_ctf_trace *trace); * * Returns the trace's endianness, BT_CTF_BYTE_ORDER_UNKNOWN on error. */ -extern enum bt_ctf_byte_order bt_ctf_trace_get_byte_order( +BT_HIDDEN +enum bt_ctf_byte_order bt_ctf_trace_get_byte_order( struct bt_ctf_trace *trace); /* @@ -309,7 +328,8 @@ extern enum bt_ctf_byte_order bt_ctf_trace_get_byte_order( * to the CTF specification, is defined as "the byte order described in the * trace description". */ -extern int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace, +BT_HIDDEN +int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace, enum bt_ctf_byte_order byte_order); /* @@ -322,7 +342,8 @@ extern int bt_ctf_trace_set_byte_order(struct bt_ctf_trace *trace, * Returns the trace's packet header type (a structure) on success, NULL on * error. */ -extern struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type( +BT_HIDDEN +struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type( struct bt_ctf_trace *trace); /* @@ -335,7 +356,8 @@ extern struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type( * * Returns 0 on success, a negative value on error. */ -extern int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace, +BT_HIDDEN +int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace, struct bt_ctf_field_type *packet_header_type); #ifdef __cplusplus diff --git a/include/babeltrace/ctf-writer/writer.h b/include/babeltrace/ctf-writer/writer.h index 940736fe..8cfa094c 100644 --- a/include/babeltrace/ctf-writer/writer.h +++ b/include/babeltrace/ctf-writer/writer.h @@ -31,7 +31,6 @@ */ #include -#include #ifdef __cplusplus extern "C" { -- 2.34.1