Update Python bindings and tests to match the latest API
[babeltrace.git] / bindings / python / bt2 / native_btnotification.i
1 /*
2 * The MIT License (MIT)
3 *
4 * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25 /* Type */
26 struct bt_notification;
27
28 /* Notification type */
29 enum bt_notification_type {
30 BT_NOTIFICATION_TYPE_SENTINEL = -1000,
31 BT_NOTIFICATION_TYPE_UNKNOWN = -1,
32 BT_NOTIFICATION_TYPE_ALL = -2,
33 BT_NOTIFICATION_TYPE_EVENT = 0,
34 BT_NOTIFICATION_TYPE_INACTIVITY = 1,
35 BT_NOTIFICATION_TYPE_STREAM_BEGIN = 2,
36 BT_NOTIFICATION_TYPE_STREAM_END = 3,
37 BT_NOTIFICATION_TYPE_PACKET_BEGIN = 4,
38 BT_NOTIFICATION_TYPE_PACKET_END = 5,
39 BT_NOTIFICATION_TYPE_DISCARDED_EVENTS = 6,
40 BT_NOTIFICATION_TYPE_DISCARDED_PACKETS = 7,
41 };
42
43 /* General functions */
44 enum bt_notification_type bt_notification_get_type(
45 struct bt_notification *notification);
46
47 /* Event notification functions */
48 struct bt_notification *bt_notification_event_create(
49 struct bt_ctf_event *event,
50 struct bt_clock_class_priority_map *clock_class_priority_map);
51 struct bt_ctf_event *bt_notification_event_get_event(
52 struct bt_notification *notification);
53 struct bt_clock_class_priority_map *
54 bt_notification_event_get_clock_class_priority_map(
55 struct bt_notification *notification);
56
57 /* Inactivity notification functions */
58 struct bt_notification *bt_notification_inactivity_create(
59 struct bt_clock_class_priority_map *clock_class_priority_map);
60 struct bt_clock_class_priority_map *
61 bt_notification_inactivity_get_clock_class_priority_map(
62 struct bt_notification *notification);
63 struct bt_ctf_clock_value *bt_notification_inactivity_get_clock_value(
64 struct bt_notification *notification,
65 struct bt_ctf_clock_class *clock_class);
66 int bt_notification_inactivity_set_clock_value(
67 struct bt_notification *notification,
68 struct bt_ctf_clock_value *clock_value);
69
70 /* Packet notification functions */
71 struct bt_notification *bt_notification_packet_begin_create(
72 struct bt_ctf_packet *packet);
73 struct bt_notification *bt_notification_packet_end_create(
74 struct bt_ctf_packet *packet);
75 struct bt_ctf_packet *bt_notification_packet_begin_get_packet(
76 struct bt_notification *notification);
77 struct bt_ctf_packet *bt_notification_packet_end_get_packet(
78 struct bt_notification *notification);
79
80 /* Stream notification functions */
81 struct bt_notification *bt_notification_stream_begin_create(
82 struct bt_ctf_stream *stream);
83 struct bt_notification *bt_notification_stream_end_create(
84 struct bt_ctf_stream *stream);
85 struct bt_ctf_stream *bt_notification_stream_begin_get_stream(
86 struct bt_notification *notification);
87 struct bt_ctf_stream *bt_notification_stream_end_get_stream(
88 struct bt_notification *notification);
89
90 /* Discarded packets notification functions */
91 struct bt_ctf_clock_value *
92 bt_notification_discarded_packets_get_begin_clock_value(
93 struct bt_notification *notification);
94 struct bt_ctf_clock_value *
95 bt_notification_discarded_packets_get_end_clock_value(
96 struct bt_notification *notification);
97 int64_t bt_notification_discarded_packets_get_count(
98 struct bt_notification *notification);
99 struct bt_ctf_stream *bt_notification_discarded_packets_get_stream(
100 struct bt_notification *notification);
101
102 /* Discarded events notification functions */
103 struct bt_ctf_clock_value *
104 bt_notification_discarded_events_get_begin_clock_value(
105 struct bt_notification *notification);
106 struct bt_ctf_clock_value *
107 bt_notification_discarded_events_get_end_clock_value(
108 struct bt_notification *notification);
109 int64_t bt_notification_discarded_events_get_count(
110 struct bt_notification *notification);
111 struct bt_ctf_stream *bt_notification_discarded_events_get_stream(
112 struct bt_notification *notification);
This page took 0.03261 seconds and 5 git commands to generate.