<div dir="ltr"><div>Hey Aleksander,</div><div><br></div><div>Previously you mentioned the <font face="monospace">g_dbus_interface_skeleton_export() </font>method to export my SIM interface, which I've been attempting to use. However I've been running with some issues with it. Currently I call this in my <font face="monospace">mm_iface_sim_eap_initialize</font> method, like so:<br></div><div><font face="monospace">g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self),<br>                                  connection,<br>                                  path,<br>                                  &error)</font><br></div><div><font face="monospace">self</font><font face="arial, sans-serif"> is a pointer to my interface The </font><font face="monospace">connection</font> and <font face="monospace">path</font> are properties are the base sim's connection and path, retrieved like this:</div><div><font face="monospace">  g_object_get (MM_BASE_SIM(self),<br>                MM_BASE_SIM_CONNECTION, &connection,<br>                MM_BASE_SIM_PATH,       &path,<br>                NULL);</font><br></div><div><font face="arial, sans-serif">From the debug statements the </font><font face="monospace">connection</font><font face="arial, sans-serif"> is non-null, the </font><font face="monospace">path</font><font face="arial, sans-serif"> matches with the base sim's path, and a skeleton for my interface was created successfully (and overridden accordingly in the base sim class)</font></div><div><br></div><div><span style="font-family:arial,sans-serif">However looking at my debug statements my interface fails to be exported</span><font face="arial, sans-serif">, and </font><span style="font-family:monospace">error->message </span><font face="arial, sans-serif">and </font><span style="font-family:monospace">error->code </span><font face="arial, sans-serif">were (NULL) and 0 respectively, so I am unsure of what the issue is here. Do you know how to fix this? </font></div><div><font face="arial, sans-serif"><br></font></div><div>Thank you for the time and help!</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Florence</div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 14, 2021 at 12:52 PM Florence Chan <<a href="mailto:florencewchan@google.com">florencewchan@google.com</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"><div dir="ltr">Hey Aleksander,<div><br></div><div>Ah yes, that makes sense! Yes I do have a skeleton type corresponding to my interface. </div><div><br></div><div>Thanks so much for the help!<br clear="all"><div><div dir="ltr"><div dir="ltr">- Florence</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 13, 2021 at 1:50 PM Aleksander Morgado <<a href="mailto:aleksander@aleksander.es" target="_blank">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 Florence!<br>
<br>
><br>
> I've been creating a DBus interface for the MM SIM object and I have been having issues specifically when it comes to exporting the interface. From the examples in other files it looks like there is a "mm_gdbus_object_skeleton_set_modem_*" generated export function that corresponds with the interface, however there is none that corresponds with my SIM interface. How would I go about exporting my interface?<br>
><br>
<br>
I think that the issue you're having is because the mm-gdbus-sim.[c|h]<br>
files are NOT generated with the --c-generate-object-manager option in<br>
gdbus-codegen. That option is only used in the "modem" object, because<br>
that is the only type of object listed by the "ObjectManagerInterface"<br>
that the daemon manager object exports. So, for the modem object we<br>
can have a "MmGdbusObjectSkeleton" associated to the object path,<br>
which can then have multiple interfaces exposed in the same path via<br>
the mm_gdbus_object_skeleton_set_modem_XXX() calls.<br>
<br>
The case for the SIM object is different; we're only generating code<br>
for the interface support, not as part of any object manager. I guess<br>
we could have each modem object implement the object manager interface<br>
themselves, but that could be a bit of a mess, and don't think<br>
gdbus-codegen supports that. So, for the SIM object (and any other<br>
object; e.g. bearer, call, sms...) we export the interfaces<br>
independently with g_dbus_interface_skeleton_export(). E.g. for the<br>
Sim interface we get a MmGdbusSimSkeleton that we can export in DBus<br>
whenever we want. I would assume you'll get a different skeleton type<br>
for your new interface; is that so?<br>
<br>
-- <br>
Aleksander<br>
<a href="https://aleksander.es" rel="noreferrer" target="_blank">https://aleksander.es</a><br>
</blockquote></div>
</blockquote></div>