aboutsummaryrefslogtreecommitdiff
path: root/src/mm-plugin.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@gnu.org>2011-09-08 18:22:19 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:20 +0100
commit2d8fb51c6b6669afa60594c04244f17653df0fb7 (patch)
treed375943e8c3a4448f7a0e0616c0403b762da3beb /src/mm-plugin.c
parent806aabd22d725a329bdfe12ac258cb1db293fc3d (diff)
plugin-base: new 'custom-init' property
The plugins can set this property to provide custom initialization commands that should be issued to the modem before real probing starts. The value given to the property should be an array of MMPortProbeAtCommand variables finished with a last one exposing a NULL command, e.g.: static gboolean parse_init (const gchar *response, const GError *error, GValue *result, GError **result_error) { if (error) return FALSE; /* If we didn't get any error, it is an AT port */ g_value_init (result, G_TYPE_BOOLEAN); g_value_set_boolean (result, TRUE); return TRUE; } static gboolean parse_init_last (const gchar *response, const GError *error, GValue *result, GError **result_error) { g_value_init (result, G_TYPE_BOOLEAN); /* On last error, report as not being an AT port */ g_value_set_boolean (result, error ? FALSE : TRUE); return TRUE; } static const MMPortProbeAtCommand custom_init[] = { { "ATE1 E0", parse_init }, { "ATE1 E0", parse_init }, { "ATE1 E0", parse_init_last }, { NULL } };
Diffstat (limited to 'src/mm-plugin.c')
0 files changed, 0 insertions, 0 deletions