aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port-probe-at-command.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-09-10 11:40:23 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:20 +0100
commitb73fb8e8f27ac34ec5aa16e3e5a3605b03dbe740 (patch)
treea75c866c25906dc7d67517e979495984075ddc8b /src/mm-port-probe-at-command.c
parent1f9fd9e0beba7fd90c46d057c849fb007001b75f (diff)
port-probe: enable probing for Product
Diffstat (limited to 'src/mm-port-probe-at-command.c')
-rw-r--r--src/mm-port-probe-at-command.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/mm-port-probe-at-command.c b/src/mm-port-probe-at-command.c
index 099f85fd..ecf494c4 100644
--- a/src/mm-port-probe-at-command.c
+++ b/src/mm-port-probe-at-command.c
@@ -218,3 +218,33 @@ mm_port_probe_at_command_get_vendor_probing (void)
{
return vendor_probing;
}
+
+/* ---- PRODUCT probing ---- */
+
+static gboolean
+parse_product (const gchar *response,
+ const GError *error,
+ GValue *result,
+ GError **result_error)
+
+{
+ gchar *str;
+
+ str = g_strstrip (g_strdelimit (g_strdup (response), "\r\n", ' '));
+ g_value_init (result, G_TYPE_STRING);
+ g_value_take_string (result, str);
+ return TRUE;
+}
+
+static const MMPortProbeAtCommand product_probing[] = {
+ { "+CGMM", parse_product },
+ { "+GMM", parse_product },
+ { "I", parse_product },
+ { NULL }
+};
+
+const MMPortProbeAtCommand *
+mm_port_probe_at_command_get_product_probing (void)
+{
+ return product_probing;
+}