aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib/mm-location-3gpp.h
diff options
context:
space:
mode:
authorTeijo Kinnunen <teijo.kinnunen@uros.com>2021-05-06 14:35:41 +0300
committerTeijo Kinnunen <teijo.kinnunen@uros.com>2021-05-17 12:46:52 +0300
commit879ec1a5d4418ae1dfc137844fd2c06a35ffeabf (patch)
tree1a369fa46adc9586c239c60967d17710b1421546 /libmm-glib/mm-location-3gpp.h
parent14c4f27ae4a0ccdfec29090b9abd77112fec1516 (diff)
libmm-glib,iface-modem-location: add MMLocation3gpp 3 digit MNC support
MMLocation3gpp provides MCC/MNC information as integers, so it can not make distinction between operator codes such as XXX01 and XXX001. This commit deprecates mm_location_3gpp_get_mobile_network_code() and implements a new function mm_location_3gpp_get_operator_code() which provides the MCC+MNC in string format. The mm_location_3gpp_get_mobile_country_code() is still available as returning the MCC as an integer does not have ambiguity issues.
Diffstat (limited to 'libmm-glib/mm-location-3gpp.h')
-rw-r--r--libmm-glib/mm-location-3gpp.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/libmm-glib/mm-location-3gpp.h b/libmm-glib/mm-location-3gpp.h
index bac7a39f..5f078234 100644
--- a/libmm-glib/mm-location-3gpp.h
+++ b/libmm-glib/mm-location-3gpp.h
@@ -56,11 +56,16 @@ struct _MMLocation3gppClass {
GType mm_location_3gpp_get_type (void);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMLocation3gpp, g_object_unref)
-guint mm_location_3gpp_get_mobile_country_code (MMLocation3gpp *self);
-guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self);
-gulong mm_location_3gpp_get_location_area_code (MMLocation3gpp *self);
-gulong mm_location_3gpp_get_cell_id (MMLocation3gpp *self);
-gulong mm_location_3gpp_get_tracking_area_code (MMLocation3gpp *self);
+guint mm_location_3gpp_get_mobile_country_code (MMLocation3gpp *self);
+gulong mm_location_3gpp_get_location_area_code (MMLocation3gpp *self);
+gulong mm_location_3gpp_get_cell_id (MMLocation3gpp *self);
+gulong mm_location_3gpp_get_tracking_area_code (MMLocation3gpp *self);
+const gchar *mm_location_3gpp_get_operator_code (MMLocation3gpp *self);
+
+#ifndef MM_DISABLE_DEPRECATED
+G_DEPRECATED
+guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self);
+#endif
/*****************************************************************************/
/* ModemManager/libmm-glib/mmcli specific methods */
@@ -75,17 +80,15 @@ MMLocation3gpp *mm_location_3gpp_new (void);
MMLocation3gpp *mm_location_3gpp_new_from_string_variant (GVariant *string,
GError **error);
-gboolean mm_location_3gpp_set_mobile_country_code (MMLocation3gpp *self,
- guint mobile_country_code);
-gboolean mm_location_3gpp_set_mobile_network_code (MMLocation3gpp *self,
- guint mobile_network_code);
-gboolean mm_location_3gpp_set_location_area_code (MMLocation3gpp *self,
- gulong location_area_code);
-gboolean mm_location_3gpp_set_cell_id (MMLocation3gpp *self,
- gulong cell_id);
-gboolean mm_location_3gpp_set_tracking_area_code (MMLocation3gpp *self,
- gulong tracking_area_code);
-gboolean mm_location_3gpp_reset (MMLocation3gpp *self);
+gboolean mm_location_3gpp_set_operator_code (MMLocation3gpp *self,
+ const gchar *operator_code);
+gboolean mm_location_3gpp_set_location_area_code (MMLocation3gpp *self,
+ gulong location_area_code);
+gboolean mm_location_3gpp_set_cell_id (MMLocation3gpp *self,
+ gulong cell_id);
+gboolean mm_location_3gpp_set_tracking_area_code (MMLocation3gpp *self,
+ gulong tracking_area_code);
+gboolean mm_location_3gpp_reset (MMLocation3gpp *self);
#endif