From 9b0f6c83f2e34620c99a7d3b2c945ef92314369a Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 11 Jul 2012 06:53:56 +0200 Subject: plugin: renamed `custom-init' property to `custom-at-probe' The `custom-at-probe' property is just to modify the way we check for AT port support. --- docs/reference/api/ModemManager-overview.xml | 50 ++++++++++++---------------- 1 file changed, 21 insertions(+), 29 deletions(-) (limited to 'docs/reference/api') diff --git a/docs/reference/api/ModemManager-overview.xml b/docs/reference/api/ModemManager-overview.xml index dee7b5ae..f5661e6f 100644 --- a/docs/reference/api/ModemManager-overview.xml +++ b/docs/reference/api/ModemManager-overview.xml @@ -171,26 +171,6 @@ prepare the information required in any expected post-probing filter. - - Custom AT initialization - - This property allows plugins to specify custom initialization sequences to - run in the modem before any additional probing happens. This helps in the cases - where modems require commands to, for example, shutdown unsolicited messages. - - - An additional benefit of the custom initialization through AT commands is that - it can already provide information on whether the port is AT or not. In other - words, a plugin with custom initialization sequence which reports that the - port being initialized is AT won't run the generic checks to see if the port is - AT or not. - - - This configuration is specified by the MM_PLUGIN_CUSTOM_INIT - property in the MMPlugin object provided - by the plugin. - - AT allowed @@ -216,6 +196,18 @@ by the plugin. + + Custom AT probing + + This property allows plugins to specify custom commands to check whether a port + is AT or not. By default, the 'AT' command will be used if no custom one specified. + + + This configuration is specified by the MM_PLUGIN_CUSTOM_AT_PROBE + property in the MMPlugin object provided + by the plugin. + + QCDM allowed @@ -352,10 +344,10 @@ mm_plugin_create (void) Probing setup for a plugin with custom initialization requirements static gboolean -parse_init (const gchar *response, - const GError *error, - GValue *result, - GError **result_error) +parse_custom_at (const gchar *response, + const GError *error, + GValue *result, + GError **result_error) { if (error) { *result_error = g_error_copy (error); @@ -368,8 +360,8 @@ parse_init (const gchar *response, return TRUE; } -static const MMPortProbeAtCommand custom_init[] = { - { "ATE1 E0", parse_init }, +static const MMPortProbeAtCommand custom_at_probe[] = { + { "AT+SOMETHING", parse_custom_at }, { NULL } }; @@ -380,7 +372,7 @@ mm_plugin_create (void) static const guint16 vendor_ids[] = { 0xabcd, 0 }; return MM_PLUGIN ( - g_object_new (MM_TYPE_PLUGIN_NOKIA, + g_object_new (MM_TYPE_PLUGIN_EXAMPLE, MM_PLUGIN_NAME, "Example", /* Next items are pre-probing filters */ @@ -388,8 +380,8 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, /* Next items are probing sequence setup */ - MM_PLUGIN_CUSTOM_INIT, custom_init, - MM_PLUGIN_ALLOWED_AT, TRUE, + MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe, + MM_PLUGIN_ALLOWED_AT, TRUE, /* No post-probing filters */ NULL)); -- cgit v1.2.3-70-g09d2