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

  ViewVC Help
Powered by ViewVC 1.1.22