diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-06-07 18:06:53 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-07-11 23:00:50 +0200 |
commit | dca00271ce8a5020b78e46d6f0e3eca90ef69d67 (patch) | |
tree | 2a279bb9e89aef8fd1d23fcd20264ee972d8747b /src/mm-modem-helpers.c | |
parent | d9a7b403eeb12b22f9d63aae9c6956d735cdd97a (diff) |
broadband-modem: implement +CCWA URC handling
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r-- | src/mm-modem-helpers.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c index 5f027fdd..f94b26f3 100644 --- a/src/mm-modem-helpers.c +++ b/src/mm-modem-helpers.c @@ -558,6 +558,23 @@ mm_voice_clip_regex_get (void) NULL); } +GRegex * +mm_voice_ccwa_regex_get (void) +{ + /* + * Only first 3 fields are mandatory, but we read only the first one + * +CCWA: <number>,<type>,<class>,[<alpha>][,<CLI_validity>[,<subaddr>,<satype>[,<priority>]]] + * + * Example: + * <CR><LF>+CCWA: "+393351391306",145,1 + * \_ Number \_ Type + */ + return g_regex_new ("\\r\\n\\+CCWA:\\s*([^,\\s]*)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,?(.*)\\r\\n", + G_REGEX_RAW | G_REGEX_OPTIMIZE, + 0, + NULL); +} + /*************************************************************************/ static MMFlowControl |