Split notification iterator API into base and specialized functions
[babeltrace.git] / bindings / python / bt2 / bt2 / notification_iterator.py
index 39b6bf0e3b776dd8160342c2d49250141e25a2ec..99bc813621a78b79a81175331044ac8ee34a810d 100644 (file)
@@ -45,12 +45,6 @@ class _NotificationIterator(collections.abc.Iterator):
 
 
 class _GenericNotificationIterator(object._Object, _NotificationIterator):
-    @property
-    def component(self):
-        comp_ptr = native_bt.notification_iterator_get_component(self._ptr)
-        assert(comp_ptr)
-        return bt2.component._create_generic_component_from_ptr(comp_ptr)
-
     def _get_notif(self):
         notif_ptr = native_bt.notification_iterator_get_notification(self._ptr)
         utils._handle_ptr(notif_ptr, "cannot get notification iterator object's current notification object")
@@ -66,6 +60,14 @@ class _GenericNotificationIterator(object._Object, _NotificationIterator):
         return self._get_notif()
 
 
+class _PrivateConnectionNotificationIterator(_GenericNotificationIterator):
+    @property
+    def component(self):
+        comp_ptr = native_bt.private_connection_notification_iterator_get_component(self._ptr)
+        assert(comp_ptr)
+        return bt2.component._create_generic_component_from_ptr(comp_ptr)
+
+
 class _UserNotificationIterator(_NotificationIterator):
     def __new__(cls, ptr):
         # User iterator objects are always created by the native side,
This page took 0.025338 seconds and 4 git commands to generate.