# HG changeset patch
# User StephaneLenclud
# Date 1449579135 -3600
# Node ID 99720d48e299cc4210b4f848796806d5da8f8bf1
First contribution. Empty TV server plugin.
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;
+ }
+
+
+ }
+
+}
diff -r 000000000000 -r 99720d48e299 NotificationSetup.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationSetup.cs Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,75 @@
+#region Copyright (C) 2005-2011 Team MediaPortal
+
+// Copyright (C) 2005-2011 Team MediaPortal
+// http://www.team-mediaportal.com
+//
+// MediaPortal is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// MediaPortal is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with MediaPortal. If not, see .
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using TvDatabase;
+using TvLibrary.Log;
+
+
+namespace TvServerPlugin
+{
+ public partial class RecordStatusSetup : SetupTv.SectionSettings
+ {
+ #region constructor
+
+ public RecordStatusSetup()
+ : this("Record Status Setup")
+ {
+ InitializeComponent();
+ }
+
+ public RecordStatusSetup(string name)
+ : base(name)
+ {
+ InitializeComponent();
+ }
+
+ #endregion
+
+ #region Public Members
+
+ public override void OnSectionActivated()
+ {
+ TvBusinessLayer layer = new TvBusinessLayer();
+ debug.Checked = layer.GetSetting("RecordStatusDebugMode", "false").Value == "true";
+ base.OnSectionActivated();
+ }
+
+ public override void OnSectionDeActivated()
+ {
+ TvBusinessLayer layer = new TvBusinessLayer();
+ Setting setting = layer.GetSetting("RecordStatusDebugMode", "false");
+ if (debug.Checked)
+ setting.Value = "true";
+ else
+ setting.Value = "false";
+ setting.Persist();
+ base.OnSectionDeActivated();
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r 99720d48e299 NotificationSetup.designer.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationSetup.designer.cs Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,74 @@
+namespace TvServerPlugin
+{
+ partial class RecordStatusSetup
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.debug = new System.Windows.Forms.CheckBox();
+ this.groupBox2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.debug);
+ this.groupBox2.Location = new System.Drawing.Point(3, 3);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(174, 44);
+ this.groupBox2.TabIndex = 3;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Debug section";
+ //
+ // debug
+ //
+ this.debug.AutoSize = true;
+ this.debug.Location = new System.Drawing.Point(6, 19);
+ this.debug.Name = "debug";
+ this.debug.Size = new System.Drawing.Size(143, 17);
+ this.debug.TabIndex = 0;
+ this.debug.Text = "Enable extended logging";
+ this.debug.UseVisualStyleBackColor = true;
+ //
+ // RecordStatusSetup
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.groupBox2);
+ this.Name = "RecordStatusSetup";
+ this.Size = new System.Drawing.Size(257, 100);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.CheckBox debug;
+ }
+}
diff -r 000000000000 -r 99720d48e299 NotificationSetup.resx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationSetup.resx Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff -r 000000000000 -r 99720d48e299 NotificationTvServerPlugin.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationTvServerPlugin.csproj Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,113 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}
+ Library
+ Properties
+ NotificationTvServerPlugin
+ NotificationTvServerPlugin
+ v4.6
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ false
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ false
+
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\Common.Utils.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\Gentle.Common.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\Gentle.Framework.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\PluginBase.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\SetupControls.dll
+ True
+
+
+ packages\SharpLibDisplay.0.1.2\lib\net40\SharpLibDisplay.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\TvBusinessLayer.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\TvControl.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\TVDatabase.dll
+ True
+
+
+ packages\MediaPortal.TvEngine3.Plugin.1.12.1\lib\net40\TvLibrary.Interfaces.dll
+ True
+
+
+
+
+
+
+ UserControl
+
+
+ NotificationSetup.cs
+
+
+
+
+
+
+
+ NotificationSetup.cs
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r 99720d48e299 NotificationTvServerPlugin.sln
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/NotificationTvServerPlugin.sln Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.24720.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationTvServerPlugin", "NotificationTvServerPlugin.csproj", "{9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9EB62D86-3A4E-49BE-91A3-0F7E36BAB34F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff -r 000000000000 -r 99720d48e299 Properties/AssemblyInfo.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Properties/AssemblyInfo.cs Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,41 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using MediaPortal.Common.Utils;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("RecordStatusTvEnginePlugin")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("RecordStatusTvEnginePlugin")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9eb62d86-3a4e-49be-91a3-0f7e36bab34f")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+//TV Server Plugin
+[assembly: CompatibleVersion("1.1.8.0")]
+[assembly: UsesSubsystem("TVE")]
diff -r 000000000000 -r 99720d48e299 packages.config
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packages.config Tue Dec 08 13:52:15 2015 +0100
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file