00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __POP3EXAMPLE_H__
00019 #define __POP3EXAMPLE_H__
00020
00021
00022 #include <e32cons.h>
00023 #include <mtclreg.h>
00024 #include "pop3set.h"
00025 #include "popcmtm.h"
00026 #include <mtclbase.h>
00027
00028 #include <iapprefs.h>
00029 #include <cemailaccounts.h>
00030
00031 #include <es_sock.h>
00032 #include <commdb.h>
00033 #include <cdbpreftable.h>
00034 #include <commdbconnpref.h>
00035 #include <commsdattypesv1_1.h>
00036 #include <commsdat.h>
00037 using namespace CommsDat;
00038
00039 _LIT(LDD_NAME,"ECOMM");
00040
00041 #if defined (__WINS__)
00042 _LIT(PDD_NAME,"ECDRV");
00043 #else
00044 _LIT(PDD_NAME,"ECUART1");
00045 #endif
00046
00047 _LIT(KMailtestPath, "\\mailtest\\");
00048 _LIT( KRfc822Dir,"\\mailtest\\rfc822\\");
00049
00050
00051 _LIT(KTitle, "pop3example" );
00052
00059 class CPop3Example :public CBase, public MMsvSessionObserver
00060 {
00061 public:
00062 static CPop3Example* NewL();
00063 ~CPop3Example();
00064
00065
00066 void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
00067 void CreateClientRegistryL();
00068 void CreatePopAndSmtpAccountL();
00069 void CreateSmtpMessageL();
00070 void SendSMTPMessageL();
00071 void ConnectDownloadAndDisconnectPOPServerL();
00072
00073 private:
00074
00075 CPop3Example();
00076 void ConstructL();
00078 CConsoleBase* iConsole;
00080 CClientMtmRegistry* iClientRegistry;
00082 CMsvSession* iSession;
00084 CBaseMtm* iMtm;
00086 CMsvOperation* iOperation;
00088 TMsvId iPopServiceId;
00090 TPopAccount iPopAccount;
00092 TSmtpAccount iSmtpAccount;
00093
00094
00095 };
00096
00097 #endif //__POP3EXAMPLE_H__