Access MMBroadbandModemPrivate from plugin
Carlo Lobrano
c.lobrano at gmail.com
Thu Dec 3 01:00:17 PST 2015
I though to keep changes confined to only one plugin from the beginning,
but adding a new interface to MMBroadbandModemClass does make sense to me.
On 2 December 2015 at 19:40, Aleksander Morgado <aleksander at aleksander.es>
wrote:
> On Wed, Dec 2, 2015 at 5:50 PM, Carlo Lobrano <c.lobrano at gmail.com> wrote:
> > I am trying to solve a problem on HE910 Telit modem (I also opened bug
> 93135
> > about this), which does not support NULL items for AT+CPMS command, so
> > commands like
> >
> > AT+CPMS="","ME"
> >
> > return with error. My idea is basically to provides always MEM1 parameter
> > when AT+CPMS is issued, using the current value set on the modem if not
> > provided in other ways.
> >
> > As suggested by Aleksander on bugtrace, the right way to do it would be
> to
> > call +CPMS? "somewhere" and parse the reply.
> > I'd like to keep those changes in telit plugin, but I wouldn't
> re-implement
> > all messaging interface for this and it is not clear to me how access to
> > "current_sms_mem1_storage" parameter in MMBroadbandModemPrivate. Is it
> even
> > possible?
>
> Well, nothing is impossible, but I wouldn't try to do it that way. The
> current_sms_mem1_storage variable is part of the MMBroadbandModem
> logic, it doesn't apply out of it, it's only used as part of the logic
> doing the storage lock/unlock before R/W.
>
> Instead, what I would do, is to provide in MMBroadbandModemClass a new
> async virtual method to "load_current_sms_mem_storage()" (or something
> like that). The logic in MMBroadbandModem which checks which are the
> supported storages could then have a new step to query which is the
> current storage (which we only need to do once), all this in the
> MMBroadbandModem class.
>
> This class would then provide an implementation of the virtual method
> itself, not in the Telit plugin, as the change shouldn't affect other
> implementations and actually kind of makes sense. If we see that the
> change affects other modems, we can later just move the implementation
> of the virtual method to the Telit plugin and leave the generic
> MMBroadbandModem with the virtual method pointers to NULL so that
> other plugins don't use that logic.
>
> What do you think?
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20151203/83c27abe/attachment.html>
More information about the ModemManager-devel
mailing list