/// <summary>
		/// TopLines constructor.
		/// </summary>
		/// <param name="session">Reference to Pop33 session.</param>
		/// <param name="message">Message which to get.</param>
		/// <param name="socket">Connected socket.</param>
		/// <param name="nLines">Number of lines to get.</param>
		public Pop3Message_EventArgs(Pop3Session session,Pop3Message message,Socket socket,int nLines)
		{
			m_pSession = session;
			m_pMessage = message;
			m_pSocket  = socket;
			m_Lines    = nLines;
		}
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="session">Reference to Pop33 session.</param>
		/// <param name="userName">Username.</param>
		/// <param name="passwData">Password data.</param>
		/// <param name="data">Authentication specific data(as tag).</param>
		/// <param name="authType">Authentication type.</param>
		public AuthUser_EventArgs(Pop3Session session,string userName,string passwData,string data,AuthType authType)
		{
			m_pSession  = session;
			m_UserName  = userName;
			m_PasswData = passwData;
			m_Data      = data;
			m_AuthType  = authType;
		}
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="session">Reference to Pop33 session.</param>
		/// <param name="message">Message which to get.</param>
		/// <param name="socket">Connected socket.</param>
		public Pop3Message_EventArgs(Pop3Session session,Pop3Message message,Socket socket)
		{
			m_pSession = session;
			m_pMessage = message;
			m_pSocket  = socket;
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Raises event GetTopLines.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="message">Message wich top lines to get.</param>
		/// <param name="nLines">Header + number of body lines to get.</param>
		/// <returns></returns>
		internal byte[] OnGetTopLines(Pop3Session session,Pop3Message message,int nLines)
		{
			Pop3Message_EventArgs oArgs = new Pop3Message_EventArgs(session,message,null,nLines);
			if(this.GetTopLines != null){
				this.GetTopLines(this,oArgs);
			}
			return oArgs.MessageData;
		}
		/// <summary>
		/// Default constructor.
		/// </summary>
		/// <param name="session">Reference to Pop33 session.</param>
		/// <param name="messages"></param>
		/// <param name="mailbox">Mailbox name.</param>
		public GetMessagesInfo_EventArgs(Pop3Session session,Pop3Messages messages,string mailbox)
		{
			m_pSession       = session;
			m_pPop3Messages = messages;
			m_UserName       = mailbox;
		}
Ejemplo n.º 6
0
		/// <summary>
		/// Raises delete message event.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="message">Message which to delete.</param>
		/// <returns></returns>
		internal virtual bool OnDeleteMessage(Pop3Session session,Pop3Message message) 
		{				
			Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session,message,null);
			if(this.DeleteMessage != null){
				this.DeleteMessage(this,oArg);
			}
			
			return true;
		}
Ejemplo n.º 7
0
		/// <summary>
		/// Raises event get message.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="message">Message which to get.</param>
		/// <param name="sessionSocket">Message which to get.</param>
		/// <returns></returns>
		internal virtual byte[] OnGetMail(Pop3Session session,Pop3Message message,Socket sessionSocket) 
		{			
			Pop3Message_EventArgs oArg = new Pop3Message_EventArgs(session,message,sessionSocket);
			if(this.GetMessage != null){
				this.GetMessage(this,oArg);
			}
			
			return oArg.MessageData;
		}
Ejemplo n.º 8
0
		/// <summary>
		/// Gest Pop33 messages info.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="messages"></param>
		internal virtual void OnGetMessagesInfo(Pop3Session session,Pop3Messages messages) 
		{				
			GetMessagesInfo_EventArgs oArg = new GetMessagesInfo_EventArgs(session,messages,session.UserName);
			if(this.GetMessgesList != null){
				this.GetMessgesList(this, oArg);
			}
		}
Ejemplo n.º 9
0
		/// <summary>
		/// Authenticates user.
		/// </summary>
		/// <param name="session">Reference to current Pop33 session.</param>
		/// <param name="userName">User name.</param>
		/// <param name="passwData"></param>
		/// <param name="data"></param>
		/// <param name="authType"></param>
		/// <returns></returns>
		internal virtual AuthUser_EventArgs OnAuthUser(Pop3Session session,string userName,string passwData,string data,AuthType authType) 
		{				
			AuthUser_EventArgs oArg = new AuthUser_EventArgs(session,userName,passwData,data,authType);
			if(this.AuthUser != null){
				this.AuthUser(this,oArg);
			}
			
			return oArg;
		}
Ejemplo n.º 10
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="socket"></param>
		protected override void InitNewSession(Socket socket)
		{
			SocketLogger logger = new SocketLogger(socket,this.SessionLog);
			Pop3Session session = new Pop3Session(socket,this,logger);
		}