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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 590 - (hide annotations) (download)
Thu Jun 6 10:08:17 2013 UTC (8 years, 1 month ago) by william
File size: 4675 byte(s)

1 william 83 using System;
2     using System.Collections.Generic;
3     using System.Linq;
4     using System.Text;
5     using System.Diagnostics;
6 william 88 using RomCheater.PluginFramework.Core;
7 william 399 using RomCheater.PluginFramework.Events;
8 william 440 using WeifenLuo.WinFormsUI.Docking;
9 william 83
10     namespace RomCheater.PluginFramework.Interfaces
11     {
12 william 399 #region IPluginBase
13 william 94 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 william 329 public interface IPluginRefresh { void Reload(); void Reload(bool silent); }
20 william 83 #endregion
21 william 94 #endregion
22 william 83 #region IConfigPlugin
23 william 399 public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch
24 william 83 {
25 william 88 List<ProcContainer> ValidProcessesForPlugin { get; }
26 william 590 bool IsGenericConfig { get; }
27 william 83 }
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 william 437 #region IUserControlPlugin
40     public interface IUserControlPlugin : IPluginBase
41     {
42 william 440 void Show();
43     void Show(DockPanel dockPanel);
44     void Show(DockPanel dockPanel, DockState dockState);
45     void Config();
46 william 437 }
47     #endregion
48 william 83 #region IPluginLoader
49     public interface IPluginLoader
50     {
51     void LoadPlugins();
52 william 366 void LoadPlugins(bool silent);
53 william 83 List<IConfigPlugin> LoadedConfigPlugins { get; }
54     List<IInputPlugin> LoadedInputPlugins { get; }
55     List<IWindowPlugin> LoadedWindowPlugins { get; }
56 william 437 List<IUserControlPlugin> LoadedUserControlPlugins { get; }
57    
58 william 87 IConfigPlugin GetConfigPlugin(string t);
59     IInputPlugin GetInputPlugin(string t);
60     IWindowPlugin GetWindowPlugin(string t);
61    
62 william 86 string ToString();
63 william 83 }
64     #endregion
65 william 234 #region AcceptsPlugin
66 william 228 public interface IAcceptsPlugin<TPlugin>
67     where TPlugin : IPluginBase
68 william 153 {
69 william 228 TPlugin AcceptedPlugin { get; set; }
70 william 153 }
71 william 357 public interface IAcceptsConfig : IAcceptsPlugin<IConfigPlugin> { }
72 william 477 public interface IAcceptsProcess : IAcceptsProcess<Process> { }
73     public interface IAcceptsProcess<TProcess>
74     where TProcess : Process
75     {
76     TProcess AcceptedProcess { get; set; }
77     }
78 william 234 #endregion
79 william 477 public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { }
80 william 357 public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
81 william 389
82 william 477 public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process
83 william 389 {
84 william 477 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 william 389
89     #region IAcceptsPlugin<IConfigPlugin> Members
90     public IConfigPlugin AcceptedPlugin { get; set; }
91     #endregion
92    
93 william 477 #region IAcceptsProcess<TProcess> Members
94     public TProcess AcceptedProcess { get; set; }
95 william 389 #endregion
96     }
97 william 477 public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
98     {
99     public AcceptedProcessAndConfig() : this(null, null) { }
100     public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; }
101 william 389
102 william 477 #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 william 196 public interface IAcceptsProcessPID
111     {
112     int ProcessPID { get; set; }
113     }
114 william 198 public interface IAcceptsMemoryRange
115     {
116 william 574 ulong MemoryRangeStart { get; set; }
117     ulong MemoryRangeSize { get; set; }
118 william 198 }
119 william 389 public interface IAcceptsReadOnlyMemoryRange
120     {
121 william 590 ulong MemoryRangeStart { get; }
122     ulong MemoryRangeSize { get; }
123 william 389 }
124 william 228 public interface IOutputsData<TData> { TData Data { get; } }
125 william 444 public interface ISearchInProgress
126     {
127     bool SearchInProgess { get; }
128     Guid SearchGuid { get; }
129     }
130 william 83 }

  ViewVC Help
Powered by ViewVC 1.1.22