[PATCH v2 1/2] bearer: replace mm_bearer_report_disconnection with mm_bearer_report_status

Ben Chan benchan at chromium.org
Thu Sep 19 10:24:05 PDT 2013


> Instead of passing a MMBearerStatus value; it probably is a good idea to
> have a new enumeration considering other things. E.g. in the option/hso
> bearer we have report_connection_status() which is the method used by
> the modem object to notify about unsolicited messages received during
> connection/disconnection sequence. This method uses a new enum with the
> following values:
>
> typedef enum {
>     MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_UNKNOWN,
>     MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_CONNECTED,
>     MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_CONNECTION_FAILED,
>     MM_BROADBAND_BEARER_HSO_CONNECTION_STATUS_DISCONNECTED
> } MMBroadbandBearerHsoConnectionStatus;
>
> The generic report_status() could handle all these. Something like:
>
> typedef enum {
>     MM_BEARER_CONNECTION_STATUS_UNKNOWN,
>     MM_BEARER_CONNECTION_STATUS_CONNECTED,
>     MM_BEARER_CONNECTION_STATUS_CONNECTION_FAILED,
>     MM_BEARER_CONNECTION_STATUS_DISCONNECTING,
>     MM_BEARER_CONNECTION_STATUS_DISCONNECTED,
> } MMBearerConnectionStatus.
>
> The 'disconnecting' case could be used by the Huawei plugin to notify
> about a disconnection that will need further plugin action to finally
> report disconnected (see the other email).
>
>
I guess you're proposing:
- getting rid of those custom connection status enum in mbm/hso/icera
- converting those custom mm_broadband_*_report_connection_status() in
mbm/hso/icera to report_connection_status()
- instead of calling mm_bearer_report_* in those custom
mm_broadband_*_report_connection_status(), call parent's
report_connection_status

I think the changes make sense, but don't have those modems to verify such
changes. Do you have those modems?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20130919/23653bca/attachment.html>


More information about the ModemManager-devel mailing list