~binli/ubuntu/vivid/modemmanager/lp1441095

« back to all changes in this revision

Viewing changes to src/mm-bearer.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Guido Günther, Michael Biebl
  • Date: 2014-06-25 02:23:09 UTC
  • mfrom: (20.2.2 sid)
  • Revision ID: package-import@ubuntu.com-20140625022309-43papaenj5ikbx3y
Tags: 1.2.0-1
[ Guido Günther ]
* New upstream version 1.2.0 (Closes: #731851)
* Update patches
* Install locale files
* Require newer libqmi
* Update symbols file
* Ship gobject introspection data
* Ship vala bindings

[ Michael Biebl ]
* Use canonical URI for Vcs-Git
* Use gir dh addon
* Update extendend package description (Closes: #744180)

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
    else
442
442
        mm_dbg ("Disconnected bearer '%s'", self->priv->path);
443
443
 
444
 
    bearer_update_status (self, MM_BEARER_STATUS_DISCONNECTED);
 
444
    /* Report disconnection to the bearer object using class method
 
445
     * mm_bearer_report_connection_status. This gives subclass implementations a
 
446
     * chance to correctly update their own connection state, in case this base
 
447
     * class ignores a failed disconnection attempt.
 
448
     */
 
449
    mm_bearer_report_connection_status (self, MM_BEARER_CONNECTION_STATUS_DISCONNECTED);
445
450
}
446
451
 
447
452
static void
945
950
    else
946
951
        mm_dbg ("Disconnected bearer '%s'", self->priv->path);
947
952
 
948
 
    bearer_update_status (self, MM_BEARER_STATUS_DISCONNECTED);
 
953
    /* Report disconnection to the bearer object using class method
 
954
     * mm_bearer_report_connection_status. This gives subclass implementations a
 
955
     * chance to correctly update their own connection state, in case this base
 
956
     * class ignores a failed disconnection attempt.
 
957
     */
 
958
    mm_bearer_report_connection_status (self, MM_BEARER_CONNECTION_STATUS_DISCONNECTED);
949
959
}
950
960
 
951
961
void
974
984
/*****************************************************************************/
975
985
 
976
986
static void
977
 
report_disconnection (MMBearer *self)
 
987
report_connection_status (MMBearer *self,
 
988
                          MMBearerConnectionStatus status)
978
989
{
 
990
    /* The only status expected at this point is DISCONNECTED.
 
991
     * No other status should have been given to the generic implementation
 
992
     * of report_connection_status (it would be an error).
 
993
     */
 
994
    g_assert (status == MM_BEARER_CONNECTION_STATUS_DISCONNECTED);
 
995
 
979
996
    /* In the generic bearer implementation we just need to reset the
980
997
     * interface status */
981
998
    bearer_update_status (self, MM_BEARER_STATUS_DISCONNECTED);
982
999
}
983
1000
 
984
1001
void
985
 
mm_bearer_report_disconnection (MMBearer *self)
 
1002
mm_bearer_report_connection_status (MMBearer *self,
 
1003
                                    MMBearerConnectionStatus status)
986
1004
{
987
 
    return MM_BEARER_GET_CLASS (self)->report_disconnection (self);
 
1005
    return MM_BEARER_GET_CLASS (self)->report_connection_status (self, status);
988
1006
}
989
1007
 
990
1008
static void
1160
1178
    object_class->finalize = finalize;
1161
1179
    object_class->dispose = dispose;
1162
1180
 
1163
 
    klass->report_disconnection = report_disconnection;
 
1181
    klass->report_connection_status = report_connection_status;
1164
1182
 
1165
1183
    properties[PROP_CONNECTION] =
1166
1184
        g_param_spec_object (MM_BEARER_CONNECTION,