[rygel] PluginLoader keeps a hashtable of plugins



commit a2b7d91e927d61d6f58af21f1a9cad49d9ca9e43
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue May 12 20:10:00 2009 +0300

    PluginLoader keeps a hashtable of plugins
---
 src/rygel/rygel-plugin-loader.vala |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/rygel/rygel-plugin-loader.vala b/src/rygel/rygel-plugin-loader.vala
index ca2a3df..ac41864 100644
--- a/src/rygel/rygel-plugin-loader.vala
+++ b/src/rygel/rygel-plugin-loader.vala
@@ -23,6 +23,7 @@
 
 using CStuff;
 using GUPnP;
+using Gee;
 
 /**
  * Responsible for plugin loading. Probes for shared library files in a specific
@@ -33,9 +34,15 @@ using GUPnP;
 public class Rygel.PluginLoader : Object {
     private delegate void ModuleInitFunc (PluginLoader loader);
 
+    private HashMap<string,Plugin> plugin_hash;
+
     // Signals
     public signal void plugin_available (Plugin plugin);
 
+    public PluginLoader () {
+        this.plugin_hash = new HashMap<string,Plugin> ();
+    }
+
     // Plugin loading functions
     public void load_plugins () {
         assert (Module.supported());
@@ -47,6 +54,8 @@ public class Rygel.PluginLoader : Object {
     }
 
     public void add_plugin (Plugin plugin) {
+        this.plugin_hash.set (plugin.name, plugin);
+
         this.plugin_available (plugin);
     }
 
@@ -88,7 +97,7 @@ public class Rygel.PluginLoader : Object {
         FileEnumerator enumerator = (FileEnumerator) source_object;
         File dir = (File) enumerator.get_container ();
 
-        List<FileInfo> infos;
+        GLib.List<FileInfo> infos;
         try {
             infos = enumerator.next_files_finish (res);
         } catch (Error error) {



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