Exporting an Interface
florencewchan at google.com
Tue Nov 30 22:41:13 UTC 2021
I originally added MM_TYPE_BASE_SIM as a prerequisite and that actually
made my interface fail to initialize, which I think might be because of
where I initialize my interface, which is right after the line(s)
(self); in set_property() of mm-base-sim.c. So as of now, I have no
prerequisites for my interface, resulting in having only that one method
have an invalid address.
On Tue, Nov 30, 2021 at 12:57 AM Aleksander Morgado <
aleksander at aleksander.es> wrote:
> > I have another question regarding my SIM-EAP interface. Testing has been
> going well however I noticed one of the methods of my interface has an
> invalid address (i.e. either (nil) or 0x2) despite having implementation. I
> noticed I'm getting this warning which may be responsible for this bug:
> > (ModemManager:4486): GLib-GObject-WARNING **: 17:07:38.068: invalid cast
> from 'MMSimMbim' to 'MMIfaceSimEap'
> > I was wondering if you would know if there is anything else involved in
> providing a valid cast from these two, other than what I have here (in
> > G_DEFINE_TYPE_EXTENDED(MMSimMbim, mm_sim_mbim, MM_TYPE_BASE_SIM, 0,
> G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_SIM_EAP, iface_sim_eap_init))
> Hum... I don't think I can say of anything else that would be strictly
> required. In the modem interfaces I explicitly add MM_TYPE_BASE_MODEM
> as a prerequisite for the interfaces in the get_type() method, with
> g_type_interface_add_prerequisite(). But I'm not completely sure
> that's a strict requirement. Do you also add that prerequisite for the
> MM_TYPE_BASE_SIM object in your new SIM interface?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ModemManager-devel