plugin-base: rename 'cancel_supports_port' to 'supports_port_cancel'

We now have 'supports_port' (async method) and 'supports_port_finish' (to get
the result of the async method), so it makes sense to rename the method to
'supports_port_cancel'.
This commit is contained in:
Aleksander Morgado
2011-09-05 00:05:27 +02:00
committed by Aleksander Morgado
parent dc30536456
commit 62030debf2
4 changed files with 15 additions and 9 deletions

View File

@@ -458,7 +458,9 @@ supports_info_free (SupportsInfo *info)
{ {
/* Cancel any in-process operation on the first plugin */ /* Cancel any in-process operation on the first plugin */
if (info->cur_plugin) if (info->cur_plugin)
mm_plugin_cancel_supports_port (MM_PLUGIN (info->cur_plugin->data), info->subsys, info->name); mm_plugin_supports_port_cancel (MM_PLUGIN (info->cur_plugin->data),
info->subsys,
info->name);
if (info->defer_id) if (info->defer_id)
g_source_remove (info->defer_id); g_source_remove (info->defer_id);
@@ -657,7 +659,9 @@ do_grab_port (gpointer user_data)
/* Tell each plugin to clean up any outstanding supports task */ /* Tell each plugin to clean up any outstanding supports task */
for (iter = info->plugins; iter; iter = g_slist_next (iter)) for (iter = info->plugins; iter; iter = g_slist_next (iter))
mm_plugin_cancel_supports_port (MM_PLUGIN (iter->data), info->subsys, info->name); mm_plugin_supports_port_cancel (MM_PLUGIN (iter->data),
info->subsys,
info->name);
g_slist_free (info->plugins); g_slist_free (info->plugins);
info->cur_plugin = info->plugins = NULL; info->cur_plugin = info->plugins = NULL;
@@ -980,7 +984,9 @@ device_removed (MMManager *manager, GUdevDevice *device)
if (info) { if (info) {
if (info->plugins) if (info->plugins)
mm_plugin_cancel_supports_port (MM_PLUGIN (info->plugins->data), subsys, name); mm_plugin_supports_port_cancel (MM_PLUGIN (info->plugins->data),
subsys,
name);
g_hash_table_remove (priv->supports, key); g_hash_table_remove (priv->supports, key);
} }

View File

@@ -1447,7 +1447,7 @@ out:
} }
static void static void
cancel_supports_port (MMPlugin *plugin, supports_port_cancel (MMPlugin *plugin,
const char *subsys, const char *subsys,
const char *name) const char *name)
{ {
@@ -1508,7 +1508,7 @@ plugin_init (MMPlugin *plugin_class)
plugin_class->get_sort_last = get_sort_last; plugin_class->get_sort_last = get_sort_last;
plugin_class->supports_port = supports_port; plugin_class->supports_port = supports_port;
plugin_class->supports_port_finish = supports_port_finish; plugin_class->supports_port_finish = supports_port_finish;
plugin_class->cancel_supports_port = cancel_supports_port; plugin_class->supports_port_cancel = supports_port_cancel;
plugin_class->grab_port = grab_port; plugin_class->grab_port = grab_port;
} }

View File

@@ -74,7 +74,7 @@ mm_plugin_supports_port_finish (MMPlugin *self,
} }
void void
mm_plugin_cancel_supports_port (MMPlugin *plugin, mm_plugin_supports_port_cancel (MMPlugin *plugin,
const char *subsys, const char *subsys,
const char *name) const char *name)
{ {
@@ -82,7 +82,7 @@ mm_plugin_cancel_supports_port (MMPlugin *plugin,
g_return_if_fail (subsys != NULL); g_return_if_fail (subsys != NULL);
g_return_if_fail (name != NULL); g_return_if_fail (name != NULL);
MM_PLUGIN_GET_INTERFACE (plugin)->cancel_supports_port (plugin, subsys, name); MM_PLUGIN_GET_INTERFACE (plugin)->supports_port_cancel (plugin, subsys, name);
} }
MMModem * MMModem *

View File

@@ -91,7 +91,7 @@ struct _MMPlugin {
* be called on the second plugin to allow that plugin to clean up resources * be called on the second plugin to allow that plugin to clean up resources
* used while determining it's level of support for the port. * used while determining it's level of support for the port.
*/ */
void (*cancel_supports_port) (MMPlugin *self, void (*supports_port_cancel) (MMPlugin *self,
const char *subsys, const char *subsys,
const char *name); const char *name);
@@ -129,7 +129,7 @@ MMPluginSupportsResult mm_plugin_supports_port_finish (MMPlugin *plugin,
guint *level, guint *level,
GError **error); GError **error);
void mm_plugin_cancel_supports_port (MMPlugin *plugin, void mm_plugin_supports_port_cancel (MMPlugin *plugin,
const char *subsys, const char *subsys,
const char *name); const char *name);