iface-modem-cdma: CDMA bearer creation removed
This commit is contained in:
@@ -430,65 +430,6 @@ mm_iface_modem_cdma_register_in_network (MMIfaceModemCdma *self,
|
||||
result);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Create new CDMA bearer */
|
||||
|
||||
MMBearer *
|
||||
mm_iface_modem_cdma_create_bearer_finish (MMIfaceModemCdma *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
MMModemCdmaRegistrationState cdma1x_current_state;
|
||||
MMModemCdmaRegistrationState evdo_current_state;
|
||||
MMBearer *bearer;
|
||||
|
||||
g_assert (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->bearer_new_finish != NULL);
|
||||
bearer = MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->bearer_new_finish (res,
|
||||
error);
|
||||
|
||||
if (!bearer)
|
||||
return NULL;
|
||||
|
||||
g_object_get (self,
|
||||
MM_IFACE_MODEM_CDMA_CDMA1X_REGISTRATION_STATE, &cdma1x_current_state,
|
||||
MM_IFACE_MODEM_CDMA_EVDO_REGISTRATION_STATE, &evdo_current_state,
|
||||
NULL);
|
||||
|
||||
if (cdma1x_current_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING ||
|
||||
evdo_current_state == MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING) {
|
||||
/* Don't allow bearer to get connected if roaming forbidden */
|
||||
if (mm_bearer_get_allow_roaming (bearer))
|
||||
mm_bearer_set_connection_allowed (bearer);
|
||||
else
|
||||
mm_bearer_set_connection_forbidden (
|
||||
bearer,
|
||||
MM_BEARER_CONNECTION_FORBIDDEN_REASON_ROAMING);
|
||||
}
|
||||
else if (cdma1x_current_state == MM_MODEM_CDMA_REGISTRATION_STATE_HOME ||
|
||||
evdo_current_state == MM_MODEM_CDMA_REGISTRATION_STATE_HOME)
|
||||
mm_bearer_set_connection_allowed (bearer);
|
||||
else
|
||||
mm_bearer_set_connection_forbidden (
|
||||
bearer,
|
||||
MM_BEARER_CONNECTION_FORBIDDEN_REASON_UNREGISTERED);
|
||||
|
||||
return bearer;
|
||||
}
|
||||
|
||||
void
|
||||
mm_iface_modem_cdma_create_bearer (MMIfaceModemCdma *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_assert (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->bearer_new != NULL);
|
||||
MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->bearer_new (self,
|
||||
properties,
|
||||
NULL,
|
||||
callback,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct _RunAllRegistrationChecksContext RunAllRegistrationChecksContext;
|
||||
|
||||
@@ -148,15 +148,6 @@ struct _MMIfaceModemCdma {
|
||||
gboolean (*register_in_network_finish) (MMIfaceModemCdma *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* New CDMA bearer */
|
||||
void (* bearer_new) (MMIfaceModemCdma *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBearer * (* bearer_new_finish) (GAsyncResult *res,
|
||||
GError **error);
|
||||
};
|
||||
|
||||
GType mm_iface_modem_cdma_get_type (void);
|
||||
@@ -232,15 +223,6 @@ gboolean mm_iface_modem_cdma_register_in_network_finish (MMIfaceModemCdma *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Create new CDMA bearer */
|
||||
void mm_iface_modem_cdma_create_bearer (MMIfaceModemCdma *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBearer *mm_iface_modem_cdma_create_bearer_finish (MMIfaceModemCdma *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
/* Bind properties for simple GetStatus() */
|
||||
void mm_iface_modem_cdma_bind_simple_status (MMIfaceModemCdma *self,
|
||||
MMCommonSimpleProperties *status);
|
||||
|
||||
Reference in New Issue
Block a user