Move to kernel style SPDX license identifiers
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_message_iterator.i
CommitLineData
6945df9a 1/*
0235b0db 2 * SPDX-License-Identifier: MIT
6945df9a
SM
3 *
4 * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
6945df9a
SM
5 */
6
e803df70
SM
7/* Output argument typemap for message_iterator (always appends) */
8%typemap(in, numinputs=0)
9a2c8b8e
PP
9 (bt_message_iterator **)
10 (bt_message_iterator *temp_msg_iter = NULL) {
e803df70
SM
11 $1 = &temp_msg_iter;
12}
13
14%typemap(argout)
9a2c8b8e 15 (bt_message_iterator **) {
e803df70
SM
16 if (*$1) {
17 /* SWIG_Python_AppendOutput() steals the created object */
18 $result = SWIG_Python_AppendOutput($result,
19 SWIG_NewPointerObj(SWIG_as_voidptr(*$1),
9a2c8b8e 20 SWIGTYPE_p_bt_message_iterator, 0));
e803df70
SM
21 } else {
22 /* SWIG_Python_AppendOutput() steals Py_None */
23 Py_INCREF(Py_None);
24 $result = SWIG_Python_AppendOutput($result, Py_None);
25 }
26}
27
d24d5663 28%include <babeltrace2/graph/message-iterator.h>
d6bb425c 29%include <babeltrace2/graph/self-message-iterator.h>
6945df9a
SM
30
31/* Helper functions for Python */
32%{
4212232c 33#include "native_bt_message_iterator.i.h"
6945df9a
SM
34%}
35
9a2c8b8e
PP
36bt_message_iterator_create_from_message_iterator_status
37bt_bt2_message_iterator_create_from_message_iterator(
e803df70
SM
38 bt_self_message_iterator *self_msg_iter,
39 bt_self_component_port_input *input_port,
9a2c8b8e
PP
40 bt_message_iterator **message_iterator);
41bt_message_iterator_create_from_sink_component_status
42bt_bt2_message_iterator_create_from_sink_component(
e803df70
SM
43 bt_self_component_sink *self_comp,
44 bt_self_component_port_input *input_port,
9a2c8b8e 45 bt_message_iterator **message_iterator);
d24d5663 46PyObject *bt_bt2_get_user_component_from_user_msg_iter(
51f97fcc 47 bt_self_message_iterator *self_message_iterator);
d24d5663 48PyObject *bt_bt2_self_component_port_input_get_msg_range(
9a2c8b8e 49 bt_message_iterator *iter);
This page took 0.056248 seconds and 4 git commands to generate.