altair-lte: add 'mm' prefix in the exported helper methods
This commit is contained in:
@@ -1229,7 +1229,7 @@ altair_load_internet_cid_ready (MMIfaceModem3gpp *self,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cid = altair_parse_cid (response, &error);
|
cid = mm_altair_parse_cid (response, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_simple_async_result_take_error (ctx->result, error);
|
g_simple_async_result_take_error (ctx->result, error);
|
||||||
load_subscription_state_context_complete_and_free (ctx);
|
load_subscription_state_context_complete_and_free (ctx);
|
||||||
@@ -1237,7 +1237,7 @@ altair_load_internet_cid_ready (MMIfaceModem3gpp *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
mm_dbg ("Parsing vendor PCO info: %s", ctx->pco_info);
|
mm_dbg ("Parsing vendor PCO info: %s", ctx->pco_info);
|
||||||
pco_value = altair_parse_vendor_pco_info (ctx->pco_info, cid, &error);
|
pco_value = mm_altair_parse_vendor_pco_info (ctx->pco_info, cid, &error);
|
||||||
if (error) {
|
if (error) {
|
||||||
g_simple_async_result_take_error (ctx->result, error);
|
g_simple_async_result_take_error (ctx->result, error);
|
||||||
load_subscription_state_context_complete_and_free (ctx);
|
load_subscription_state_context_complete_and_free (ctx);
|
||||||
|
@@ -71,7 +71,7 @@ mm_altair_parse_ceer_response (const gchar *response,
|
|||||||
/* %CGINFO="cid",1 response parser */
|
/* %CGINFO="cid",1 response parser */
|
||||||
|
|
||||||
guint
|
guint
|
||||||
altair_parse_cid (const gchar *response, GError **error)
|
mm_altair_parse_cid (const gchar *response, GError **error)
|
||||||
{
|
{
|
||||||
GRegex *regex;
|
GRegex *regex;
|
||||||
GMatchInfo *match_info;
|
GMatchInfo *match_info;
|
||||||
@@ -134,9 +134,9 @@ altair_extract_vzw_pco_value (const gchar *pco_payload, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
guint
|
guint
|
||||||
altair_parse_vendor_pco_info (const gchar *pco_info,
|
mm_altair_parse_vendor_pco_info (const gchar *pco_info,
|
||||||
guint cid,
|
guint cid,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GRegex *regex;
|
GRegex *regex;
|
||||||
GMatchInfo *match_info;
|
GMatchInfo *match_info;
|
||||||
|
@@ -24,11 +24,11 @@ gchar *mm_altair_parse_ceer_response (const gchar *response,
|
|||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
/* %CGINFO="cid",1 response parser */
|
/* %CGINFO="cid",1 response parser */
|
||||||
guint altair_parse_cid (const gchar *response, GError **error);
|
guint mm_altair_parse_cid (const gchar *response, GError **error);
|
||||||
|
|
||||||
/* %PCOINFO response parser */
|
/* %PCOINFO response parser */
|
||||||
guint altair_parse_vendor_pco_info (const gchar *pco_info,
|
guint mm_altair_parse_vendor_pco_info (const gchar *pco_info,
|
||||||
guint cid,
|
guint cid,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
#endif /* MM_MODEM_HELPERS_ALTAIR_H */
|
#endif /* MM_MODEM_HELPERS_ALTAIR_H */
|
||||||
|
@@ -65,8 +65,8 @@ test_ceer (void)
|
|||||||
static void
|
static void
|
||||||
test_parse_cid (void)
|
test_parse_cid (void)
|
||||||
{
|
{
|
||||||
g_assert (altair_parse_cid ("%CGINFO: 2", NULL) == 2);
|
g_assert (mm_altair_parse_cid ("%CGINFO: 2", NULL) == 2);
|
||||||
g_assert (altair_parse_cid ("%CGINFO:blah", NULL) == -1);
|
g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) == -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -75,26 +75,26 @@ test_parse_vendor_pco_info (void)
|
|||||||
guint pco_value;
|
guint pco_value;
|
||||||
|
|
||||||
/* Valid PCO values */
|
/* Valid PCO values */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018400", 3, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018400", 3, NULL);
|
||||||
g_assert (pco_value == 0);
|
g_assert (pco_value == 0);
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018403", 3, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018403", 3, NULL);
|
||||||
g_assert (pco_value == 3);
|
g_assert (pco_value == 3);
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018405", 3, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018405", 3, NULL);
|
||||||
g_assert (pco_value == 5);
|
g_assert (pco_value == 5);
|
||||||
/* Different container */
|
/* Different container */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,F000,13018401", 3, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,F000,13018401", 3, NULL);
|
||||||
g_assert (pco_value == -1);
|
g_assert (pco_value == -1);
|
||||||
/* Different CID */
|
/* Different CID */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018401", 1, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018401", 1, NULL);
|
||||||
g_assert (pco_value == -1);
|
g_assert (pco_value == -1);
|
||||||
/* Different payload */
|
/* Different payload */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018501", 1, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,3,FF00,13018501", 1, NULL);
|
||||||
g_assert (pco_value == -1);
|
g_assert (pco_value == -1);
|
||||||
/* Bad PCO info */
|
/* Bad PCO info */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: blah,blah,FF00,13018401", 1, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: blah,blah,FF00,13018401", 1, NULL);
|
||||||
g_assert (pco_value == -1);
|
g_assert (pco_value == -1);
|
||||||
/* Multiline PCO info */
|
/* Multiline PCO info */
|
||||||
pco_value = altair_parse_vendor_pco_info ("%PCOINFO: 1,1,FF00,13018400\r\n%PCOINFO: 1,3,FF00,13018403", 3, NULL);
|
pco_value = mm_altair_parse_vendor_pco_info ("%PCOINFO: 1,1,FF00,13018400\r\n%PCOINFO: 1,3,FF00,13018403", 3, NULL);
|
||||||
g_assert (pco_value == 3);
|
g_assert (pco_value == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user