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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 680 - (show annotations) (download)
Mon Jun 17 08:03:34 2013 UTC (8 years, 4 months ago) by william
File size: 4988 byte(s)

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

  ViewVC Help
Powered by ViewVC 1.1.22