aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-08-03 11:10:04 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-10-12 11:29:52 +0200
commit467b3c57f01b37dbcec8d32a449654aac40f90d0 (patch)
tree30d92cccb0e081e0f6f4c2335e4b3cf6bed3cda5 /src/mm-modem-helpers.h
parentb117321980c39c2dcc50789058017fa3201e7003 (diff)
modem-helpers: new COPS? response parser
Split into two different actions the actual COPS? response parsing and the operator name normalization process. Also, allow parsing not only the operator string, but also the format, mode and the optional access technology value.
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r--src/mm-modem-helpers.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h
index 3ab618b2..00536889 100644
--- a/src/mm-modem-helpers.h
+++ b/src/mm-modem-helpers.h
@@ -116,6 +116,14 @@ void mm_3gpp_network_info_list_free (GList *info_list);
GList *mm_3gpp_parse_cops_test_response (const gchar *reply,
GError **error);
+/* AT+COPS? (current operator) response parser */
+gboolean mm_3gpp_parse_cops_read_response (const gchar *response,
+ guint *out_mode,
+ guint *out_format,
+ gchar **out_operator,
+ MMModemAccessTechnology *out_act,
+ GError **error);
+
/* AT+CGDCONT=? (PDP context format) test parser */
typedef struct {
guint min_cid;
@@ -240,8 +248,8 @@ gchar *mm_3gpp_facility_to_acronym (MMModem3gppFacility facility);
MMModemAccessTechnology mm_string_to_access_tech (const gchar *string);
-gchar *mm_3gpp_parse_operator (const gchar *reply,
- MMModemCharset cur_charset);
+void mm_3gpp_normalize_operator_name (gchar **operator,
+ MMModemCharset cur_charset);
gboolean mm_3gpp_parse_operator_id (const gchar *operator_id,
guint16 *mcc,