ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs
Revision: 684
Committed: Mon Jun 17 08:52:54 2013 UTC (10 years, 5 months ago) by william
File size: 5142 byte(s)
Log Message:

File Contents

# User Rev Content
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 440 using WeifenLuo.WinFormsUI.Docking;
9 william 83
10     namespace RomCheater.PluginFramework.Interfaces
11     {
12 william 680 #region t
13 william 684 public interface IExposedPluginData :
14     IAcceptPEData,
15     IAcceptsPEData,
16     IAcceptsChangedProcess,
17     IAcceptsChangedConfig
18 william 680 {
19     void SetAcceptedProcess(Process proc);
20     void SetAcceptedConfig(IConfigPlugin config);
21     void SetAcceptedProcessAndConfig(IAcceptsProcessAndConfig iapc);
22 william 679
23 william 680 }
24 william 679
25 william 680
26     #endregion
27    
28 william 399 #region IPluginBase
29 william 682 public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh, IExposedPluginData
30     {
31     bool IsNullPlugin { get; }
32     bool IsGenericPlugin { get; }
33     }
34 william 94 #region IPluginBase SubMembers
35     public interface IToString { string ToString(); }
36     public interface IPluginName { string Name { get; } }
37     public interface IPluginDescription { string Description { get; } }
38     public interface IPluginID { Guid ID { get; } }
39 william 329 public interface IPluginRefresh { void Reload(); void Reload(bool silent); }
40 william 83 #endregion
41 william 94 #endregion
42 william 83 #region IConfigPlugin
43 william 399 public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
44 william 83 {
45 william 682 List<ProcContainer> ValidProcessesForPlugin { get; }
46 william 83 }
47     #endregion
48     #region IInputPlugin
49     public interface IInputPlugin : IPluginBase
50     {
51     }
52     #endregion
53     #region IWindowPlugin
54     public interface IWindowPlugin : IPluginBase
55     {
56     }
57     #endregion
58 william 437 #region IUserControlPlugin
59     public interface IUserControlPlugin : IPluginBase
60     {
61 william 440 void Show();
62     void Show(DockPanel dockPanel);
63     void Show(DockPanel dockPanel, DockState dockState);
64     void Config();
65 william 437 }
66     #endregion
67 william 83 #region IPluginLoader
68     public interface IPluginLoader
69     {
70     void LoadPlugins();
71 william 366 void LoadPlugins(bool silent);
72 william 83 List<IConfigPlugin> LoadedConfigPlugins { get; }
73     List<IInputPlugin> LoadedInputPlugins { get; }
74     List<IWindowPlugin> LoadedWindowPlugins { get; }
75 william 437 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
76    
77 william 87 IConfigPlugin GetConfigPlugin(string t);
78     IInputPlugin GetInputPlugin(string t);
79     IWindowPlugin GetWindowPlugin(string t);
80    
81 william 86 string ToString();
82 william 83 }
83     #endregion
84 william 234 #region AcceptsPlugin
85 william 228 public interface IAcceptsPlugin<TPlugin>
86     where TPlugin : IPluginBase
87 william 153 {
88 william 228 TPlugin AcceptedPlugin { get; set; }
89 william 153 }
90 william 357 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
91 william 477 public interface IAcceptsProcess : IAcceptsProcess<Process> { }
92     public interface IAcceptsProcess<TProcess>
93     where TProcess : Process
94     {
95     TProcess AcceptedProcess { get; set; }
96     }
97 william 234 #endregion
98 william 477 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
99 william 357 public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
100 william 389
101 william 477 public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
102 william 389 {
103 william 477 public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
104     public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
105     #region IAcceptsProcessAndConfig<TProcess> members
106     #endregion
107 william 389
108     #region IAcceptsPlugin<IConfigPlugin> Members
109     public IConfigPlugin AcceptedPlugin { get; set; }
110     #endregion
111    
112 william 477 #region IAcceptsProcess<TProcess> Members
113     public TProcess AcceptedProcess { get; set; }
114 william 389 #endregion
115     }
116 william 477 public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
117     {
118     public AcceptedProcessAndConfig() : this(null, null) { }
119     public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
120 william 389
121 william 477 #region IAcceptsProcess<Process> Members
122     public Process AcceptedProcess { get; set; }
123     #endregion
124     #region IAcceptsPlugin<IConfigPlugin> Members
125     public IConfigPlugin AcceptedPlugin { get; set; }
126     #endregion
127     }
128    
129 william 196 public interface IAcceptsProcessPID
130     {
131     int ProcessPID { get; set; }
132     }
133 william 198 public interface IAcceptsMemoryRange
134     {
135 william 574 ulong MemoryRangeStart { get; set; }
136     ulong MemoryRangeSize { get; set; }
137 william 198 }
138 william 389 public interface IAcceptsReadOnlyMemoryRange
139     {
140 william 590 ulong MemoryRangeStart { get; }
141     ulong MemoryRangeSize { get; }
142 william 389 }
143 william 228 public interface IOutputsData<TData> { TData Data { get; } }
144 william 444 public interface ISearchInProgress
145     {
146     bool SearchInProgess { get; }
147     Guid SearchGuid { get; }
148     }
149 william 83 }