diff -r 000000000000 -r 99720d48e299 NotificationPlugin.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationPlugin.cs Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Reflection;
+
+using SetupTv;
+using TvControl;
+using TvEngine;
+using System.Drawing;
+using System.IO;
+using TvLibrary.Log;
+
+
+namespace TvServerPlugin
+{
+
+
+ public class RecordSatus : ITvServerPlugin
+ {
+
+ ///
+ /// Reference to the tvservice's TVcontroller
+ ///
+ private IController _controller;
+
+
+ ///
+ /// Creates a new PowerScheduler plugin
+ ///
+ public RecordSatus() { }
+
+
+ ///
+ /// Called by the tvservice PluginLoader to start this plugin
+ ///
+ /// Reference to the tvservice's TVController
+ public void Start(IController controller)
+ {
+ Log.Debug(Name + " start - begins");
+
+ _controller = controller;
+
+ Log.Debug(Name + " start - ends");
+ }
+
+ ///
+ /// Called by the tvservice PluginLoader to stop this plugin
+ ///
+ public void Stop()
+ {
+ Log.Debug(Name + " stop");
+ _controller = null;
+ //PowerScheduler.Instance.Stop();
+ }
+
+ ///
+ /// Author of this plugin
+ ///
+ public string Author
+ {
+ get { return "Stéphane Lenclud"; }
+ }
+
+ ///
+ /// Should this plugin run only on a master tvserver?
+ ///
+ public bool MasterOnly
+ {
+ get { return false; }
+ }
+
+ ///
+ /// Name of this plugin
+ ///
+ public string Name
+ {
+ get
+ {
+ return "NotificationTvServerPlugin";
+ }
+ }
+
+ ///
+ /// Returns the SectionSettings setup part of this plugin
+ ///
+ public SectionSettings Setup
+ {
+ get { return new RecordStatusSetup(); }
+ }
+
+ ///
+ /// Plugin version
+ ///
+ public string Version
+ {
+ get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); }
+ }
+
+
+ ///
+ /// Access icons from embedded resources.
+ ///
+ ///
+ ///
+ public static Icon GetIcon(string name)
+ {
+ string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
+ for (int i = 0; i < names.Length; i++)
+ {
+ if (names[i].EndsWith(name))
+ {
+ using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(names[i]))
+ {
+ return new Icon(stream);
+ }
+ }
+ }
+
+ return null;
+ }
+
+
+ }
+
+}