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