aboutsummaryrefslogtreecommitdiff
path: root/plugins/cinterion/mm-modem-helpers-cinterion.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-11-24 01:53:11 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-01-04 14:11:17 +0100
commit37521ed2b611bdccd288cabc5fc4e48c51a32e49 (patch)
treef7349c269b04c5f687ae62ae15c9bc85a2b053cb /plugins/cinterion/mm-modem-helpers-cinterion.h
parentdc96829bb5a49216e45e770f249f29e725ce97ad (diff)
cinterion: simplify ^SWWAN response parsing
We get as input the ^SWWAN index we're interested in, and we loop through the list of ^SWWAN lines looking for the one we need. This updated helper method allows working with multi-line ^SWWAN responses, e.g. given when more than one PDP context is active.
Diffstat (limited to 'plugins/cinterion/mm-modem-helpers-cinterion.h')
-rw-r--r--plugins/cinterion/mm-modem-helpers-cinterion.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/cinterion/mm-modem-helpers-cinterion.h b/plugins/cinterion/mm-modem-helpers-cinterion.h
index c94341ec..5d05e2c6 100644
--- a/plugins/cinterion/mm-modem-helpers-cinterion.h
+++ b/plugins/cinterion/mm-modem-helpers-cinterion.h
@@ -67,7 +67,15 @@ gboolean mm_cinterion_parse_sind_response (const gchar *response,
/*****************************************************************************/
/* ^SWWAN response parser */
-gboolean mm_cinterion_parse_swwan_response (const gchar *response,
- GList **result,
- GError **error);
+
+typedef enum {
+ MM_SWWAN_STATE_UNKNOWN = -1,
+ MM_SWWAN_STATE_DISCONNECTED = 0,
+ MM_SWWAN_STATE_CONNECTED = 1,
+} MMSwwanState;
+
+MMSwwanState mm_cinterion_parse_swwan_response (const gchar *response,
+ guint swwan_index,
+ GError **error);
+
#endif /* MM_MODEM_HELPERS_CINTERION_H */