Swapper.NET Logo

Source Code Interfaces ~ IPlugIn.cs


using System;
using RevolutionaryStuff.JBT.Storage;

namespace RevolutionaryStuff.P2P.Basics
{
	public interface IPlugIn
	{
		void Init(IPlugInInitParams initParam);
		void Start();
		void Shutdown();

		IAbout About {get;}

		IConfigurationManager ConfigurationManager { get; }
	}

	public interface IPlugInInitParams
	{
		ICore Core { get; }
		ICompoundFile CompoundFile { get; }
	}

	public class PlugInEventArgs : EventArgs
	{
		public IPlugIn PlugIn;

		#region Constructors
		public PlugInEventArgs() : this(null)
		{}

		public PlugInEventArgs(IPlugIn plugIn)
		{
			this.PlugIn = plugIn;
		}
		#endregion
	}

	public delegate void PlugInEventHandler(object sender, PlugInEventArgs e);

	public class CanInstallPlugInEventArgs : PlugInEventArgs
	{
		public Type PlugInType;
		public bool Cancel;

		#region Constructors
		public CanInstallPlugInEventArgs()
		{}
		#endregion
	}

	public delegate void CanInstallPlugInEventHandler(object sender, CanInstallPlugInEventArgs e);
}