X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bttrace.i;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bttrace.i;h=3f78f450b446834c126345765fac28678775fddd;hb=50842bdc4c21f3de2b63e29cdac730af8b6dcca6;hp=8947ae07ac6b46fb98b9c70685df5d7400d35f32;hpb=6606e9c14a9fc2c1b3edd81cb52c5bb15f07f855;p=babeltrace.git diff --git a/bindings/python/bt2/bt2/native_bttrace.i b/bindings/python/bt2/bt2/native_bttrace.i index 8947ae07..3f78f450 100644 --- a/bindings/python/bt2/bt2/native_bttrace.i +++ b/bindings/python/bt2/bt2/native_bttrace.i @@ -23,70 +23,70 @@ */ /* Type */ -struct bt_ctf_trace; +struct bt_trace; /* Functions */ -struct bt_ctf_trace *bt_ctf_trace_create(void); -const char *bt_ctf_trace_get_name(struct bt_ctf_trace *trace_class); -int bt_ctf_trace_set_name(struct bt_ctf_trace *trace_class, +struct bt_trace *bt_trace_create(void); +const char *bt_trace_get_name(struct bt_trace *trace_class); +int bt_trace_set_name(struct bt_trace *trace_class, const char *name); -enum bt_ctf_byte_order bt_ctf_trace_get_native_byte_order( - struct bt_ctf_trace *trace_class); -int bt_ctf_trace_set_native_byte_order(struct bt_ctf_trace *trace_class, - enum bt_ctf_byte_order native_byte_order); -BTUUID bt_ctf_trace_get_uuid( - struct bt_ctf_trace *trace_class); -int bt_ctf_trace_set_uuid(struct bt_ctf_trace *trace_class, +enum bt_byte_order bt_trace_get_native_byte_order( + struct bt_trace *trace_class); +int bt_trace_set_native_byte_order(struct bt_trace *trace_class, + enum bt_byte_order native_byte_order); +BTUUID bt_trace_get_uuid( + struct bt_trace *trace_class); +int bt_trace_set_uuid(struct bt_trace *trace_class, BTUUID uuid); -int64_t bt_ctf_trace_get_environment_field_count( - struct bt_ctf_trace *trace_class); +int64_t bt_trace_get_environment_field_count( + struct bt_trace *trace_class); const char * -bt_ctf_trace_get_environment_field_name_by_index( - struct bt_ctf_trace *trace_class, uint64_t index); +bt_trace_get_environment_field_name_by_index( + struct bt_trace *trace_class, uint64_t index); struct bt_value * -bt_ctf_trace_get_environment_field_value_by_index(struct bt_ctf_trace *trace_class, +bt_trace_get_environment_field_value_by_index(struct bt_trace *trace_class, uint64_t index); struct bt_value * -bt_ctf_trace_get_environment_field_value_by_name( - struct bt_ctf_trace *trace_class, const char *name); -int bt_ctf_trace_set_environment_field( - struct bt_ctf_trace *trace_class, const char *name, +bt_trace_get_environment_field_value_by_name( + struct bt_trace *trace_class, const char *name); +int bt_trace_set_environment_field( + struct bt_trace *trace_class, const char *name, struct bt_value *value); -struct bt_ctf_field_type *bt_ctf_trace_get_packet_header_type( - struct bt_ctf_trace *trace_class); -int bt_ctf_trace_set_packet_header_type(struct bt_ctf_trace *trace_class, - struct bt_ctf_field_type *packet_header_type); -int64_t bt_ctf_trace_get_clock_class_count( - struct bt_ctf_trace *trace_class); -struct bt_ctf_clock_class *bt_ctf_trace_get_clock_class_by_index( - struct bt_ctf_trace *trace_class, uint64_t index); -struct bt_ctf_clock_class *bt_ctf_trace_get_clock_class_by_name( - struct bt_ctf_trace *trace_class, const char *name); -int bt_ctf_trace_add_clock_class(struct bt_ctf_trace *trace_class, - struct bt_ctf_clock_class *clock_class); -int64_t bt_ctf_trace_get_stream_class_count( - struct bt_ctf_trace *trace_class); -struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_index( - struct bt_ctf_trace *trace_class, uint64_t index); -struct bt_ctf_stream_class *bt_ctf_trace_get_stream_class_by_id( - struct bt_ctf_trace *trace_class, uint64_t id); -int bt_ctf_trace_add_stream_class(struct bt_ctf_trace *trace_class, - struct bt_ctf_stream_class *stream_class); -int64_t bt_ctf_trace_get_stream_count(struct bt_ctf_trace *trace_class); -struct bt_ctf_stream *bt_ctf_trace_get_stream_by_index( - struct bt_ctf_trace *trace_class, uint64_t index); -int bt_ctf_trace_is_static(struct bt_ctf_trace *trace_class); -int bt_ctf_trace_set_is_static(struct bt_ctf_trace *trace_class); +struct bt_field_type *bt_trace_get_packet_header_type( + struct bt_trace *trace_class); +int bt_trace_set_packet_header_type(struct bt_trace *trace_class, + struct bt_field_type *packet_header_type); +int64_t bt_trace_get_clock_class_count( + struct bt_trace *trace_class); +struct bt_clock_class *bt_trace_get_clock_class_by_index( + struct bt_trace *trace_class, uint64_t index); +struct bt_clock_class *bt_trace_get_clock_class_by_name( + struct bt_trace *trace_class, const char *name); +int bt_trace_add_clock_class(struct bt_trace *trace_class, + struct bt_clock_class *clock_class); +int64_t bt_trace_get_stream_class_count( + struct bt_trace *trace_class); +struct bt_stream_class *bt_trace_get_stream_class_by_index( + struct bt_trace *trace_class, uint64_t index); +struct bt_stream_class *bt_trace_get_stream_class_by_id( + struct bt_trace *trace_class, uint64_t id); +int bt_trace_add_stream_class(struct bt_trace *trace_class, + struct bt_stream_class *stream_class); +int64_t bt_trace_get_stream_count(struct bt_trace *trace_class); +struct bt_stream *bt_trace_get_stream_by_index( + struct bt_trace *trace_class, uint64_t index); +int bt_trace_is_static(struct bt_trace *trace_class); +int bt_trace_set_is_static(struct bt_trace *trace_class); /* Helper functions for Python */ %{ -void trace_is_static_listener(struct bt_ctf_trace *trace, void *py_callable) +void trace_is_static_listener(struct bt_trace *trace, void *py_callable) { PyObject *py_trace_ptr = NULL; PyObject *py_res = NULL; py_trace_ptr = SWIG_NewPointerObj(SWIG_as_voidptr(trace), - SWIGTYPE_p_bt_ctf_trace, 0); + SWIGTYPE_p_bt_trace, 0); if (!py_trace_ptr) { BT_LOGF_STR("Failed to create a SWIG pointer object."); abort(); @@ -98,7 +98,7 @@ void trace_is_static_listener(struct bt_ctf_trace *trace, void *py_callable) Py_DECREF(py_res); } -void trace_listener_removed(struct bt_ctf_trace *trace, void *py_callable) +void trace_listener_removed(struct bt_trace *trace, void *py_callable) { assert(py_callable); Py_DECREF(py_callable); @@ -107,12 +107,12 @@ void trace_listener_removed(struct bt_ctf_trace *trace, void *py_callable) static int bt_py3_trace_add_is_staitc_listener(unsigned long long trace_addr, PyObject *py_callable) { - struct bt_ctf_trace *trace = (void *) trace_addr; + struct bt_trace *trace = (void *) trace_addr; int ret = 0; assert(trace); assert(py_callable); - ret = bt_ctf_trace_add_is_static_listener(trace, + ret = bt_trace_add_is_static_listener(trace, trace_is_static_listener, trace_listener_removed, py_callable); if (ret >= 0) { Py_INCREF(py_callable);