<div dir="ltr">Hi,<div><br></div><div>Ah, I see, thanks for the explanation! However the command below still returns FALSE for me unfortunately...</div><div><font face="monospace"> g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (skeleton),<br>                                   connection,<br>                                   path,<br>                                   &error)) </font></div><div><font face="arial, sans-serif">As mentioned before the </font><font face="monospace">skeleton</font><font face="arial, sans-serif"> is the </font><font face="monospace">MmGdbusSimEap*</font> created by the command <font face="monospace">mm_gdbus_sim_eap_skeleton_new ()</font> command. I have checked that <span style="font-family:monospace">G_DBUS_INTERFACE_SKELETON (skeleton) </span>correctly returns a GDBusInterfaceSkeleton type as well.</div><div><br></div><div>Thanks,</div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Florence</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 11, 2021 at 1:31 PM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey,<br>
<br>
><br>
>> Is that "self" in the g_object_get() the same as in the<br>
>> g_dbus_interface_skeleton_export()?<br>
><br>
><br>
> Yes, self refers to a a MMIfaceSimEap *. I have a MMsameGdbusSimEap* created by the command mm_gdbus_sim_eap_skeleton_new (). However is that not different from the GDBusInterfaceSkeleton* that is required? What do you mean that the self cannot be the same/why can't it?<br>
><br>
<br>
MMBaseSim inherits from MMGdbusSimSkeleton (so it provides the generic<br>
SIM interface), and that same object also implements your new<br>
MMIfaceSimEap interface. All those 3 things are the same object; the<br>
same "self" pointer can be casted as MM_BASE_SIM(),<br>
MM_GDBUS_SIM_SKELETON() and MM_IFACE_SIM_EAP().<br>
<br>
Inside the MMIfaceSimEap implementation you're creating a new skeleton<br>
for the new interface with mm_gdbus_sim_eap_skeleton_new(). This<br>
skeleton object is an object different to "self", they are 2 different<br>
objects completely. You're then storing this skeleton as a property<br>
that is defined by the interface (which is why you override it in the<br>
base sim object, that is fine) and so at the end you're storing the<br>
new skeleton object in self->priv (totally fine).<br>
<br>
But then you're calling g_dbus_interface_skeleton_export<br>
(G_DBUS_INTERFACE_SKELETON (self)) there; so you're attempting to<br>
export again the same interface skeleton as the generic MMBaseSim<br>
object does (MMGdbusSimSkeleton). What you need to export instead is<br>
the new skeleton you just created (variable "skeleton", not "self"),<br>
as this: g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON<br>
(skeleton));<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>