Exporting an Interface
aleksander at aleksander.es
Fri Nov 12 08:30:32 UTC 2021
> Ah, I see, thanks for the explanation! However the command below still returns FALSE for me unfortunately...
> g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton),
> As mentioned before the skeleton is the MmGdbusSimEap* created by the command mm_gdbus_sim_eap_skeleton_new () command. I have checked that G_DBUS_INTERFACE_SKELETON (skeleton) correctly returns a GDBusInterfaceSkeleton type as well.
And in this time it also doesn't set the GError?
If the export() method returns FALSE without error set, it can only be
due to a g_return_if_fail() check. The ones done in this method,
according to the glib sources, would be:
g_return_val_if_fail (G_IS_DBUS_INTERFACE_SKELETON (interface_), FALSE);
Is the input object a valid GDBusInterfaceSkeleton?
g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), FALSE);
Is the connection a valid GDBusConnection?
g_return_val_if_fail (g_variant_is_object_path (object_path), FALSE);
Is the given path a valid DBus object path?
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
Is error not required, and if it is, is it not initialized already?
/* Assert that the object path is the same for multiple connections here */
g_return_val_if_fail (interface_->priv->object_path == NULL ||
object_path) == 0, FALSE);
If the export() has been done already in a different connection, is
this new export still for the same object path as before?
You'll need to reply to those questions above.
If the export() method returns FALSE but with error set, then please
print what the actual error->message is.
More information about the ModemManager-devel