examples/ForumNokia/S60_3rd_Edition_TextMTM_Example/modules/Server/inc/TXTMBOX.H

00001 // TXTMBOX.H
00002 //
00003 // Copyright (c) 1999 Symbian Ltd.  All rights reserved.
00004 //
00005 
00006 
00007 #ifndef __TXTMBOX_H__
00008 #define __TXTMBOX_H__
00009 
00010 #include <e32base.h>
00011 #include <F32FILE.H>
00012 #include <MSVSTD.H>
00013 #include <MSVENTRY.H>
00014 #include <E32DEF.H>
00015 #include "txut.h"
00016 
00017 //
00018 //      CTxtRefreshMBox: refresher class to synchronize real folder and service
00019 //
00020 
00021 class CTxtRefreshMBox : public CBase
00022         {
00023         public:
00024                 static CTxtRefreshMBox* NewL(RFs& aFs, TFileName& aRelativePath, 
00025                         TMsvId aCurrentRootEntryId, CMsvServerEntry *aEntry, TMsvId aServiceEntryId,
00026                         const TMTMTxtSettings& aTxtSettings);
00027                 ~CTxtRefreshMBox();
00028                 TBool DoStepL(); // Returns ETrue if finished.
00029         private: // Construction
00030                 CTxtRefreshMBox(RFs& aFs,TFileName& aRelativePath, TMsvId aCurrentRootEntryId, 
00031                         CMsvServerEntry *aEntry, TMsvId aServiceEntryId, const TMTMTxtSettings& aTxtSettings) 
00032                         : iFs(aFs) , iRelativePath(aRelativePath), iCurrentRootEntryId(aCurrentRootEntryId), 
00033                         iEntry(aEntry), iTxtSettings(aTxtSettings), iServiceEntryId(aServiceEntryId)
00034                         {};
00035                 void ConstructL();
00036         private: // Tools
00037                 TInt CreateChild(const TDesC& aDescription, const TDesC& aDetails, 
00038                         TUid aMessageType, const TTime& aDate, const TInt aSize);
00039                 void DeleteEntryL();
00040                 TMsvId InsertFileL();
00041                 void CallNewMessagesL();
00042 
00043         void SetBodyFromFileL( const TMsvId& aId,  RFile& afile  );
00044 
00045     
00046         private:
00047                 RFs&  iFs;
00048                 TFileName& iRelativePath;
00049                 TMsvId  iCurrentRootEntryId;
00050                 CDir* iFilelist;
00051                 CMsvServerEntry* iEntry;
00052                 CMsvEntrySelection* iExistingEntries;
00053                 
00054                 TInt iCurrentFile;      // index for file list
00055                 TInt iCurrentEntry;     // index for entry list
00056                 const TMTMTxtSettings& iTxtSettings;
00057                 TMsvId iServiceEntryId;
00058         
00059         };
00060 #endif

Generated by  doxygen 1.6.2