/[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 437 - (show annotations) (download)
Tue May 28 18:08:23 2013 UTC (7 years, 11 months ago) by william
File size: 4392 byte(s)
+ current wip for custom usercontrol plugins

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

  ViewVC Help
Powered by ViewVC 1.1.22