Add initial Python bindings documentation
[babeltrace.git] / src / autodisc / autodisc.h
index 09b209a41e50f25255acae99a9e698ccb6456d54..a038794950d698f6fcdbc1d1eec985b0f93ae469 100644 (file)
@@ -1,32 +1,20 @@
-#ifndef AUTODISC_AUTODISC_H
-#define AUTODISC_AUTODISC_H
-
 /*
- * Copyright (c) 2019 EfficiOS Inc. and Linux Foundation
+ * SPDX-License-Identifier: MIT
  *
- * 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.
+ * Copyright (C) 2019 EfficiOS Inc. and Linux Foundation
  */
 
+#ifndef AUTODISC_AUTODISC_H
+#define AUTODISC_AUTODISC_H
+
 #include <glib.h>
 
 #include <babeltrace2/babeltrace.h>
 
+#define __BT_IN_BABELTRACE_H
+#include <babeltrace2/func-status.h>
+#undef __BT_IN_BABELTRACE_H
+
 struct auto_source_discovery {
        /* Array of `struct auto_source_discovery_result *`. */
        GPtrArray *results;
@@ -59,22 +47,28 @@ struct auto_source_discovery_result {
        bt_value *original_input_indices;
 };
 
+typedef enum auto_source_discovery_status {
+       AUTO_SOURCE_DISCOVERY_STATUS_OK                 = __BT_FUNC_STATUS_OK,
+       AUTO_SOURCE_DISCOVERY_STATUS_ERROR              = __BT_FUNC_STATUS_ERROR,
+       AUTO_SOURCE_DISCOVERY_STATUS_MEMORY_ERROR       = __BT_FUNC_STATUS_MEMORY_ERROR,
+       AUTO_SOURCE_DISCOVERY_STATUS_INTERRUPTED        = __BT_FUNC_STATUS_INTERRUPTED,
+} auto_source_discovery_status;
+
 int auto_source_discovery_init(struct auto_source_discovery *auto_disc);
 void auto_source_discovery_fini(struct auto_source_discovery *auto_disc);
 
 /*
  * Given `inputs` a list of strings, query source component classes to discover
  * which source components should be instantiated to deal with these inputs.
- *
- * Return 0 if execution completed successfully, < 0 otherwise.
  */
 
-int auto_discover_source_components(
+auto_source_discovery_status auto_discover_source_components(
                const bt_value *inputs,
                const bt_plugin **plugins,
                size_t plugin_count,
                const char *component_class_restrict,
                enum bt_logging_level log_level,
-               struct auto_source_discovery *auto_disc);
+               struct auto_source_discovery *auto_disc,
+               const bt_interrupter *interrupter);
 
 #endif /* AUTODISC_AUTODISC_H */
This page took 0.024389 seconds and 4 git commands to generate.