api,dbus: rename AllowedBands' to just Bands'

ModemManager will load:
  1) The list of supported bands. Note that this doesn't mean that any possible
     combination of bands is supported, as modems may support only specific
     combinations, but at least gives a rough idea of what the modem is capable
     of handling.

  2) The list of CURRENT bands. There is no such "Allowed" bands, as we do with
     modes, modems will have a specific set of bands being currently used, which
     will be reported in the `Bands' property.

If the modem allows modifying the list of bands to use, this can be done with
the `SetBands()' method. If the modem doesn't support using a specific
combination of bands, this method will report an error.
This commit is contained in:
Aleksander Morgado
2012-03-16 14:28:13 +01:00
parent 76e52236a4
commit 09d2f062c7
12 changed files with 236 additions and 244 deletions
@@ -34,13 +34,13 @@ mm_modem_simple_connect_properties_set_operator_id (MMModemSimpleConnectProperti
}
void
mm_modem_simple_connect_properties_set_allowed_bands (MMModemSimpleConnectProperties *self,
const MMModemBand *bands,
guint n_bands)
mm_modem_simple_connect_properties_set_bands (MMModemSimpleConnectProperties *self,
const MMModemBand *bands,
guint n_bands)
{
g_return_if_fail (MM_IS_MODEM_SIMPLE_CONNECT_PROPERTIES (self));
mm_common_connect_properties_set_allowed_bands (self, bands, n_bands);
mm_common_connect_properties_set_bands (self, bands, n_bands);
}
void
@@ -39,7 +39,7 @@ void mm_modem_simple_connect_properties_set_pin (
void mm_modem_simple_connect_properties_set_operator_id (
MMModemSimpleConnectProperties *properties,
const gchar *operator_id);
void mm_modem_simple_connect_properties_set_allowed_bands (
void mm_modem_simple_connect_properties_set_bands (
MMModemSimpleConnectProperties *properties,
const MMModemBand *bands,
guint n_bands);
+29 -29
View File
@@ -680,20 +680,20 @@ mm_modem_get_supported_bands (MMModem *self,
}
/**
* mm_modem_get_allowed_bands:
* mm_modem_get_bands:
* @self: A #MMModem.
* @bands: (out): Return location for the array of #MMModemBand values.
* @n_bands: (out): Return location for the number of values in @bands.
*
* Gets the list of radio frequency and technology bands the #MMModem is currently
* allowed to use when connecting to a network.
* using when connecting to a network.
*
* For POTS devices, only the #MM_MODEM_BAND_ANY band is supported.
*/
void
mm_modem_get_allowed_bands (MMModem *self,
MMModemBand **bands,
guint *n_bands)
mm_modem_get_bands (MMModem *self,
MMModemBand **bands,
guint *n_bands)
{
GArray *array;
@@ -701,7 +701,7 @@ mm_modem_get_allowed_bands (MMModem *self,
g_return_if_fail (bands != NULL);
g_return_if_fail (n_bands != NULL);
array = mm_common_bands_variant_to_garray (mm_gdbus_modem_get_allowed_bands (self));
array = mm_common_bands_variant_to_garray (mm_gdbus_modem_get_bands (self));
*n_bands = array->len;
*bands = (MMModemBand *)g_array_free (array, FALSE);
}
@@ -1555,44 +1555,44 @@ mm_modem_set_allowed_modes_sync (MMModem *self,
}
gboolean
mm_modem_set_allowed_bands_finish (MMModem *self,
GAsyncResult *res,
GError **error)
mm_modem_set_bands_finish (MMModem *self,
GAsyncResult *res,
GError **error)
{
g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), FALSE);
return mm_gdbus_modem_call_set_allowed_bands_finish (self,
res,
error);
return mm_gdbus_modem_call_set_bands_finish (self,
res,
error);
}
void
mm_modem_set_allowed_bands (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
mm_modem_set_bands (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_return_if_fail (MM_GDBUS_IS_MODEM (self));
mm_gdbus_modem_call_set_allowed_bands (self,
mm_common_bands_array_to_variant (bands, n_bands),
cancellable,
callback,
user_data);
mm_gdbus_modem_call_set_bands (self,
mm_common_bands_array_to_variant (bands, n_bands),
cancellable,
callback,
user_data);
}
gboolean
mm_modem_set_allowed_bands_sync (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GError **error)
mm_modem_set_bands_sync (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GError **error)
{
g_return_val_if_fail (MM_GDBUS_IS_MODEM (self), FALSE);
return (mm_gdbus_modem_call_set_allowed_bands_sync (
return (mm_gdbus_modem_call_set_bands_sync (
self,
mm_common_bands_array_to_variant (bands, n_bands),
cancellable,
+15 -15
View File
@@ -74,7 +74,7 @@ MMModemMode mm_modem_get_preferred_mode (MMModem *self);
void mm_modem_get_supported_bands (MMModem *self,
MMModemBand **bands,
guint *n_bands);
void mm_modem_get_allowed_bands (MMModem *self,
void mm_modem_get_bands (MMModem *self,
MMModemBand **bands,
guint *n_bands);
@@ -191,20 +191,20 @@ gboolean mm_modem_set_allowed_modes_sync (MMModem *self,
GCancellable *cancellable,
GError **error);
void mm_modem_set_allowed_bands (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_modem_set_allowed_bands_finish (MMModem *self,
GAsyncResult *res,
GError **error);
gboolean mm_modem_set_allowed_bands_sync (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GError **error);
void mm_modem_set_bands (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_modem_set_bands_finish (MMModem *self,
GAsyncResult *res,
GError **error);
gboolean mm_modem_set_bands_sync (MMModem *self,
const MMModemBand *bands,
guint n_bands,
GCancellable *cancellable,
GError **error);
void mm_modem_get_sim (MMModem *self,
GCancellable *cancellable,