aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorRiccardo Vangelisti <riccardo.vangelisti@sadel.it>2015-05-04 11:13:19 +0200
committerAleksander Morgado <aleksander@aleksander.es>2015-08-02 10:39:12 +0200
commit5c446c3f4364ad2bf4fc2a581e664ba90d3474ba (patch)
tree668122eabed18348956e6ff5dac2b59f59539c61 /src/mm-modem-helpers.c
parent886e2963df8951fa163c27527352ebd10321d3e3 (diff)
broadband-modem: added voice call support
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 9f0feeac..36eb0390 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -323,6 +323,45 @@ mm_filter_supported_capabilities (MMModemCapability all,
/*****************************************************************************/
+GRegex *
+mm_voice_ring_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>RING<CR><LF>
+ */
+ return g_regex_new ("\\r\\nRING\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+GRegex *
+mm_voice_cring_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>+CRING: VOICE<CR><LF>
+ * <CR><LF>+CRING: DATA<CR><LF>
+ */
+ return g_regex_new ("\\r\\n\\+CRING:\\s*(\\S+)\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+GRegex *
+mm_voice_dtmf_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>^DDTMF: 1<CR><LF>
+ */
+ return g_regex_new ("\\r\\n\\^DDTMF:\\s*([0-9A-D\\*\\#])\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+/*************************************************************************/
+
/* +CREG: <stat> (GSM 07.07 CREG=1 unsolicited) */
#define CREG1 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])"