/[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 471 - (show annotations) (download)
Mon Jun 3 07:13:44 2013 UTC (8 years, 1 month ago) by william
File size: 3632 byte(s)
+ pass process informatin by using the process's PID, instead of passing the process as a reference

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 : IAcceptsProcessPID { }
72 #endregion
73 public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { }
74
75 public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig
76 {
77 public AcceptedProcessAndConfig() : this(null, 0) { }
78 public AcceptedProcessAndConfig(IConfigPlugin config, int pid) { AcceptedPlugin = config; ProcessPID = pid; }
79
80
81 #region IAcceptsPlugin<IConfigPlugin> Members
82 public IConfigPlugin AcceptedPlugin { get; set; }
83 #endregion
84
85 #region IAcceptsProcess Members
86 public int ProcessPID { get; set; }
87 #endregion
88 }
89
90 public interface IAcceptsProcessPID
91 {
92 int ProcessPID { get; set; }
93 }
94 public interface IAcceptsMemoryRange
95 {
96 uint MemoryRangeStart { get; set; }
97 uint MemoryRangeSize { get; set; }
98 }
99 public interface IAcceptsReadOnlyMemoryRange
100 {
101 uint MemoryRangeStart { get; }
102 uint MemoryRangeSize { get; }
103 }
104 public interface IOutputsData<TData> { TData Data { get; } }
105 public interface ISearchInProgress
106 {
107 bool SearchInProgess { get; }
108 Guid SearchGuid { get; }
109 }
110 }

  ViewVC Help
Powered by ViewVC 1.1.22