/[RomCheater]/trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs
ViewVC logotype

Diff of /trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2012/06/19 07:56:36	378
+++ trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs	2012/06/20 13:24:49	399
@@ -4,10 +4,11 @@
 using System.Text;
 using System.Diagnostics;
 using RomCheater.PluginFramework.Core;
+using RomCheater.PluginFramework.Events;
 
 namespace RomCheater.PluginFramework.Interfaces
 {
-    #region IPluginBase  
+    #region IPluginBase
     public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh { }
     #region IPluginBase SubMembers
     public interface IToString { string ToString();    }
@@ -18,7 +19,7 @@
     #endregion
     #endregion
     #region IConfigPlugin
-    public interface IConfigPlugin : IPluginBase
+    public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
     {
         List<ProcContainer> ValidProcessesForPlugin { get; }
     }
@@ -65,6 +66,35 @@
     #endregion
     public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
     public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
+
+    public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
+    {
+        public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
+        #region IAcceptsProcessAndConfig<TProcess> members
+        #endregion
+
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
+
+        #region IAcceptsProcess<TProcess> Members
+        public TProcess AcceptedProcess { get; set; }
+        #endregion
+    }
+    public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
+    {
+        public AcceptedProcessAndConfig() : this(null, null) { }
+        public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
+
+        #region IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get; set; }
+        #endregion
+        #region IAcceptsPlugin<IConfigPlugin> Members
+        public IConfigPlugin AcceptedPlugin { get; set; }
+        #endregion
+    }
+
     public interface IAcceptsProcessPID
     {
         int ProcessPID { get; set; }
@@ -74,6 +104,11 @@
         uint MemoryRangeStart { get; set; }
         uint MemoryRangeSize { get; set; }
     }
+    public interface IAcceptsReadOnlyMemoryRange
+    {
+        uint MemoryRangeStart { get; }
+        uint MemoryRangeSize { get; }
+    }
     public interface IOutputsData<TData> { TData Data { get; } }
     public interface ISearchInProgress { bool SearchInProgess { get; } }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22