[rygel] Add API to get/list plugins



commit 8b73458b893a6afc95d3c2f077a2ff9a73dbcc4e
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue May 12 20:17:55 2009 +0300

    Add API to get/list plugins
    
    PluginLoader provides API to:
    - get a plugin by name
    - get a list of all plugins
---
 src/rygel/rygel-plugin-loader.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/rygel/rygel-plugin-loader.vala b/src/rygel/rygel-plugin-loader.vala
index ac41864..617ed09 100644
--- a/src/rygel/rygel-plugin-loader.vala
+++ b/src/rygel/rygel-plugin-loader.vala
@@ -59,6 +59,14 @@ public class Rygel.PluginLoader : Object {
         this.plugin_available (plugin);
     }
 
+    public Plugin? get_plugin_by_name (string name) {
+        return this.plugin_hash.get (name);
+    }
+
+    public Collection<Plugin> list_plugins () {
+        return this.plugin_hash.get_values ();
+    }
+
     private void load_modules_from_dir (File dir) {
         string attributes = FILE_ATTRIBUTE_STANDARD_NAME + "," +
                             FILE_ATTRIBUTE_STANDARD_TYPE + "," +



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