Hey Florence! > > 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? >
I think that the issue you're having is because the mm-gdbus-sim.[c|h] files are NOT generated with the --c-generate-object-manager option in gdbus-codegen. That option is only used in the "modem" object, because that is the only type of object listed by the "ObjectManagerInterface" that the daemon manager object exports. So, for the modem object we can have a "MmGdbusObjectSkeleton" associated to the object path, which can then have multiple interfaces exposed in the same path via the mm_gdbus_object_skeleton_set_modem_XXX() calls. The case for the SIM object is different; we're only generating code for the interface support, not as part of any object manager. I guess we could have each modem object implement the object manager interface themselves, but that could be a bit of a mess, and don't think gdbus-codegen supports that. So, for the SIM object (and any other object; e.g. bearer, call, sms...) we export the interfaces independently with g_dbus_interface_skeleton_export(). E.g. for the Sim interface we get a MmGdbusSimSkeleton that we can export in DBus whenever we want. I would assume you'll get a different skeleton type for your new interface; is that so? -- Aleksander https://aleksander.es