00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __IMAP4EXAMPLE_H__
00017 #define __IMAP4EXAMPLE_H__
00018
00019
00020 #include <mtclreg.h>
00021 #include <cemailaccounts.h>
00022 #include <commsdattypesv1_1.h>
00023
00024 using namespace CommsDat;
00025
00026 _LIT(LDD_NAME,"ECOMM");
00027
00028 #if defined (__WINS__)
00029 _LIT(PDD_NAME,"ECDRV");
00030 #else
00031 _LIT(PDD_NAME,"ECUART1");
00032 #endif
00033
00043 class CImap4Example :public CBase, public MMsvSessionObserver
00044 {
00045 public:
00046 static CImap4Example* NewL();
00047 ~CImap4Example();
00048
00049
00050
00051 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
00052 void CreateClientRegistryL();
00053 void CreateImapAndSmtpAccountL();
00054 void CreateSmtpMessageL();
00055 void SendSMTPMessageL();
00056 void ConnectAndCopyAllMailAndDisconnectL();
00057
00058 private:
00059 CImap4Example();
00060 void ConstructL();
00062 CConsoleBase* iConsole;
00064 CClientMtmRegistry* iClientRegistry;
00066 CMsvSession* iSession;
00068 CBaseMtm* iMtm;
00070 CMsvOperation* iOperation;
00072 TImapAccount iImapAccount;
00074 TSmtpAccount iSmtpAccount;
00075 };
00076
00077 #endif //__IMAP4EXAMPLE_H__