using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using RomCheater.PluginFramework.Core; using RomCheater.PluginFramework.Events; using WeifenLuo.WinFormsUI.Docking; namespace RomCheater.PluginFramework.Interfaces { #region t public interface IExposedPluginData : IAcceptPEData, IAcceptsPEData, IAcceptsChangedProcess, IAcceptsChangedConfig { void SetAcceptedProcess(Process proc); void SetAcceptedConfig(IConfigPlugin config); void SetAcceptedProcessAndConfig(IAcceptsProcessAndConfig iapc); } #endregion #region IPluginBase public interface IPluginBase : IPluginName, IPluginDescription, IPluginID, IToString, IPluginRefresh, IExposedPluginData { bool IsNullPlugin { get; } bool IsGenericPlugin { get; } } #region IPluginBase SubMembers public interface IToString { string ToString(); } public interface IPluginName { string Name { get; } } public interface IPluginDescription { string Description { get; } } public interface IPluginID { Guid ID { get; } } public interface IPluginRefresh { void Reload(); void Reload(bool silent); } #endregion #endregion #region IConfigPlugin public interface IConfigPlugin : IPluginBase, IAcceptsReadOnlyMemoryRange, ISearchInProgress, IAcceptsMemorySearch { List ValidProcessesForPlugin { get; } } #endregion #region IInputPlugin public interface IInputPlugin : IPluginBase { } #endregion #region IWindowPlugin public interface IWindowPlugin : IPluginBase { } #endregion #region IUserControlPlugin public interface IUserControlPlugin : IPluginBase { void Show(); void Show(DockPanel dockPanel); void Show(DockPanel dockPanel, DockState dockState); void Config(); } #endregion #region IPluginLoader public interface IPluginLoader { void LoadPlugins(); void LoadPlugins(bool silent); List LoadedConfigPlugins { get; } List LoadedInputPlugins { get; } List LoadedWindowPlugins { get; } List LoadedUserControlPlugins { get; } IConfigPlugin GetConfigPlugin(string t); IInputPlugin GetInputPlugin(string t); IWindowPlugin GetWindowPlugin(string t); string ToString(); } #endregion #region AcceptsPlugin public interface IAcceptsPlugin where TPlugin : IPluginBase { TPlugin AcceptedPlugin { get; set; } } public interface IAcceptsConfig : IAcceptsPlugin { } public interface IAcceptsProcess : IAcceptsProcess { } public interface IAcceptsProcess where TProcess : Process { TProcess AcceptedProcess { get; set; } } #endregion public interface IAcceptsProcessAndConfig : IAcceptsConfig, IAcceptsProcess where TProcess : Process { } public interface IAcceptsProcessAndConfig : IAcceptsProcess, IAcceptsConfig { } public class AcceptedProcessAndConfig : IAcceptsProcessAndConfig where TProcess : Process { public AcceptedProcessAndConfig() : this(null, default(TProcess)) { } public AcceptedProcessAndConfig(IConfigPlugin config, TProcess process) { AcceptedPlugin = config; AcceptedProcess = process; } #region IAcceptsProcessAndConfig members #endregion #region IAcceptsPlugin Members public IConfigPlugin AcceptedPlugin { get; set; } #endregion #region IAcceptsProcess 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 Members public Process AcceptedProcess { get; set; } #endregion #region IAcceptsPlugin Members public IConfigPlugin AcceptedPlugin { get; set; } #endregion } public interface IAcceptsProcessPID { int ProcessPID { get; set; } } public interface IAcceptsMemoryRange { ulong MemoryRangeStart { get; set; } ulong MemoryRangeSize { get; set; } } public interface IAcceptsReadOnlyMemoryRange { ulong MemoryRangeStart { get; } ulong MemoryRangeSize { get; } } public interface IOutputsData { TData Data { get; } } public interface ISearchInProgress { bool SearchInProgess { get; } Guid SearchGuid { get; } } }