commit:fc785e55243b0a680c19ea6ccd77b759fe216766
author:Chip Black
committer:Chip Black
date:Sat Jun 6 04:00:09 2009 -0500
parents:85b244419aec2552d114990aa86900aeac83a7e0
Added hooks for plugin options.
diff --git a/WebThingPlugin.cs b/WebThingPlugin.cs
line changes: +14/-1
index 91c68ca..56caa4c
--- a/WebThingPlugin.cs
+++ b/WebThingPlugin.cs
@@ -1,8 +1,21 @@
+using System;
+using System.Collections.Generic;
 using WebKit;
 
 namespace bytex64.WebThing {
     public abstract class WebThingPlugin {
-        public abstract void Init(WebThing wt);
+        protected Dictionary<string,string> Options;
+
+        public WebThingPlugin() {
+            string classname = this.GetType().FullName;
+
+            if (Config.PluginOptions.ContainsKey(classname))
+                Options = Config.PluginOptions[classname];
+            else
+                Options = new Dictionary<string,string>();
+        }
+
+        public virtual void Init(WebThing wt) {}
         public virtual void InitWebView(WebView wv) {}
     }
 }