78 lines
5.7 KiB
C
78 lines
5.7 KiB
C
|
/*
|
|||
|
* Purpose: private wxWindows helper classes for SMTP
|
|||
|
* Author: Frank Bu<EFBFBD>
|
|||
|
* Created: 2002
|
|||
|
*/
|
|||
|
|
|||
|
#ifndef STATES_H
|
|||
|
#define STATES_H
|
|||
|
|
|||
|
#include <wx/wx.h>
|
|||
|
#include <wx/socket.h>
|
|||
|
|
|||
|
#include "smtp.h"
|
|||
|
|
|||
|
class MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
virtual void onConnect(wxSMTP& context, wxSocketEvent& event) const {}
|
|||
|
virtual void onResponse(wxSMTP& context, int smtpCode) const {}
|
|||
|
};
|
|||
|
|
|||
|
class InitialState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onConnect(wxSMTP& context, wxSocketEvent& event) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class ConnectedState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class HeloState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class SendMailFromState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class RcptListState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class StartDataState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
|
|||
|
class DataState : public MailState
|
|||
|
{
|
|||
|
public:
|
|||
|
void onResponse(wxSMTP& context, int smtpCode) const ;
|
|||
|
};
|
|||
|
|
|||
|
extern const InitialState g_initialState;
|
|||
|
extern const ConnectedState g_connectedState;
|
|||
|
extern const HeloState g_heloState;
|
|||
|
extern const SendMailFromState g_sendMailFromState;
|
|||
|
extern const RcptListState g_rcptListState;
|
|||
|
extern const StartDataState g_startDataState;
|
|||
|
extern const DataState g_dataState;
|
|||
|
|
|||
|
#endif
|