X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt.i;h=2300cee42f65c856576a88166f65fb8871a6b5c2;hb=7704a0af9f2275321f8294df8c02f8a299b3134e;hp=7b032b17bfbac3b3e994414b7ddf67b945007e59;hpb=78ab137bceddf4b918b37761c24d69466b4fa5b1;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/native_bt.i b/src/bindings/python/bt2/bt2/native_bt.i index 7b032b17..2300cee4 100644 --- a/src/bindings/python/bt2/bt2/native_bt.i +++ b/src/bindings/python/bt2/bt2/native_bt.i @@ -49,10 +49,13 @@ #include "common/assert.h" #include "py-common/py-common.h" -typedef const uint8_t *bt_uuid; +/* Used by some interface files */ +#include "native_bt_bt2_objects.h" +#include "native_bt_log_and_append_error.h" %} typedef int bt_bool; +typedef uint64_t bt_listener_id; /* For uint*_t/int*_t */ %include "stdint.i" @@ -136,6 +139,16 @@ typedef int bt_bool; SWIG_From_unsigned_SS_long_SS_long((uint64_t) (*$1))); } +/* Output argument typemap for initialized bt_boot output parameter (always appends) */ +%typemap(in, numinputs=0) (bt_bool *) (bt_bool temp) { + $1 = &temp; +} + +%typemap(argout) bt_bool * { + $result = SWIG_Python_AppendOutput(resultobj, + SWIG_From_bool(*$1)); +} + /* Input argument typemap for UUID bytes */ %typemap(in) bt_uuid { $1 = (unsigned char *) PyBytes_AsString($input); @@ -183,6 +196,10 @@ typedef int bt_bool; $result = $1; } +/* Native part initialization and finalization */ +void bt_bt2_init_from_bt2(void); +void bt_bt2_exit_handler(void); + /* * Define `__BT_IN_BABELTRACE_H` to allow specific headers to be * included. This remains defined as long as we don't include the main @@ -190,13 +207,14 @@ typedef int bt_bool; */ #define __BT_IN_BABELTRACE_H -/* Property enumeration */ -%include +/* Common types */ +%include /* Common function status codes */ %include /* Per-module interface files */ +%include "native_bt_autodisc.i" %include "native_bt_clock_class.i" %include "native_bt_clock_snapshot.i" %include "native_bt_component.i" @@ -214,6 +232,7 @@ typedef int bt_bool; %include "native_bt_logging.i" %include "native_bt_message.i" %include "native_bt_message_iterator.i" +%include "native_bt_mip.i" %include "native_bt_packet.i" %include "native_bt_plugin.i" %include "native_bt_port.i" @@ -224,3 +243,13 @@ typedef int bt_bool; %include "native_bt_trace_class.i" %include "native_bt_value.i" %include "native_bt_version.i" + +%{ + +/* + * This function is defined by SWIG. Declare here to avoid a + * -Wmissing-prototypes warning. + */ +PyObject *SWIG_init(void); + +%}