lib: rename all `*_STATUS_OVERFLOW` -> `*_STATUS_OVERFLOW_ERROR`
[babeltrace.git] / src / bindings / python / bt2 / bt2 / __init__.py.in
CommitLineData
81447b5b
PP
1# The MIT License (MIT)
2#
811644b8 3# Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
81447b5b
PP
4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to deal
7# in the Software without restriction, including without limitation the rights
8# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9# copies of the Software, and to permit persons to whom the Software is
10# furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included in
13# all copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21# THE SOFTWARE.
22
23__version__ = '@PACKAGE_VERSION@'
24
25
5290f876
PP
26from bt2.clock_class import ClockClassOffset
27from bt2.clock_snapshot import _ClockSnapshot
28from bt2.clock_snapshot import _UnknownClockSnapshot
29from bt2.component import _SourceComponentClass
68e606ef
PP
30from bt2.component import _FilterComponentClass
31from bt2.component import _SinkComponentClass
811644b8 32from bt2.component import _SourceComponent
5290f876
PP
33from bt2.component import _FilterComponent
34from bt2.component import _SinkComponent
35from bt2.component import _UserSourceComponent
811644b8
PP
36from bt2.component import _UserFilterComponent
37from bt2.component import _UserSinkComponent
5290f876
PP
38from bt2.error import ComponentClassType
39from bt2.error import _ErrorCause
40from bt2.error import _ComponentErrorCause
41from bt2.error import _ComponentClassErrorCause
42from bt2.error import _MessageIteratorErrorCause
694c792b 43from bt2.error import _Error
5290f876
PP
44from bt2.event_class import EventClassLogLevel
45from bt2.field import _IntegerField
46from bt2.field import _UnsignedIntegerField
47from bt2.field import _SignedIntegerField
48from bt2.field import _RealField
49from bt2.field import _EnumerationField
50from bt2.field import _UnsignedEnumerationField
51from bt2.field import _SignedEnumerationField
52from bt2.field import _StringField
53from bt2.field import _StructureField
54from bt2.field import _VariantField
55from bt2.field import _ArrayField
56from bt2.field import _StaticArrayField
57from bt2.field import _DynamicArrayField
58from bt2.field_class import IntegerDisplayBase
59from bt2.field_class import _IntegerFieldClass
60from bt2.field_class import _UnsignedIntegerFieldClass
61from bt2.field_class import _SignedIntegerFieldClass
62from bt2.field_class import _RealFieldClass
63from bt2.field_class import _EnumerationFieldClass
64from bt2.field_class import _UnsignedEnumerationFieldClass
65from bt2.field_class import _SignedEnumerationFieldClass
66from bt2.field_class import _StringFieldClass
67from bt2.field_class import _StructureFieldClass
68from bt2.field_class import _VariantFieldClass
69from bt2.field_class import _VariantFieldClassWithoutSelector
70from bt2.field_class import _VariantFieldClassWithSelector
71from bt2.field_class import _VariantFieldClassWithUnsignedSelector
72from bt2.field_class import _VariantFieldClassWithSignedSelector
73from bt2.field_class import _ArrayFieldClass
74from bt2.field_class import _StaticArrayFieldClass
75from bt2.field_class import _DynamicArrayFieldClass
76from bt2.field_path import Scope
77from bt2.field_path import _IndexFieldPathItem
78from bt2.field_path import _CurrentArrayElementFieldPathItem
79from bt2.graph import Graph
80from bt2.integer_range_set import SignedIntegerRange
81from bt2.integer_range_set import UnsignedIntegerRange
82from bt2.integer_range_set import SignedIntegerRangeSet
83from bt2.integer_range_set import UnsignedIntegerRangeSet
84from bt2.interrupter import Interrupter
85from bt2.logging import LoggingLevel
86from bt2.logging import get_minimal_logging_level
87from bt2.logging import get_global_logging_level
88from bt2.logging import set_global_logging_level
89from bt2.message import _EventMessage
90from bt2.message import _PacketBeginningMessage
91from bt2.message import _PacketEndMessage
92from bt2.message import _StreamBeginningMessage
93from bt2.message import _StreamEndMessage
94from bt2.message import _MessageIteratorInactivityMessage
5602ef81
SM
95from bt2.message import _DiscardedEventsMessage
96from bt2.message import _DiscardedPacketsMessage
5602ef81 97from bt2.message_iterator import _UserMessageIterator
5290f876
PP
98from bt2.plugin import find_plugins_in_path
99from bt2.plugin import find_plugins
100from bt2.plugin import find_plugin
101from bt2.py_plugin import plugin_component_class
102from bt2.py_plugin import register_plugin
103from bt2.query_executor import QueryExecutor
104from bt2.trace_collection_message_iterator import ComponentSpec
105from bt2.trace_collection_message_iterator import TraceCollectionMessageIterator
106from bt2.value import create_value
107from bt2.value import BoolValue
fdd3a2da 108from bt2.value import _IntegerValue
5290f876
PP
109from bt2.value import UnsignedIntegerValue
110from bt2.value import SignedIntegerValue
111from bt2.value import RealValue
112from bt2.value import StringValue
113from bt2.value import ArrayValue
114from bt2.value import MapValue
81447b5b
PP
115
116
694c792b 117class _MemoryError(_Error):
4acc866e 118 '''Raised when an operation fails due to memory issues.'''
81447b5b
PP
119
120
ce4923b0 121class InvalidObject(Exception):
c7eee084
PP
122 pass
123
124
d24d5663 125class OverflowError(OverflowError):
81447b5b
PP
126 pass
127
128
d24d5663 129class TryAgain(Exception):
81447b5b
PP
130 pass
131
132
d24d5663
PP
133class Stop(StopIteration):
134 pass
135
136
ce4923b0 137class IncompleteUserClass(Exception):
811644b8
PP
138 pass
139
140
811644b8
PP
141class _ListenerHandle:
142 def __init__(self, listener_id, obj):
143 self._listener_id = listener_id
144 self._obj = obj
145
146
0b03f63e
PP
147def _init_and_register_exit():
148 import bt2.native_bt as _native_bt
149 import atexit
150
d24d5663 151 atexit.register(_native_bt.bt2_cc_exit_handler)
cfbd7cf3
FD
152 version = (
153 _native_bt.version_get_major(),
154 _native_bt.version_get_minor(),
155 _native_bt.version_get_patch(),
156 _native_bt.version_get_extra(),
157 )
d24d5663 158 _native_bt.bt2_cc_init_from_bt2()
0b03f63e
PP
159
160
161_init_and_register_exit()
162
811644b8
PP
163
164try:
165 del native_bt
166except:
167 pass
This page took 0.051729 seconds and 4 git commands to generate.