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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 399 - (hide annotations) (download)
Wed Jun 20 13:24:49 2012 UTC (9 years, 1 month ago) by william
File size: 4215 byte(s)

1 william 83 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5     using System.Diagnostics;
6 william 88 using RomCheater.PluginFramework.Core;
7 william 399 using RomCheater.PluginFramework.Events;
8 william 83
9     namespace RomCheater.PluginFramework.Interfaces
10     {
11 william 399 #region IPluginBase
12 william 94 public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh { }
13     #region IPluginBase SubMembers
14     public interface IToString { string ToString(); }
15     public interface IPluginName { string Name { get; } }
16     public interface IPluginDescription { string Description { get; } }
17     public interface IPluginID { Guid ID { get; } }
18 william 329 public interface IPluginRefresh { void Reload(); void Reload(bool silent); }
19 william 83 #endregion
20 william 94 #endregion
21 william 83 #region IConfigPlugin
22 william 399 public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
23 william 83 {
24 william 88 List<ProcContainer> ValidProcessesForPlugin { get; }
25 william 83 }
26     #endregion
27     #region IInputPlugin
28     public interface IInputPlugin : IPluginBase
29     {
30     }
31     #endregion
32     #region IWindowPlugin
33     public interface IWindowPlugin : IPluginBase
34     {
35     }
36     #endregion
37     #region IPluginLoader
38     public interface IPluginLoader
39     {
40     void LoadPlugins();
41 william 366 void LoadPlugins(bool silent);
42 william 83 List<IConfigPlugin> LoadedConfigPlugins { get; }
43     List<IInputPlugin> LoadedInputPlugins { get; }
44     List<IWindowPlugin> LoadedWindowPlugins { get; }
45 william 87
46     IConfigPlugin GetConfigPlugin(string t);
47     IInputPlugin GetInputPlugin(string t);
48     IWindowPlugin GetWindowPlugin(string t);
49    
50 william 86 string ToString();
51 william 83 }
52     #endregion
53 william 234 #region AcceptsPlugin
54 william 228 public interface IAcceptsPlugin<TPlugin>
55     where TPlugin : IPluginBase
56 william 153 {
57 william 228 TPlugin AcceptedPlugin { get; set; }
58 william 153 }
59 william 357 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
60     public interface IAcceptsProcess : IAcceptsProcess<Process> { }
61 william 234 public interface IAcceptsProcess<TProcess>
62     where TProcess : Process
63 william 153 {
64 william 234 TProcess AcceptedProcess { get; set; }
65 william 153 }
66 william 234 #endregion
67 william 357 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
68     public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
69 william 389
70     public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
71     {
72     public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
73     public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
74     #region IAcceptsProcessAndConfig<TProcess> members
75     #endregion
76    
77     #region IAcceptsPlugin<IConfigPlugin> Members
78     public IConfigPlugin AcceptedPlugin { get; set; }
79     #endregion
80    
81     #region IAcceptsProcess<TProcess> Members
82     public TProcess AcceptedProcess { get; set; }
83     #endregion
84     }
85     public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
86     {
87     public AcceptedProcessAndConfig() : this(null, null) { }
88     public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
89    
90     #region IAcceptsProcess<Process> Members
91     public Process AcceptedProcess { get; set; }
92     #endregion
93     #region IAcceptsPlugin<IConfigPlugin> Members
94     public IConfigPlugin AcceptedPlugin { get; set; }
95     #endregion
96     }
97    
98 william 196 public interface IAcceptsProcessPID
99     {
100     int ProcessPID { get; set; }
101     }
102 william 198 public interface IAcceptsMemoryRange
103     {
104 william 378 uint MemoryRangeStart { get; set; }
105 william 287 uint MemoryRangeSize { get; set; }
106 william 198 }
107 william 389 public interface IAcceptsReadOnlyMemoryRange
108     {
109     uint MemoryRangeStart { get; }
110     uint MemoryRangeSize { get; }
111     }
112 william 228 public interface IOutputsData<TData> { TData Data { get; } }
113     public interface ISearchInProgress { bool SearchInProgess { get; } }
114 william 83 }

  ViewVC Help
Powered by ViewVC 1.1.22