[vinagre/plugin] Added a function to get a plugin based on protocol name.



commit 8b3dc2e4c560b55b547c2f6335cff74657210b5d
Author: Jonh Wendell <jwendell gnome org>
Date:   Thu Jul 23 17:37:41 2009 -0300

    Added a function to get a plugin based on protocol name.

 vinagre/vinagre-plugins-engine.c |    9 +++++++++
 vinagre/vinagre-plugins-engine.h |    2 ++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-plugins-engine.c b/vinagre/vinagre-plugins-engine.c
index afcc935..5366bb7 100644
--- a/vinagre/vinagre-plugins-engine.c
+++ b/vinagre/vinagre-plugins-engine.c
@@ -910,4 +910,13 @@ vinagre_plugin_engine_get_plugins_by_protocol (VinagrePluginsEngine *engine)
   return engine->priv->protocols;
 }
 
+VinagrePlugin *
+vinagre_plugins_engine_get_plugin_by_protocol (VinagrePluginsEngine *engine,
+					      const gchar          *protocol)
+{
+  g_return_val_if_fail (VINAGRE_IS_PLUGINS_ENGINE (engine), NULL);
+
+  return g_hash_table_lookup (engine->priv->protocols, (gconstpointer) protocol);
+}
+
 /* vim: set ts=8: */
diff --git a/vinagre/vinagre-plugins-engine.h b/vinagre/vinagre-plugins-engine.h
index 96f5a9b..d7b45c0 100644
--- a/vinagre/vinagre-plugins-engine.h
+++ b/vinagre/vinagre-plugins-engine.h
@@ -93,6 +93,8 @@ void			 vinagre_plugins_engine_active_plugins_changed	(VinagrePluginsEngine *eng
 void			 vinagre_plugins_engine_rescan_plugins		(VinagrePluginsEngine *engine);
 
 GHashTable		*vinagre_plugin_engine_get_plugins_by_protocol	(VinagrePluginsEngine *engine);
+VinagrePlugin		*vinagre_plugins_engine_get_plugin_by_protocol	(VinagrePluginsEngine *engine,
+									 const gchar          *protocol);
 
 G_END_DECLS
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]