aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-03-30 14:53:17 +0100
committerAleksander Morgado <aleksander@lanedo.com>2013-04-02 09:53:46 +0200
commitc1e70924d8197c51bb8dedb2d232f03dff87aa7b (patch)
tree00564f9f9cf6a90e0ef4d188f5b7c5f9050f6960 /src/mm-modem-helpers.h
parentbb4f4f4e9e91d79974d1bb4ce3d42c5b0bbc734d (diff)
broadband-modem: update CMGL parsing logic
Pantech UMW190 modem uses a custom +CMGL response which includes only three fields before the actual PDU, e.g: +CMGL: <index>,<status>,<something>\r\n<PDU> instead of what we had before: +CMGL: <index>,<status>,<alpha>,<length>\r\n<PDU> The CMGL parsing logic is now updated to use a regex to match the reply, and also considering the UMW190 specific case. Actually, we end up reading only the two first fields (index and status) which are the ones we really need, so we skip the <length> and the <alpha> if given. Added also unit tests to cover all these known cases. Partially fixes https://bugzilla.gnome.org/show_bug.cgi?id=696723 (missing the actual PDU parsing fixes).
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r--src/mm-modem-helpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h
index aa646993..eb02337e 100644
--- a/src/mm-modem-helpers.h
+++ b/src/mm-modem-helpers.h
@@ -150,6 +150,17 @@ gint mm_3gpp_cind_response_get_max (MM3gppCindResponse *r);
GByteArray *mm_3gpp_parse_cind_read_response (const gchar *reply,
GError **error);
+/* AT+CMGL=4 (list sms parts) response parser */
+typedef struct {
+ gint index;
+ gint status;
+ gchar *pdu;
+} MM3gppPduInfo;
+void mm_3gpp_pdu_info_list_free (GList *info_list);
+GList *mm_3gpp_parse_pdu_cmgl_response (const gchar *str,
+ GError **error);
+
+
/* Additional 3GPP-specific helpers */
MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str);