class _GenericSourceComponentClass(_GenericComponentClass):
- _get_ref = native_bt.component_class_source_get_ref
- _put_ref = native_bt.component_class_source_put_ref
- _as_component_class_ptr = native_bt.component_class_source_as_component_class
+ _get_ref = staticmethod(native_bt.component_class_source_get_ref)
+ _put_ref = staticmethod(native_bt.component_class_source_put_ref)
+ _as_component_class_ptr = staticmethod(native_bt.component_class_source_as_component_class)
class _GenericFilterComponentClass(_GenericComponentClass):
- _get_ref = native_bt.component_class_filter_get_ref
- _put_ref = native_bt.component_class_filter_put_ref
- _as_component_class_ptr = native_bt.component_class_filter_as_component_class
+ _get_ref = staticmethod(native_bt.component_class_filter_get_ref)
+ _put_ref = staticmethod(native_bt.component_class_filter_put_ref)
+ _as_component_class_ptr = staticmethod(native_bt.component_class_filter_as_component_class)
class _GenericSinkComponentClass(_GenericComponentClass):
- _get_ref = native_bt.component_class_sink_get_ref
- _put_ref = native_bt.component_class_sink_put_ref
- _as_component_class_ptr = native_bt.component_class_sink_as_component_class
+ _get_ref = staticmethod(native_bt.component_class_sink_get_ref)
+ _put_ref = staticmethod(native_bt.component_class_sink_put_ref)
+ _as_component_class_ptr = staticmethod(native_bt.component_class_sink_as_component_class)
def _handle_component_status(status, gen_error_msg):
class _SourceComponent(_Component):
- _borrow_component_class_ptr = native_bt.component_source_borrow_class_const
+ _borrow_component_class_ptr = staticmethod(native_bt.component_source_borrow_class_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SOURCE
- _as_component_class_ptr = native_bt.component_class_source_as_component_class
- _as_component_ptr = native_bt.component_source_as_component_const
+ _as_component_class_ptr = staticmethod(native_bt.component_class_source_as_component_class)
+ _as_component_ptr = staticmethod(native_bt.component_source_as_component_const)
class _FilterComponent(_Component):
- _borrow_component_class_ptr = native_bt.component_filter_borrow_class_const
+ _borrow_component_class_ptr = staticmethod(native_bt.component_filter_borrow_class_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_FILTER
- _as_component_class_ptr = native_bt.component_class_filter_as_component_class
- _as_component_ptr = native_bt.component_filter_as_component_const
+ _as_component_class_ptr = staticmethod(native_bt.component_class_filter_as_component_class)
+ _as_component_ptr = staticmethod(native_bt.component_filter_as_component_const)
class _SinkComponent(_Component):
- _borrow_component_class_ptr = native_bt.component_sink_borrow_class_const
+ _borrow_component_class_ptr = staticmethod(native_bt.component_sink_borrow_class_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SINK
- _as_component_class_ptr = native_bt.component_class_sink_as_component_class
- _as_component_ptr = native_bt.component_sink_as_component_const
+ _as_component_class_ptr = staticmethod(native_bt.component_class_sink_as_component_class)
+ _as_component_ptr = staticmethod(native_bt.component_sink_as_component_const)
# This is analogous to _GenericSourceComponentClass, but for source
# This is analogous to _GenericSinkComponentClass, but for sink
# component objects.
class _GenericSinkComponent(object._SharedObject, _SinkComponent):
- _get_ref = native_bt.component_sink_get_ref
- _put_ref = native_bt.component_sink_put_ref
+ _get_ref = staticmethod(native_bt.component_sink_get_ref)
+ _put_ref = staticmethod(native_bt.component_sink_put_ref)
@property
def input_ports(self):
class _UserSourceComponent(_UserComponent, _SourceComponent):
- _as_not_self_specific_component_ptr = native_bt.self_component_source_as_component_source
+ _as_not_self_specific_component_ptr = staticmethod(native_bt.self_component_source_as_component_source)
@property
def _output_ports(self):
class _UserFilterComponent(_UserComponent, _FilterComponent):
- _as_not_self_specific_component_ptr = native_bt.self_component_filter_as_component_filter
+ _as_not_self_specific_component_ptr = staticmethod(native_bt.self_component_filter_as_component_filter)
@property
def _output_ports(self):
class _UserSinkComponent(_UserComponent, _SinkComponent):
- _as_not_self_specific_component_ptr = native_bt.self_component_sink_as_component_sink
+ _as_not_self_specific_component_ptr = staticmethod(native_bt.self_component_sink_as_component_sink)
@property
def _input_ports(self):
class Graph(object._SharedObject):
- _get_ref = native_bt.graph_get_ref
- _put_ref = native_bt.graph_put_ref
+ _get_ref = staticmethod(native_bt.graph_get_ref)
+ _put_ref = staticmethod(native_bt.graph_put_ref)
def __init__(self):
ptr = native_bt.graph_create()
class _PluginSet(object._SharedObject, collections.abc.Sequence):
- _put_ref = native_bt.plugin_set_put_ref
- _get_ref = native_bt.plugin_set_get_ref
+ _put_ref = staticmethod(native_bt.plugin_set_put_ref)
+ _get_ref = staticmethod(native_bt.plugin_set_get_ref)
def __len__(self):
count = native_bt.plugin_set_get_plugin_count(self._ptr)
class _PluginSourceComponentClasses(_PluginComponentClasses):
- _component_class_count = native_bt.plugin_get_source_component_class_count
- _borrow_component_class_by_name = native_bt.plugin_borrow_source_component_class_by_name_const
- _borrow_component_class_by_index = native_bt.plugin_borrow_source_component_class_by_index_const
+ _component_class_count = staticmethod(native_bt.plugin_get_source_component_class_count)
+ _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_source_component_class_by_name_const)
+ _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_source_component_class_by_index_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SOURCE
class _PluginFilterComponentClasses(_PluginComponentClasses):
- _component_class_count = native_bt.plugin_get_filter_component_class_count
- _borrow_component_class_by_name = native_bt.plugin_borrow_filter_component_class_by_name_const
- _borrow_component_class_by_index = native_bt.plugin_borrow_filter_component_class_by_index_const
+ _component_class_count = staticmethod(native_bt.plugin_get_filter_component_class_count)
+ _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_filter_component_class_by_name_const)
+ _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_filter_component_class_by_index_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_FILTER
class _PluginSinkComponentClasses(_PluginComponentClasses):
- _component_class_count = native_bt.plugin_get_sink_component_class_count
- _borrow_component_class_by_name = native_bt.plugin_borrow_sink_component_class_by_name_const
- _borrow_component_class_by_index = native_bt.plugin_borrow_sink_component_class_by_index_const
+ _component_class_count = staticmethod(native_bt.plugin_get_sink_component_class_count)
+ _borrow_component_class_by_name = staticmethod(native_bt.plugin_borrow_sink_component_class_by_name_const)
+ _borrow_component_class_by_index = staticmethod(native_bt.plugin_borrow_sink_component_class_by_index_const)
_comp_cls_type = native_bt.COMPONENT_CLASS_TYPE_SINK
class _Plugin(object._SharedObject):
- _put_ref = native_bt.plugin_put_ref
- _get_ref = native_bt.plugin_get_ref
+ _put_ref = staticmethod(native_bt.plugin_put_ref)
+ _get_ref = staticmethod(native_bt.plugin_get_ref)
@property
def name(self):
class QueryExecutor(object._SharedObject):
- _get_ref = native_bt.query_executor_get_ref
- _put_ref = native_bt.query_executor_put_ref
+ _get_ref = staticmethod(native_bt.query_executor_get_ref)
+ _put_ref = staticmethod(native_bt.query_executor_put_ref)
def _handle_status(self, status, gen_error_msg):
if status == native_bt.QUERY_EXECUTOR_STATUS_AGAIN:
class _Value(object._SharedObject, metaclass=abc.ABCMeta):
- _get_ref = native_bt.value_get_ref
- _put_ref = native_bt.value_put_ref
+ _get_ref = staticmethod(native_bt.value_get_ref)
+ _put_ref = staticmethod(native_bt.value_put_ref)
def __eq__(self, other):
if other is None:
class UnsignedIntegerValue(_IntegerValue):
_check_int_range = staticmethod(utils._check_uint64)
- _create_default_value = native_bt.value_unsigned_integer_create
- _create_value = native_bt.value_unsigned_integer_create_init
- _set_value = native_bt.value_unsigned_integer_set
- _get_value = native_bt.value_unsigned_integer_get
+ _create_default_value = staticmethod(native_bt.value_unsigned_integer_create)
+ _create_value = staticmethod(native_bt.value_unsigned_integer_create_init)
+ _set_value = staticmethod(native_bt.value_unsigned_integer_set)
+ _get_value = staticmethod(native_bt.value_unsigned_integer_get)
class SignedIntegerValue(_IntegerValue):
_check_int_range = staticmethod(utils._check_int64)
- _create_default_value = native_bt.value_signed_integer_create
- _create_value = native_bt.value_signed_integer_create_init
- _set_value = native_bt.value_signed_integer_set
- _get_value = native_bt.value_signed_integer_get
+ _create_default_value = staticmethod(native_bt.value_signed_integer_create)
+ _create_value = staticmethod(native_bt.value_signed_integer_create_init)
+ _set_value = staticmethod(native_bt.value_signed_integer_set)
+ _get_value = staticmethod(native_bt.value_signed_integer_get)
class RealValue(_RealValue):