modem-helpers: new common regex for CIEV unsolicited messages

This commit is contained in:
Aleksander Morgado
2011-12-29 22:24:03 +01:00
parent d9338049c6
commit d5e6776a52
2 changed files with 13 additions and 0 deletions

View File

@@ -491,6 +491,17 @@ mm_3gpp_creg_regex_destroy (GPtrArray *array)
/*************************************************************************/
GRegex *
mm_3gpp_ciev_regex_get (void)
{
return g_regex_new ("\\r\\n\\+CIEV: (\\d+),(\\d)\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE,
0,
NULL);
}
/*************************************************************************/
static gulong
parse_uint (char *str, int base, glong nmin, glong nmax, gboolean *valid)
{

View File

@@ -62,6 +62,8 @@ gboolean mm_3gpp_parse_creg_response (GMatchInfo *info,
gboolean *out_cgreg,
GError **error);
GRegex *mm_3gpp_ciev_regex_get (void);
const char *mm_strip_tag (const char *str, const char *cmd);
gboolean mm_cdma_parse_spservice_response (const char *reply,