+bt_bool component_class_can_seek_beginning(
+ bt_self_message_iterator *self_message_iterator)
+{
+ PyObject *py_iter;
+ PyObject *py_result = NULL;
+ bt_bool can_seek_beginning = false;
+
+ py_iter = bt_self_message_iterator_get_data(self_message_iterator);
+ BT_ASSERT(py_iter);
+
+ py_result = PyObject_GetAttrString(py_iter, "_bt_can_seek_beginning_from_native");
+
+ BT_ASSERT(!py_result || PyBool_Check(py_result));
+
+ if (py_result) {
+ can_seek_beginning = PyObject_IsTrue(py_result);
+ } else {
+ /*
+ * Once can_seek_beginning can report errors, convert the
+ * exception to a status. For now, log and return false;
+ */
+ loge_exception_message_iterator(self_message_iterator);
+ PyErr_Clear();
+ }
+
+ Py_XDECREF(py_result);
+
+ return can_seek_beginning;
+}
+
+static
+bt_component_class_message_iterator_seek_beginning_method_status
+component_class_seek_beginning(bt_self_message_iterator *self_message_iterator)
+{
+ PyObject *py_iter;
+ PyObject *py_result;
+ bt_component_class_message_iterator_seek_beginning_method_status status;
+
+ py_iter = bt_self_message_iterator_get_data(self_message_iterator);
+ BT_ASSERT(py_iter);
+ py_result = PyObject_CallMethod(py_iter, "_bt_seek_beginning_from_native",
+ NULL);
+ BT_ASSERT(!py_result || py_result == Py_None);
+ status = py_exc_to_status_message_iterator(self_message_iterator);
+ Py_XDECREF(py_result);
+ return status;
+}
+
+static
+bt_component_class_port_connected_method_status component_class_port_connected(