--- trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs 2012/06/19 11:59:13 388 +++ trunk/RomCheater.PluginFramework/Interfaces/PluginInterfaces.cs 2012/06/19 12:47:26 389 @@ -18,7 +18,7 @@ namespace RomCheater.PluginFramework.Int #endregion #endregion #region IConfigPlugin - public interface IConfigPlugin : IPluginBase + public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange { List<ProcContainer> ValidProcessesForPlugin { get; } } @@ -65,6 +65,35 @@ namespace RomCheater.PluginFramework.Int #endregion public interface IAcceptsProcessAndConfig<TProcess> : IAcceptsConfig, IAcceptsProcess<TProcess> where TProcess : Process { } public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { } + + public class AcceptedProcessAndConfig<TProcess> : IAcceptsProcessAndConfig<TProcess> where TProcess : Process + { + public AcceptedProcessAndConfig() : this(null, default(TProcess)) { } + public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; } + #region IAcceptsProcessAndConfig<TProcess> members + #endregion + + #region IAcceptsPlugin<IConfigPlugin> Members + public IConfigPlugin AcceptedPlugin { get; set; } + #endregion + + #region IAcceptsProcess<TProcess> Members + public TProcess AcceptedProcess { get; set; } + #endregion + } + public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig + { + public AcceptedProcessAndConfig() : this(null, null) { } + public AcceptedProcessAndConfig(IConfigPlugin config, Process process) { AcceptedPlugin = config; AcceptedProcess = process; } + + #region IAcceptsProcess<Process> Members + public Process AcceptedProcess { get; set; } + #endregion + #region IAcceptsPlugin<IConfigPlugin> Members + public IConfigPlugin AcceptedPlugin { get; set; } + #endregion + } + public interface IAcceptsProcessPID { int ProcessPID { get; set; } @@ -74,6 +103,11 @@ namespace RomCheater.PluginFramework.Int uint MemoryRangeStart { get; set; } uint MemoryRangeSize { get; set; } } + public interface IAcceptsReadOnlyMemoryRange + { + uint MemoryRangeStart { get; } + uint MemoryRangeSize { get; } + } public interface IOutputsData<TData> { TData Data { get; } } public interface ISearchInProgress { bool SearchInProgess { get; } } } |