From f7665a2e24d37f52e8f1d10959ad9943c9adf349 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 7 Jul 2015 16:37:47 -0400 Subject: [PATCH] Rename to separate the plug-in and component notions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- include/Makefile.am | 15 +++++---- .../plugin/notification/event-internal.h | 4 +-- .../babeltrace/plugin/notification/event.h | 18 +++++------ .../notification/notification-internal.h | 5 ++- .../plugin/notification/notification.h | 32 ++++++++++--------- .../plugin/notification/packet-internal.h | 0 .../babeltrace/plugin/notification/packet.h | 4 +-- 7 files changed, 40 insertions(+), 38 deletions(-) create mode 100644 include/babeltrace/plugin/notification/packet-internal.h diff --git a/include/Makefile.am b/include/Makefile.am index 01273ae4..f6b11bfc 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -39,17 +39,17 @@ babeltracectfirinclude_HEADERS = \ babeltraceplugininclude_HEADERS = \ babeltrace/plugin/plugin.h \ babeltrace/plugin/component.h \ - babeltrace/plugin/component-class.h \ babeltrace/plugin/component-factory.h \ babeltrace/plugin/source.h \ babeltrace/plugin/sink.h \ babeltrace/plugin/filter.h \ babeltrace/plugin/plugin-lib.h \ babeltrace/plugin/plugin-system.h \ + babeltrace/plugin/notification/eot.h \ babeltrace/plugin/notification/notification.h \ babeltrace/plugin/notification/event.h \ - babeltrace/plugin/notification/eot.h \ babeltrace/plugin/notification/iterator.h \ + babeltrace/plugin/notification/notification.h \ babeltrace/plugin/notification/packet.h noinst_HEADERS = \ @@ -109,12 +109,13 @@ noinst_HEADERS = \ babeltrace/compat/mman.h \ babeltrace/endian.h \ babeltrace/mmap-align.h \ - babeltrace/plugin/sink-internal.h \ - babeltrace/plugin/component-internal.h \ - babeltrace/plugin/component-class-internal.h \ babeltrace/plugin/component-factory-internal.h \ - babeltrace/plugin/source-internal.h \ + babeltrace/plugin/component-internal.h \ babeltrace/plugin/filter-internal.h \ + babeltrace/plugin/sink-internal.h \ + babeltrace/plugin/source-internal.h \ + babeltrace/plugin/notification/eot-internal.h \ babeltrace/plugin/notification/event-internal.h \ + babeltrace/plugin/notification/iterator-internal.h \ babeltrace/plugin/notification/notification-internal.h \ - babeltrace/plugin/notification/iterator-internal.h + babeltrace/plugin/notification/packet-internal.h diff --git a/include/babeltrace/plugin/notification/event-internal.h b/include/babeltrace/plugin/notification/event-internal.h index 442f6040..f9876bd8 100644 --- a/include/babeltrace/plugin/notification/event-internal.h +++ b/include/babeltrace/plugin/notification/event-internal.h @@ -39,8 +39,8 @@ extern "C" { #endif -struct bt_plugin_notification_event { - struct bt_plugin_notification parent; +struct bt_notification_event { + struct bt_notification parent; struct bt_ctf_trace *trace; struct bt_ctf_stream *stream; struct bt_ctf_event *event; diff --git a/include/babeltrace/plugin/notification/event.h b/include/babeltrace/plugin/notification/event.h index 39d3e03b..49505d0d 100644 --- a/include/babeltrace/plugin/notification/event.h +++ b/include/babeltrace/plugin/notification/event.h @@ -31,7 +31,7 @@ extern "C" { #endif -struct bt_plugin_notification; +struct bt_notification; struct bt_ctf_trace; struct bt_ctf_stream; struct bt_ctf_event; @@ -44,9 +44,9 @@ struct bt_ctf_event; * @param event The event * @returns An event notification instance * - * @see #bt_plugin_notification_type + * @see #bt_notification_type */ -extern struct bt_plugin_notification *bt_plugin_notification_event_create( +extern struct bt_notification *bt_notification_event_create( struct bt_ctf_trace *trace, struct bt_ctf_stream *stream, struct bt_ctf_event *event); @@ -58,8 +58,8 @@ extern struct bt_plugin_notification *bt_plugin_notification_event_create( * * @see #bt_ctf_trace */ -extern struct bt_ctf_trace *bt_plugin_notification_event_get_trace( - struct bt_plugin_notification *notification); +extern struct bt_ctf_trace *bt_notification_event_get_trace( + struct bt_notification *notification); /** * Get an event notification's associated stream. @@ -69,8 +69,8 @@ extern struct bt_ctf_trace *bt_plugin_notification_event_get_trace( * * @see #bt_ctf_stream */ -extern struct bt_ctf_stream *bt_plugin_notification_event_get_stream( - struct bt_plugin_notification *notification); +extern struct bt_ctf_stream *bt_notification_event_get_stream( + struct bt_notification *notification); /** * Get an event notification's event. @@ -80,8 +80,8 @@ extern struct bt_ctf_stream *bt_plugin_notification_event_get_stream( * * @see #bt_ctf_event */ -extern struct bt_ctf_event *bt_plugin_notification_event_get_event( - struct bt_plugin_notification *notification); +extern struct bt_ctf_event *bt_notification_event_get_event( + struct bt_notification *notification); #ifdef __cplusplus } diff --git a/include/babeltrace/plugin/notification/notification-internal.h b/include/babeltrace/plugin/notification/notification-internal.h index 92cea158..7b1a3954 100644 --- a/include/babeltrace/plugin/notification/notification-internal.h +++ b/include/babeltrace/plugin/notification/notification-internal.h @@ -30,15 +30,14 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { #endif -struct bt_plugin_notification { +struct bt_notification { struct bt_ctf_ref ref_count; - enum bt_plugin_notification_type type; + enum bt_notification_type type; }; #ifdef __cplusplus diff --git a/include/babeltrace/plugin/notification/notification.h b/include/babeltrace/plugin/notification/notification.h index bc21a396..3e3459b8 100644 --- a/include/babeltrace/plugin/notification/notification.h +++ b/include/babeltrace/plugin/notification/notification.h @@ -36,37 +36,39 @@ struct bt_notification; /** * Notification types. Unhandled notification types should be ignored. */ -enum bt_plugin_notification_type { - BT_PLUGIN_NOTIFICATION_TYPE_UNKNOWN = -1, +enum bt_notification_type { + BT_NOTIFICATION_TYPE_UNKNOWN = -1, /** Event delivery notification, see event.h */ - BT_PLUGIN_NOTIFICATION_TYPE_EVENT = 0, + BT_NOTIFICATION_TYPE_EVENT = 0, /** New stream packet notification, see packet.h */ - BT_PLUGIN_NOTIFICATION_TYPE_NEW_PACKET = 1, + BT_NOTIFICATION_TYPE_NEW_PACKET = 1, + + /** End of stream packet notification, see packet.h */ + BT_NOTIFICATION_TYPE_END_PACKET = 1, /** End of trace notification, see eot.h */ - BT_PLUGIN_NOTIFICATION_TYPE_EOT = 2, + BT_NOTIFICATION_TYPE_END_OF_TRACE = 2, }; /** * Get a notification's type. * * @param notification Notification instance - * @returns One of #bt_plugin_notification_type + * @returns One of #bt_notification_type */ -extern enum bt_plugin_notification_type bt_plugin_notification_get_type( - struct bt_plugin_notification *notification); +extern enum bt_notification_type bt_notification_get_type( + struct bt_notification *notification); /** - * Increments the reference count of \p notifiaction. + * Increments the reference count of \p notification. * * @param notification Notification of which to increment the reference count * - * @see bt_plugin_notification_put() + * @see bt_notification_put() */ -extern void bt_plugin_notification_get( - struct bt_plugin_notification *notification); +extern void bt_notification_get(struct bt_notification *notification); /** * Decrements the reference count of \p notification, destroying it when this @@ -74,10 +76,10 @@ extern void bt_plugin_notification_get( * * @param notification Notification of which to decrement the reference count * - * @see bt_plugin_notification_get() + * @see bt_notification_get() */ -extern void bt_plugin_notification_put( - struct bt_plugin_notification *notification); +extern void bt_notification_put( + struct bt_notification *notification); #ifdef __cplusplus } diff --git a/include/babeltrace/plugin/notification/packet-internal.h b/include/babeltrace/plugin/notification/packet-internal.h new file mode 100644 index 00000000..e69de29b diff --git a/include/babeltrace/plugin/notification/packet.h b/include/babeltrace/plugin/notification/packet.h index ab952fe5..1d4a5ce7 100644 --- a/include/babeltrace/plugin/notification/packet.h +++ b/include/babeltrace/plugin/notification/packet.h @@ -2,7 +2,7 @@ #define BABELTRACE_PLUGIN_NOTIFICATION_PACKET_H /* - * BabelTrace - Plug-in New Packet Notification + * BabelTrace - Plug-in Packet Notifications * * Copyright 2015 Jérémie Galarneau * @@ -35,4 +35,4 @@ extern "C" { } #endif -#endif /* BABELTRACE_PLUGIN_NOTIFICATION_NEW_PACKET_H */ +#endif /* BABELTRACE_PLUGIN_NOTIFICATION_PACKET_H */ -- 2.34.1