fix : callback type, doc and links to libbabeltrace
authorJulien Desfossez <julien.desfossez@efficios.com>
Fri, 17 Feb 2012 17:00:01 +0000 (12:00 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 17 Feb 2012 17:00:01 +0000 (12:00 -0500)
Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/babeltrace/babeltrace.h
include/babeltrace/callbacks-internal.h
include/babeltrace/ctf/events.h
lib/Makefile.am
lib/callbacks.c
lib/ctf-events.c

index 4d94a5628117b596d361fddb128bd9673aef6ebf..c77ea7827614cb4d89c84d5c05f8c7c22a695bb2 100644 (file)
@@ -37,11 +37,6 @@ enum bt_cb_ret {
        BT_CB_ERROR_CONTINUE    = 3,
 };
 
-struct bt_ctf_data {
-       struct ctf_stream_event *event;
-       struct ctf_stream *stream;
-};
-
 /*
  * Receives a variable number of strings as parameter, ended with NULL.
  */
@@ -90,7 +85,7 @@ void babeltrace_dependencies_destroy(struct bt_dependencies *dep);
  */
 int bt_iter_add_callback(struct bt_iter *iter,
                bt_intern_str event, void *private_data, int flags,
-               enum bt_cb_ret (*callback)(struct bt_ctf_data *ctf_data,
+               enum bt_cb_ret (*callback)(struct bt_ctf_event *ctf_data,
                                           void *caller_data),
                struct bt_dependencies *depends,
                struct bt_dependencies *weak_depends,
index c9aeccdf3ecbab8a63958fb840334cf7c152144a..c125706504c0bd7b450627742c7627e058e6e15a 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <glib.h>
+#include <babeltrace/ctf/events.h>
 
 struct bt_callback {
        int prio;               /* Callback order priority. Lower first. Dynamically assigned from dependency graph. */
@@ -30,7 +31,7 @@ struct bt_callback {
        struct bt_dependencies *depends;
        struct bt_dependencies *weak_depends;
        struct bt_dependencies *provides;
-       enum bt_cb_ret (*callback)(struct bt_ctf_data *ctf_data,
+       enum bt_cb_ret (*callback)(struct bt_ctf_event *ctf_data,
                                   void *private_data);
 };
 
index eb644125c69a9875b0875c9f60aa7fecd5ad5824..f2ef22dfbb6491c1ac66aa08919de5419dfc1ba1 100644 (file)
@@ -90,9 +90,9 @@ const char *bt_ctf_event_name(struct bt_ctf_event *event);
 uint64_t bt_ctf_get_timestamp(struct bt_ctf_event *event);
 
 /*
- * bt_ctf_get_field_list: returns an array of *def pointing to each field of
- * the event. The array is NULL terminated.
- * On error : return NULL.
+ * bt_ctf_get_field_list: set list pointer to an array of definition
+ * pointers and set count to the number of elements in the array.
+ * Return 0 on success and a negative value on error.
  */
 int bt_ctf_get_field_list(struct bt_ctf_event *event,
                struct definition *scope,
index 079ed13eaa2f1ce1ef2a8a62ba1831db8b114f6c..0c421cdb36d322c3bf14eb131513330d060397ea 100644 (file)
@@ -14,4 +14,6 @@ libbabeltrace_la_SOURCES = babeltrace.c \
 
 libbabeltrace_la_LIBADD = \
        $(top_builddir)/types/libbabeltrace_types.la \
+       $(top_builddir)/formats/libbabeltrace_registry.la \
+       $(top_builddir)/formats/ctf/libctf.la \
        prio_heap/libprio_heap.la
index 0dfb19c277c62112a54b4db58074d1c9fffdfdb2..fa212c9191e95fc5f5371201bf7883d22d9df05e 100644 (file)
@@ -25,6 +25,7 @@
 #include <babeltrace/context-internal.h>
 #include <babeltrace/ctf-ir/metadata.h>
 #include <babeltrace/iterator-internal.h>
+#include <babeltrace/ctf/events.h>
 #include <inttypes.h>
 
 static
@@ -62,7 +63,7 @@ struct bt_dependencies *babeltrace_dependencies_create(const char *first, ...)
  */
 int bt_iter_add_callback(struct bt_iter *iter,
                bt_intern_str event, void *private_data, int flags,
-               enum bt_cb_ret (*callback)(struct bt_ctf_data *ctf_data,
+               enum bt_cb_ret (*callback)(struct bt_ctf_event *ctf_data,
                                           void *private_data),
                struct bt_dependencies *depends,
                struct bt_dependencies *weak_depends,
@@ -177,7 +178,7 @@ void process_callbacks(struct bt_iter *iter,
        struct bt_callback *cb;
        int i;
        enum bt_cb_ret ret;
-       struct bt_ctf_data ctf_data;
+       struct bt_ctf_event ctf_data;
 
        ctf_data.event = extract_ctf_stream_event(stream);
        ctf_data.stream = stream;
index dbb0cd6639fd9144ee648af056751e8d6c060e6a..70513bfaba102c4bf10a4913b80468d011d3599f 100644 (file)
@@ -267,7 +267,7 @@ uint64_t bt_ctf_get_uint64(struct definition *field)
        return ret;
 }
 
-int64_t bt_ctf_get_signed_int64(struct definition *field)
+int64_t bt_ctf_get_int64(struct definition *field)
 {
        int ret = 0;
 
This page took 0.037426 seconds and 4 git commands to generate.