+ snprintf(introspection_xml, introspection_xml_len, "%s%s%s", introspection_prefix, interface_name, introspection_postfix);
+
+ introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, NULL);
+ if (!introspection_data) {
+ ret = MESSAGE_PORT_ERROR_IO_ERROR;
+ _LOGE("g_dbus_node_info_new_for_xml() is failed.");
+ goto out;
+ }
+
+ registration_id = g_dbus_connection_register_object(gdbus_conn,
+ MESSAGEPORT_OBJECT_PATH, introspection_data->interfaces[0],
+ &interface_vtable, NULL, NULL, NULL);
+
+ _LOGD("registration_id %d", registration_id);
+
+ if (registration_id == 0) {
+ ret = MESSAGE_PORT_ERROR_IO_ERROR;
+ _LOGE("Failed to g_dbus_connection_register_object");
+ goto out;
+ }
+
+ if (!__message_port_register_port(registration_id, port_name, is_trusted,
+ callback, user_data)) {
+ ret = MESSAGE_PORT_ERROR_OUT_OF_MEMORY;
+ goto out;
+ }