aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-11-30 13:29:00 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:30 +0100
commita92e9c59c1c2a4b2078e02d631b04eced68320be (patch)
treeb3cb815289adb68b171eccff6a6d455d42ad163b /src/mm-modem-helpers.h
parenta265798e0d4cf016417c85b7b8cfd288a493148f (diff)
modem-helpers: provide list of scanned networks in a list of structs
We provide the result of the +COPS=? parsing in a GList of MM3gppNetworkInfo structures. We avoid the previous hash table, or using a dictionary, as a list of structs with a predefined set of elements, which should be easier for plugins wanting to make their own version
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r--src/mm-modem-helpers.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h
index 2cec700c..24ad6f53 100644
--- a/src/mm-modem-helpers.h
+++ b/src/mm-modem-helpers.h
@@ -22,15 +22,19 @@
#include "mm-modem-cdma.h"
#include "mm-charsets.h"
-#define MM_SCAN_TAG_STATUS "status"
-#define MM_SCAN_TAG_OPER_LONG "operator-long"
-#define MM_SCAN_TAG_OPER_SHORT "operator-short"
-#define MM_SCAN_TAG_OPER_NUM "operator-num"
-#define MM_SCAN_TAG_ACCESS_TECH "access-tech"
-
-GPtrArray *mm_gsm_parse_scan_response (const char *reply, GError **error);
-
-void mm_gsm_destroy_scan_data (gpointer data);
+/* Network scan results expected */
+typedef struct {
+ MMModem3gppNetworkAvailability status;
+ gchar *operator_long;
+ gchar *operator_short;
+ gchar *operator_code; /* mandatory */
+ MMModemAccessTech access_tech;
+} MM3gppNetworkInfo;
+
+void mm_3gpp_network_info_list_free (GList *info_list);
+
+GList *mm_3gpp_parse_scan_response (const gchar *reply,
+ GError **error);
GPtrArray *mm_gsm_creg_regex_get (gboolean solicited);