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

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 //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 #region IPluginBase
28 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 public interface IPluginRefresh { void Reload(); void Reload(bool silent); }
35 #endregion
36 #endregion
37 #region IConfigPlugin
38 public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
39 {
40 List<ProcContainer> ValidProcessesForPlugin { get; }
41 bool IsGenericConfig { get; }
42 }
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 #region IUserControlPlugin
55 public interface IUserControlPlugin : IPluginBase
56 {
57 void Show();
58 void Show(DockPanel dockPanel);
59 void Show(DockPanel dockPanel, DockState dockState);
60 void Config();
61 }
62 #endregion
63 #region IPluginLoader
64 public interface IPluginLoader
65 {
66 void LoadPlugins();
67 void LoadPlugins(bool silent);
68 List<IConfigPlugin> LoadedConfigPlugins { get; }
69 List<IInputPlugin> LoadedInputPlugins { get; }
70 List<IWindowPlugin> LoadedWindowPlugins { get; }
71 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
72
73 IConfigPlugin GetConfigPlugin(string t);
74 IInputPlugin GetInputPlugin(string t);
75 IWindowPlugin GetWindowPlugin(string t);
76
77 string ToString();
78 }
79 #endregion
80 #region AcceptsPlugin
81 public interface IAcceptsPlugin<TPlugin>
82 where TPlugin : IPluginBase
83 {
84 TPlugin AcceptedPlugin { get; set; }
85 }
86 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
87 public interface IAcceptsProcess : IAcceptsProcess<Process> { }
88 public interface IAcceptsProcess<TProcess>
89 where TProcess : Process
90 {
91 TProcess AcceptedProcess { get; set; }
92 }
93 #endregion
94 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
95 public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
96
97 public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
98 {
99 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
104 #region IAcceptsPlugin<IConfigPlugin> Members
105 public IConfigPlugin AcceptedPlugin { get; set; }
106 #endregion
107
108 #region IAcceptsProcess<TProcess> Members
109 public TProcess AcceptedProcess { get; set; }
110 #endregion
111 }
112 public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
113 {
114 public AcceptedProcessAndConfig() : this(null, null) { }
115 public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
116
117 #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 public interface IAcceptsProcessPID
126 {
127 int ProcessPID { get; set; }
128 }
129 public interface IAcceptsMemoryRange
130 {
131 ulong MemoryRangeStart { get; set; }
132 ulong MemoryRangeSize { get; set; }
133 }
134 public interface IAcceptsReadOnlyMemoryRange
135 {
136 ulong MemoryRangeStart { get; }
137 ulong MemoryRangeSize { get; }
138 }
139 public interface IOutputsData<TData> { TData Data { get; } }
140 public interface ISearchInProgress
141 {
142 bool SearchInProgess { get; }
143 Guid SearchGuid { get; }
144 }
145 }

  ViewVC Help
Powered by ViewVC 1.1.22