/[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 437 - (hide annotations) (download)
Tue May 28 18:08:23 2013 UTC (7 years, 11 months ago) by william
File size: 4392 byte(s)
+ current wip for custom usercontrol plugins

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 william 437 #region IUserControlPlugin
38     public interface IUserControlPlugin : IPluginBase
39     {
40     }
41     #endregion
42 william 83 #region IPluginLoader
43     public interface IPluginLoader
44     {
45     void LoadPlugins();
46 william 366 void LoadPlugins(bool silent);
47 william 83 List<IConfigPlugin> LoadedConfigPlugins { get; }
48     List<IInputPlugin> LoadedInputPlugins { get; }
49     List<IWindowPlugin> LoadedWindowPlugins { get; }
50 william 437 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
51    
52 william 87 IConfigPlugin GetConfigPlugin(string t);
53     IInputPlugin GetInputPlugin(string t);
54     IWindowPlugin GetWindowPlugin(string t);
55    
56 william 86 string ToString();
57 william 83 }
58     #endregion
59 william 234 #region AcceptsPlugin
60 william 228 public interface IAcceptsPlugin<TPlugin>
61     where TPlugin : IPluginBase
62 william 153 {
63 william 228 TPlugin AcceptedPlugin { get; set; }
64 william 153 }
65 william 357 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
66     public interface IAcceptsProcess : IAcceptsProcess<Process> { }
67 william 234 public interface IAcceptsProcess<TProcess>
68     where TProcess : Process
69 william 153 {
70 william 234 TProcess AcceptedProcess { get; set; }
71 william 153 }
72 william 234 #endregion
73 william 357 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
74     public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
75 william 389
76     public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
77     {
78     public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
79     public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
80     #region IAcceptsProcessAndConfig<TProcess> members
81     #endregion
82    
83     #region IAcceptsPlugin<IConfigPlugin> Members
84     public IConfigPlugin AcceptedPlugin { get; set; }
85     #endregion
86    
87     #region IAcceptsProcess<TProcess> Members
88     public TProcess AcceptedProcess { get; set; }
89     #endregion
90     }
91     public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
92     {
93     public AcceptedProcessAndConfig() : this(null, null) { }
94     public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
95    
96     #region IAcceptsProcess<Process> Members
97     public Process AcceptedProcess { get; set; }
98     #endregion
99     #region IAcceptsPlugin<IConfigPlugin> Members
100     public IConfigPlugin AcceptedPlugin { get; set; }
101     #endregion
102     }
103    
104 william 196 public interface IAcceptsProcessPID
105     {
106     int ProcessPID { get; set; }
107     }
108 william 198 public interface IAcceptsMemoryRange
109     {
110 william 378 uint MemoryRangeStart { get; set; }
111 william 287 uint MemoryRangeSize { get; set; }
112 william 198 }
113 william 389 public interface IAcceptsReadOnlyMemoryRange
114     {
115     uint MemoryRangeStart { get; }
116     uint MemoryRangeSize { get; }
117     }
118 william 228 public interface IOutputsData<TData> { TData Data { get; } }
119     public interface ISearchInProgress { bool SearchInProgess { get; } }
120 william 83 }

  ViewVC Help
Powered by ViewVC 1.1.22