libmm-common: `MMBearerProperties' won't be considered internal any more
Renamed `MMCommonBearerProperties' to `MMBearerProperties', and removed the `MMBearerProperties' provided in libmm-glib. We'll just use the original one from libmm-common always.
This commit is contained in:
@@ -165,7 +165,7 @@ mm_bearer_list_foreach (MMBearerList *self,
|
||||
|
||||
MMBearer *
|
||||
mm_bearer_list_find (MMBearerList *self,
|
||||
MMCommonBearerProperties *properties)
|
||||
MMBearerProperties *properties)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ void mm_bearer_list_foreach (MMBearerList *self,
|
||||
gpointer user_data);
|
||||
|
||||
MMBearer *mm_bearer_list_find (MMBearerList *self,
|
||||
MMCommonBearerProperties *properties);
|
||||
MMBearerProperties *properties);
|
||||
|
||||
void mm_bearer_list_disconnect_all_bearers (MMBearerList *self,
|
||||
GAsyncReadyCallback callback,
|
||||
|
||||
+3
-3
@@ -630,7 +630,7 @@ mm_bearer_disconnect_force (MMBearer *self)
|
||||
|
||||
gboolean
|
||||
mm_bearer_cmp_properties (MMBearer *self,
|
||||
MMCommonBearerProperties *properties)
|
||||
MMBearerProperties *properties)
|
||||
{
|
||||
return MM_BEARER_GET_CLASS (self)->cmp_properties (self, properties);
|
||||
}
|
||||
@@ -639,12 +639,12 @@ mm_bearer_cmp_properties (MMBearer *self,
|
||||
|
||||
void
|
||||
mm_bearer_expose_properties (MMBearer *bearer,
|
||||
MMCommonBearerProperties *properties)
|
||||
MMBearerProperties *properties)
|
||||
{
|
||||
GVariant *dictionary;
|
||||
|
||||
/* Keep the whole list of properties in the interface */
|
||||
dictionary = mm_common_bearer_properties_get_dictionary (properties);
|
||||
dictionary = mm_bearer_properties_get_dictionary (properties);
|
||||
mm_gdbus_bearer_set_properties (MM_GDBUS_BEARER (bearer),
|
||||
dictionary);
|
||||
g_variant_unref (dictionary);
|
||||
|
||||
+3
-3
@@ -78,7 +78,7 @@ struct _MMBearerClass {
|
||||
|
||||
/* Check if the bearer has the exact same properties */
|
||||
gboolean (* cmp_properties) (MMBearer *self,
|
||||
MMCommonBearerProperties *properties);
|
||||
MMBearerProperties *properties);
|
||||
};
|
||||
|
||||
GType mm_bearer_get_type (void);
|
||||
@@ -87,7 +87,7 @@ void mm_bearer_export (MMBearer *self);
|
||||
const gchar *mm_bearer_get_path (MMBearer *bearer);
|
||||
|
||||
void mm_bearer_expose_properties (MMBearer *bearer,
|
||||
MMCommonBearerProperties *properties);
|
||||
MMBearerProperties *properties);
|
||||
|
||||
MMBearerStatus mm_bearer_get_status (MMBearer *bearer);
|
||||
|
||||
@@ -108,6 +108,6 @@ gboolean mm_bearer_disconnect_finish (MMBearer *self,
|
||||
void mm_bearer_disconnect_force (MMBearer *self);
|
||||
|
||||
gboolean mm_bearer_cmp_properties (MMBearer *self,
|
||||
MMCommonBearerProperties *properties);
|
||||
MMBearerProperties *properties);
|
||||
|
||||
#endif /* MM_BEARER_H */
|
||||
|
||||
+19
-19
@@ -1614,20 +1614,20 @@ disconnect (MMBearer *self,
|
||||
|
||||
static gboolean
|
||||
cmp_properties (MMBearer *self,
|
||||
MMCommonBearerProperties *properties)
|
||||
MMBearerProperties *properties)
|
||||
{
|
||||
MMBroadbandBearer *broadband = MM_BROADBAND_BEARER (self);
|
||||
|
||||
return ((!g_strcmp0 (broadband->priv->apn,
|
||||
mm_common_bearer_properties_get_apn (properties))) &&
|
||||
mm_bearer_properties_get_apn (properties))) &&
|
||||
(!g_strcmp0 (broadband->priv->ip_type,
|
||||
mm_common_bearer_properties_get_ip_type (properties))) &&
|
||||
mm_bearer_properties_get_ip_type (properties))) &&
|
||||
(broadband->priv->allow_roaming ==
|
||||
mm_common_bearer_properties_get_allow_roaming (properties)) &&
|
||||
mm_bearer_properties_get_allow_roaming (properties)) &&
|
||||
(!g_strcmp0 (broadband->priv->number,
|
||||
mm_common_bearer_properties_get_number (properties))) &&
|
||||
mm_bearer_properties_get_number (properties))) &&
|
||||
(broadband->priv->rm_protocol ==
|
||||
mm_common_bearer_properties_get_rm_protocol (properties)));
|
||||
mm_bearer_properties_get_rm_protocol (properties)));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
@@ -1843,15 +1843,15 @@ interface_initialization_step (InitAsyncContext *ctx)
|
||||
ctx->step++;
|
||||
|
||||
case INITIALIZATION_STEP_EXPOSE_PROPERTIES: {
|
||||
MMCommonBearerProperties *properties;
|
||||
MMBearerProperties *properties;
|
||||
|
||||
/* We create a new properties object just with the stuff we really used */
|
||||
properties = mm_common_bearer_properties_new ();
|
||||
mm_common_bearer_properties_set_apn (properties, ctx->self->priv->apn);
|
||||
mm_common_bearer_properties_set_number (properties, ctx->self->priv->number);
|
||||
mm_common_bearer_properties_set_rm_protocol (properties, ctx->self->priv->rm_protocol);
|
||||
mm_common_bearer_properties_set_ip_type (properties, ctx->self->priv->ip_type);
|
||||
mm_common_bearer_properties_set_allow_roaming (properties, ctx->self->priv->allow_roaming);
|
||||
properties = mm_bearer_properties_new ();
|
||||
mm_bearer_properties_set_apn (properties, ctx->self->priv->apn);
|
||||
mm_bearer_properties_set_number (properties, ctx->self->priv->number);
|
||||
mm_bearer_properties_set_rm_protocol (properties, ctx->self->priv->rm_protocol);
|
||||
mm_bearer_properties_set_ip_type (properties, ctx->self->priv->ip_type);
|
||||
mm_bearer_properties_set_allow_roaming (properties, ctx->self->priv->allow_roaming);
|
||||
mm_bearer_expose_properties (MM_BEARER (ctx->self), properties);
|
||||
g_object_unref (properties);
|
||||
|
||||
@@ -1931,7 +1931,7 @@ initable_init_async (GAsyncInitable *initable,
|
||||
|
||||
void
|
||||
mm_broadband_bearer_new (MMBroadbandModem *modem,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
@@ -1943,11 +1943,11 @@ mm_broadband_bearer_new (MMBroadbandModem *modem,
|
||||
callback,
|
||||
user_data,
|
||||
MM_BEARER_MODEM, modem,
|
||||
MM_BROADBAND_BEARER_3GPP_APN, mm_common_bearer_properties_get_apn (properties),
|
||||
MM_BROADBAND_BEARER_CDMA_NUMBER, mm_common_bearer_properties_get_number (properties),
|
||||
MM_BROADBAND_BEARER_CDMA_RM_PROTOCOL, mm_common_bearer_properties_get_rm_protocol (properties),
|
||||
MM_BROADBAND_BEARER_IP_TYPE, mm_common_bearer_properties_get_ip_type (properties),
|
||||
MM_BROADBAND_BEARER_ALLOW_ROAMING, mm_common_bearer_properties_get_allow_roaming (properties),
|
||||
MM_BROADBAND_BEARER_3GPP_APN, mm_bearer_properties_get_apn (properties),
|
||||
MM_BROADBAND_BEARER_CDMA_NUMBER, mm_bearer_properties_get_number (properties),
|
||||
MM_BROADBAND_BEARER_CDMA_RM_PROTOCOL, mm_bearer_properties_get_rm_protocol (properties),
|
||||
MM_BROADBAND_BEARER_IP_TYPE, mm_bearer_properties_get_ip_type (properties),
|
||||
MM_BROADBAND_BEARER_ALLOW_ROAMING, mm_bearer_properties_get_allow_roaming (properties),
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ GType mm_broadband_bearer_get_type (void);
|
||||
|
||||
/* Default 3GPP bearer creation implementation */
|
||||
void mm_broadband_bearer_new (MMBroadbandModem *modem,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
|
||||
@@ -231,7 +231,7 @@ broadband_bearer_new_ready (GObject *source,
|
||||
|
||||
static void
|
||||
modem_create_bearer (MMIfaceModem *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
|
||||
@@ -498,7 +498,7 @@ connection_step (ConnectionContext *ctx)
|
||||
|
||||
case CONNECTION_STEP_BEARER: {
|
||||
MMBearerList *list = NULL;
|
||||
MMCommonBearerProperties *bearer_properties;
|
||||
MMBearerProperties *bearer_properties;
|
||||
|
||||
mm_info ("Simple connect state (%d/%d): Bearer",
|
||||
ctx->step, CONNECTION_STEP_LAST);
|
||||
|
||||
@@ -196,7 +196,7 @@ create_bearer_ready (MMIfaceModem *self,
|
||||
|
||||
void
|
||||
mm_iface_modem_create_bearer (MMIfaceModem *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ handle_create_bearer_auth_ready (MMBaseModem *self,
|
||||
GAsyncResult *res,
|
||||
HandleCreateBearerContext *ctx)
|
||||
{
|
||||
MMCommonBearerProperties *properties;
|
||||
MMBearerProperties *properties;
|
||||
GError *error = NULL;
|
||||
|
||||
if (!mm_base_modem_authorize_finish (self, res, &error)) {
|
||||
@@ -279,7 +279,7 @@ handle_create_bearer_auth_ready (MMBaseModem *self,
|
||||
return;
|
||||
}
|
||||
|
||||
properties = mm_common_bearer_properties_new_from_dictionary (ctx->dictionary, &error);
|
||||
properties = mm_bearer_properties_new_from_dictionary (ctx->dictionary, &error);
|
||||
if (!properties) {
|
||||
g_dbus_method_invocation_take_error (ctx->invocation, error);
|
||||
handle_create_bearer_context_free (ctx);
|
||||
|
||||
@@ -280,7 +280,7 @@ struct _MMIfaceModem {
|
||||
|
||||
/* Create bearer */
|
||||
void (*create_bearer) (MMIfaceModem *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBearer * (*create_bearer_finish) (MMIfaceModem *self,
|
||||
@@ -395,7 +395,7 @@ gboolean mm_iface_modem_set_bands_finish (MMIfaceModem *self,
|
||||
|
||||
/* Allow creating bearers */
|
||||
void mm_iface_modem_create_bearer (MMIfaceModem *self,
|
||||
MMCommonBearerProperties *properties,
|
||||
MMBearerProperties *properties,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBearer *mm_iface_modem_create_bearer_finish (MMIfaceModem *self,
|
||||
|
||||
Reference in New Issue
Block a user