libmm-glib: new common helpers to check band types
This commit is contained in:

committed by
Dan Williams

parent
6262e844f5
commit
2e0471fe6a
@@ -668,6 +668,32 @@ mm_common_bands_garray_sort (GArray *array)
|
||||
g_array_sort (array, (GCompareFunc) cmp_band);
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_common_band_is_gsm (MMModemBand band)
|
||||
{
|
||||
return ((band >= MM_MODEM_BAND_EGSM && band <= MM_MODEM_BAND_G850) ||
|
||||
(band >= MM_MODEM_BAND_G450 && band <= MM_MODEM_BAND_G810));
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_common_band_is_utran (MMModemBand band)
|
||||
{
|
||||
return ((band >= MM_MODEM_BAND_UTRAN_1 && band <= MM_MODEM_BAND_UTRAN_7) ||
|
||||
(band >= MM_MODEM_BAND_UTRAN_10 && band <= MM_MODEM_BAND_UTRAN_32));
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_common_band_is_eutran (MMModemBand band)
|
||||
{
|
||||
return (band >= MM_MODEM_BAND_EUTRAN_1 && band <= MM_MODEM_BAND_EUTRAN_71);
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_common_band_is_cdma (MMModemBand band)
|
||||
{
|
||||
return (band >= MM_MODEM_BAND_CDMA_BC0 && band <= MM_MODEM_BAND_CDMA_BC19);
|
||||
}
|
||||
|
||||
GArray *
|
||||
mm_common_mode_combinations_variant_to_garray (GVariant *variant)
|
||||
{
|
||||
|
@@ -106,6 +106,11 @@ GVariant *mm_common_build_bands_unknown (void);
|
||||
gboolean mm_common_bands_garray_cmp (GArray *a, GArray *b);
|
||||
void mm_common_bands_garray_sort (GArray *array);
|
||||
|
||||
gboolean mm_common_band_is_gsm (MMModemBand band);
|
||||
gboolean mm_common_band_is_utran (MMModemBand band);
|
||||
gboolean mm_common_band_is_eutran (MMModemBand band);
|
||||
gboolean mm_common_band_is_cdma (MMModemBand band);
|
||||
|
||||
GArray *mm_common_mode_combinations_variant_to_garray (GVariant *variant);
|
||||
MMModemModeCombination *mm_common_mode_combinations_variant_to_array (GVariant *variant,
|
||||
guint *n_modes);
|
||||
|
Reference in New Issue
Block a user