/[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 679 - (hide annotations) (download)
Mon Jun 17 07:31:15 2013 UTC (8 years, 11 months ago) by william
File size: 4991 byte(s)
+ move some data into pluginframework

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

  ViewVC Help
Powered by ViewVC 1.1.22