diff options
Diffstat (limited to 'src/async/smtp/MCSMTPAsyncSession.h')
-rw-r--r-- | src/async/smtp/MCSMTPAsyncSession.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/async/smtp/MCSMTPAsyncSession.h b/src/async/smtp/MCSMTPAsyncSession.h new file mode 100644 index 00000000..8e0e50b0 --- /dev/null +++ b/src/async/smtp/MCSMTPAsyncSession.h @@ -0,0 +1,73 @@ +#ifndef __MAILCORE_MCSMTPASYNCSESSION_H + +#define __MAILCORE_MCSMTPASYNCSESSION_H + +#include <mailcore/MCBaseTypes.h> +#include <mailcore/MCMessageConstants.h> +#include <libetpan/libetpan.h> + +namespace mailcore { + + class MessageBuilder; + class SMTPOperation; + class SMTPSession; + class Address; + + class SMTPAsyncSession : public Object { + private: + String * mHostname; + unsigned int mPort; + String * mUsername; + String * mPassword; + AuthType mAuthType; + ConnectionType mConnectionType; + time_t mTimeout; + bool mCheckCertificateEnabled; + bool mUseHeloIPEnabled; + + SMTPSession * mSession; + OperationQueue * mQueue; + + void queue(SMTPOperation * op); + + public: + SMTPAsyncSession(); + virtual ~SMTPAsyncSession(); + + virtual String * className(); + + virtual void setHostname(String * hostname); + virtual String * hostname(); + + virtual void setPort(unsigned int port); + virtual unsigned int port(); + + virtual void setUsername(String * username); + virtual String * username(); + + virtual void setPassword(String * password); + virtual String * password(); + + virtual void setAuthType(AuthType authType); + virtual AuthType authType(); + + virtual void setConnectionType(ConnectionType connectionType); + virtual ConnectionType connectionType(); + + virtual void setTimeout(time_t timeout); + virtual time_t timeout(); + + virtual void setCheckCertificateEnabled(bool enabled); + virtual bool isCheckCertificateEnabled(); + + virtual void setUseHeloIPEnabled(bool enabled); + virtual bool useHeloIPEnabled(); + + virtual SMTPOperation * sendMessage(Address * from, Array * recipients, Data * messageData); + virtual SMTPOperation * sendMessage(Data * messageData); + virtual SMTPOperation * sendMessage(MessageBuilder * msg); + }; + +} + +#endif |