From 08c22d055e49b0f6ba55a1a8a2684372a62902cd Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 10 Feb 2012 14:18:26 -0500 Subject: [PATCH] struct bt_context is opaque Signed-off-by: Mathieu Desnoyers --- include/Makefile.am | 1 + include/babeltrace/context.h | 20 ++------------------ lib/callbacks.c | 1 + lib/context.c | 1 + lib/iterator.c | 1 + lib/trace-handle.c | 1 + 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/include/Makefile.am b/include/Makefile.am index 1dfa218b..5979b382 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -12,6 +12,7 @@ noinst_HEADERS = \ babeltrace/bitfield.h \ babeltrace/callbacks-internal.h \ babeltrace/compiler.h \ + babeltrace/context-internal.h \ babeltrace/iterator-internal.h \ babeltrace/list.h \ babeltrace/prio_heap.h \ diff --git a/include/babeltrace/context.h b/include/babeltrace/context.h index 738a8432..e5d9a424 100644 --- a/include/babeltrace/context.h +++ b/include/babeltrace/context.h @@ -23,24 +23,8 @@ * included in all copies or substantial portions of the Software. */ -struct trace_collection; -struct GHashTable; - -/* - * The context represents the object in which a trace_collection is - * open. As long as this structure is allocated, the trace_collection is - * open and the traces it contains can be read and seeked by the - * iterators and callbacks. - * - * It has to be created with the bt_context_create() function and - * destroyed by calling one more bt_context_put() than bt_context_get() - */ -struct bt_context { - struct trace_collection *tc; - GHashTable *trace_handles; - int refcount; - int last_trace_handle_id; -}; +/* struct bt_context is opaque to the user */ +struct bt_context; /* * bt_context_create : create a Babeltrace context diff --git a/lib/callbacks.c b/lib/callbacks.c index aae8196f..f5c4d105 100644 --- a/lib/callbacks.c +++ b/lib/callbacks.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/context.c b/lib/context.c index c0479e1b..507e90ab 100644 --- a/lib/context.c +++ b/lib/context.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/lib/iterator.c b/lib/iterator.c index 3a07c1ab..414f559e 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/trace-handle.c b/lib/trace-handle.c index 73c137b3..5a8a2192 100644 --- a/lib/trace-handle.c +++ b/lib/trace-handle.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include -- 2.34.1