diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-09-10 11:19:12 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:20 +0100 |
commit | 1f9fd9e0beba7fd90c46d057c849fb007001b75f (patch) | |
tree | 095659d36721cf94e69456befabd386aff4bef6d /src/mm-port-probe-at-command.c | |
parent | 05f8493ee7baa43cb7ff1242eae4930fc85e6ee5 (diff) |
port-probe: enable probing for Vendor
Diffstat (limited to 'src/mm-port-probe-at-command.c')
-rw-r--r-- | src/mm-port-probe-at-command.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mm-port-probe-at-command.c b/src/mm-port-probe-at-command.c index 72a49f1b..099f85fd 100644 --- a/src/mm-port-probe-at-command.c +++ b/src/mm-port-probe-at-command.c @@ -190,3 +190,31 @@ mm_port_probe_at_command_get_capabilities_probing (void) return capabilities_probing; } +/* ---- VENDOR probing ---- */ + +static gboolean +parse_vendor (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 vendor_probing[] = { + { "+CGMI", parse_vendor }, + { "+GMI", parse_vendor }, + { "I", parse_vendor }, + { NULL } +}; + +const MMPortProbeAtCommand * +mm_port_probe_at_command_get_vendor_probing (void) +{ + return vendor_probing; +} |