Fix a few include warnings
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 Apr 2017 07:24:03 +0000 (03:24 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:40 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/Makefile.am
include/babeltrace/graph/component-class.h
include/babeltrace/graph/component-status.h [new file with mode: 0644]
include/babeltrace/graph/component.h
tests/lib/test_plugin.c

index 8aef2965458b98e6a45b4d815b63b5ce4b0552ca..cac65bb1b0995414f8af0da53f3fe3e083aac49b 100644 (file)
@@ -43,6 +43,7 @@ babeltracegraphinclude_HEADERS = \
        babeltrace/graph/component-filter.h \
        babeltrace/graph/component-sink.h \
        babeltrace/graph/component-source.h \
+       babeltrace/graph/component-status.h \
        babeltrace/graph/component.h \
        babeltrace/graph/connection.h \
        babeltrace/graph/graph.h \
index c2d59da6de656a159d134175609cc5dcfcf157ed..fcb171fc44f4629c8a6c2f1ea6a7f60b3b512211 100644 (file)
@@ -25,8 +25,9 @@
  * SOFTWARE.
  */
 
-#include <babeltrace/graph/component.h>
 #include <stdint.h>
+#include <babeltrace/graph/component-status.h>
+#include <babeltrace/graph/notification-iterator.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/include/babeltrace/graph/component-status.h b/include/babeltrace/graph/component-status.h
new file mode 100644 (file)
index 0000000..dca7e8a
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef BABELTRACE_COMPONENT_COMPONENT_STATUS_H
+#define BABELTRACE_COMPONENT_COMPONENT_STATUS_H
+
+/*
+ * BabelTrace - Babeltrace Component Interface
+ *
+ * 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
+
+/**
+ * Status code. Errors are always negative.
+ */
+enum bt_component_status {
+       /** No error, okay. */
+       BT_COMPONENT_STATUS_OK                          = 0,
+       /** No more work to be done by this component. **/
+       BT_COMPONENT_STATUS_END                         = 1,
+       /**
+        * Component can't process a notification at this time
+        * (e.g. would block), try again later.
+        */
+       BT_COMPONENT_STATUS_AGAIN                       = 2,
+       /** Refuse port connection. */
+       BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION      = 3,
+       /** General error. */
+       BT_COMPONENT_STATUS_ERROR                       = -1,
+       /** Unsupported component feature. */
+       BT_COMPONENT_STATUS_UNSUPPORTED                 = -2,
+       /** Invalid arguments. */
+       BT_COMPONENT_STATUS_INVALID                     = -3,
+       /** Memory allocation failure. */
+       BT_COMPONENT_STATUS_NOMEM                       = -4,
+       /** Element not found. */
+       BT_COMPONENT_STATUS_NOT_FOUND                   = -5,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BABELTRACE_COMPONENT_COMPONENT_STATUS_H */
index 74f38345a78b73de128091aaec35bed716c408ce..9dac6dec66a117db841d56d97002e718726349bf 100644 (file)
@@ -27,6 +27,7 @@
  * SOFTWARE.
  */
 
+#include <babeltrace/graph/component-status.h>
 #include <babeltrace/graph/component-class.h>
 #include <babeltrace/graph/notification-iterator.h>
 #include <babeltrace/values.h>
@@ -42,33 +43,6 @@ struct bt_component;
 struct bt_value;
 struct bt_port;
 
-/**
- * Status code. Errors are always negative.
- */
-enum bt_component_status {
-       /** No error, okay. */
-       BT_COMPONENT_STATUS_OK                          = 0,
-       /** No more work to be done by this component. **/
-       BT_COMPONENT_STATUS_END                         = 1,
-       /**
-        * Component can't process a notification at this time
-        * (e.g. would block), try again later.
-        */
-       BT_COMPONENT_STATUS_AGAIN                       = 2,
-       /** Refuse port connection. */
-       BT_COMPONENT_STATUS_REFUSE_PORT_CONNECTION      = 3,
-       /** General error. */
-       BT_COMPONENT_STATUS_ERROR                       = -1,
-       /** Unsupported component feature. */
-       BT_COMPONENT_STATUS_UNSUPPORTED                 = -2,
-       /** Invalid arguments. */
-       BT_COMPONENT_STATUS_INVALID                     = -3,
-       /** Memory allocation failure. */
-       BT_COMPONENT_STATUS_NOMEM                       = -4,
-       /** Element not found. */
-       BT_COMPONENT_STATUS_NOT_FOUND                   = -5,
-};
-
 /**
  * Create an instance of a component from a component class.
  *
index 77e7840fd4cbfd546dd155160b5ef2714b0eb2f3..1b576104c09339e7a3ca3b17d88413fbf22022e8 100644 (file)
@@ -22,6 +22,7 @@
 #include <babeltrace/plugin/plugin.h>
 #include <babeltrace/ref.h>
 #include <babeltrace/values.h>
+#include <babeltrace/graph/component.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
This page took 0.027296 seconds and 4 git commands to generate.