ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs
Revision: 574
Committed: Thu Jun 6 07:39:04 2013 UTC (10 years, 6 months ago) by william
File size: 4634 byte(s)
Log Message:
+ change addresses to ulong -- still need to update other code to handle this

File Contents

# Content
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 }
27 #endregion
28 #region IInputPlugin
29 public interface IInputPlugin : IPluginBase
30 {
31 }
32 #endregion
33 #region IWindowPlugin
34 public interface IWindowPlugin : IPluginBase
35 {
36 }
37 #endregion
38 #region IUserControlPlugin
39 public interface IUserControlPlugin : IPluginBase
40 {
41 void Show();
42 void Show(DockPanel dockPanel);
43 void Show(DockPanel dockPanel, DockState dockState);
44 void Config();
45 }
46 #endregion
47 #region IPluginLoader
48 public interface IPluginLoader
49 {
50 void LoadPlugins();
51 void LoadPlugins(bool silent);
52 List<IConfigPlugin> LoadedConfigPlugins { get; }
53 List<IInputPlugin> LoadedInputPlugins { get; }
54 List<IWindowPlugin> LoadedWindowPlugins { get; }
55 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
56
57 IConfigPlugin GetConfigPlugin(string t);
58 IInputPlugin GetInputPlugin(string t);
59 IWindowPlugin GetWindowPlugin(string t);
60
61 string ToString();
62 }
63 #endregion
64 #region AcceptsPlugin
65 public interface IAcceptsPlugin<TPlugin>
66 where TPlugin : IPluginBase
67 {
68 TPlugin AcceptedPlugin { get; set; }
69 }
70 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
71 public interface IAcceptsProcess : IAcceptsProcess<Process> { }
72 public interface IAcceptsProcess<TProcess>
73 where TProcess : Process
74 {
75 TProcess AcceptedProcess { get; set; }
76 }
77 #endregion
78 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
79 public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
80
81 public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
82 {
83 public AcceptedProcessAndConfig() : this(null, default(TProcess)) { }
84 public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; }
85 #region IAcceptsProcessAndConfig<TProcess> members
86 #endregion
87
88 #region IAcceptsPlugin<IConfigPlugin> Members
89 public IConfigPlugin AcceptedPlugin { get; set; }
90 #endregion
91
92 #region IAcceptsProcess<TProcess> Members
93 public TProcess AcceptedProcess { get; set; }
94 #endregion
95 }
96 public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
97 {
98 public AcceptedProcessAndConfig() : this(null, null) { }
99 public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
100
101 #region IAcceptsProcess<Process> Members
102 public Process AcceptedProcess { get; set; }
103 #endregion
104 #region IAcceptsPlugin<IConfigPlugin> Members
105 public IConfigPlugin AcceptedPlugin { get; set; }
106 #endregion
107 }
108
109 public interface IAcceptsProcessPID
110 {
111 int ProcessPID { get; set; }
112 }
113 public interface IAcceptsMemoryRange
114 {
115 ulong MemoryRangeStart { get; set; }
116 ulong MemoryRangeSize { get; set; }
117 }
118 public interface IAcceptsReadOnlyMemoryRange
119 {
120 uint MemoryRangeStart { get; }
121 uint MemoryRangeSize { get; }
122 }
123 public interface IOutputsData<TData> { TData Data { get; } }
124 public interface ISearchInProgress
125 {
126 bool SearchInProgess { get; }
127 Guid SearchGuid { get; }
128 }
129 }