Notification interfaces
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 19 May 2015 16:35:08 +0000 (12:35 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 16:54:31 +0000 (12:54 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/babeltrace/plugin/notification/eot.h
include/babeltrace/plugin/notification/event.h
include/babeltrace/plugin/notification/iterator.h
include/babeltrace/plugin/notification/notification.h
include/babeltrace/plugin/notification/packet.h
include/babeltrace/plugin/plugin-internal.h

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d33476c8c88ac4382feffe331ac1df7de5b7434a 100644 (file)
@@ -0,0 +1,38 @@
+#ifndef BABELTRACE_PLUGIN_NOTIFICATION_EOT_H
+#define BABELTRACE_PLUGIN_NOTIFICATION_EOT_H
+
+/*
+ * BabelTrace - Plug-in End of Trace Notification
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_PLUGIN_NOTIFICATION_EOT_H */
index 93d1d68afed956d6f8c4f6c8e5a91d695ec9d640..39d3e03be1c1d0e94656ef54ac52c3b5cfab5445 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE_PLUGIN_NOTIFICATION_EVENT_H
 
 /*
- * BabelTrace - Plug-in Notification
+ * BabelTrace - Plug-in Event Notification
  *
  * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
  * SOFTWARE.
  */
 
-#include <stdint.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct bt_notification;
+struct bt_plugin_notification;
+struct bt_ctf_trace;
+struct bt_ctf_stream;
 struct bt_ctf_event;
 
-struct bt_ctf_event *bt_plugin_notification_event_get_event(
+/**
+ * Create an event notification.
+ *
+ * @param trace                        The event's trace
+ * @param stream               The event's stream
+ * @param event                        The event
+ * @returns                    An event notification instance
+ *
+ * @see #bt_plugin_notification_type
+ */
+extern struct bt_plugin_notification *bt_plugin_notification_event_create(
+               struct bt_ctf_trace *trace, struct bt_ctf_stream *stream,
+               struct bt_ctf_event *event);
+
+/**
+ * Get an event notification's associated trace.
+ *
+ * @param notification Event notification instance
+ * @returns            A trace instance
+ *
+ * @see #bt_ctf_trace
+ */
+extern struct bt_ctf_trace *bt_plugin_notification_event_get_trace(
+               struct bt_plugin_notification *notification);
+
+/**
+ * Get an event notification's associated stream.
+ *
+ * @param notification Event notification instance
+ * @returns            A stream instance
+ *
+ * @see #bt_ctf_stream
+ */
+extern struct bt_ctf_stream *bt_plugin_notification_event_get_stream(
+               struct bt_plugin_notification *notification);
+
+/**
+ * Get an event notification's event.
+ *
+ * @param notification Event notification instance
+ * @returns            An event instance
+ *
+ * @see #bt_ctf_event
+ */
+extern struct bt_ctf_event *bt_plugin_notification_event_get_event(
                struct bt_plugin_notification *notification);
 
 #ifdef __cplusplus
index 9c968f52f9fdf37428072f3492c67dcefbbdb22f..18ee4f625a0d818013affa723d0fc0b5cf5f6757 100644 (file)
@@ -77,7 +77,7 @@ enum bt_notification_iterator_seek_type {
  * This functions will <b>not</b> advance the cursor's position.
  * The returned notification's reference count is already incremented.
  *
- * @param Iterator     Iterator instance
+ * @param iterator     Iterator instance
  * @returns            Returns a bt_notification instance
  *
  * @see bt_notification_put()
index a15fde6a99f24f154888bb0c8662a81316dc31a7..bc21a39623c9b607abc3ae081664a8334bfaf0b8 100644 (file)
@@ -27,8 +27,6 @@
  * SOFTWARE.
  */
 
-#include <stdint.h>
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -57,7 +55,7 @@ enum bt_plugin_notification_type {
  * @param notification Notification instance
  * @returns            One of #bt_plugin_notification_type
  */
-enum bt_plugin_notification_type bt_plugin_notification_get_type(
+extern enum bt_plugin_notification_type bt_plugin_notification_get_type(
                struct bt_plugin_notification *notification);
 
 /**
@@ -67,7 +65,8 @@ enum bt_plugin_notification_type bt_plugin_notification_get_type(
  *
  * @see bt_plugin_notification_put()
  */
-void bt_plugin_notification_get(struct bt_plugin_notification *notification);
+extern void bt_plugin_notification_get(
+               struct bt_plugin_notification *notification);
 
 /**
  * Decrements the reference count of \p notification, destroying it when this
@@ -77,7 +76,8 @@ void bt_plugin_notification_get(struct bt_plugin_notification *notification);
  *
  * @see bt_plugin_notification_get()
  */
-void bt_plugin_notification_put(struct bt_plugin_notification *notification);
+extern void bt_plugin_notification_put(
+               struct bt_plugin_notification *notification);
 
 #ifdef __cplusplus
 }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..ab952fe52a26856b6ef4dd86e3629c5aca6c21ad 100644 (file)
@@ -0,0 +1,38 @@
+#ifndef BABELTRACE_PLUGIN_NOTIFICATION_PACKET_H
+#define BABELTRACE_PLUGIN_NOTIFICATION_PACKET_H
+
+/*
+ * BabelTrace - Plug-in New Packet Notification
+ *
+ * Copyright 2015 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Author: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_PLUGIN_NOTIFICATION_NEW_PACKET_H */
index 83654c17d54e436e14b71c4f43d02d64b168f584..a05053182705d082892159443b5ebe635c5a8b58 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/ctf-writer/ref-internal.h>
 #include <glib.h>
 
 #ifdef __cplusplus
@@ -37,6 +38,7 @@ extern "C" {
 struct bt_notification;
 
 struct bt_plugin {
+       struct bt_ctf_ref ref_count;
        GString *name;
        enum bt_plugin_type type;
 
This page took 0.027748 seconds and 4 git commands to generate.