examples/ForumNokia/S60_3rd_Edition_TextMTM_Example/modules/UI/inc/txtmtmcreateop.h

00001 //
00002 // © 2004 Nokia Corporation.  All rights reserved.
00003 //
00004 
00005 #ifndef __TXTMTMCREATEDOP_H__
00006 #define __TXTMTMCREATEDOP_H__
00007 
00008 #include <mtmuibas.h>
00009 #include <msvapi.h>     // CMsvOperation
00010 
00011 
00012 // Progress information for create operation
00013 
00014 class TTxtMtmCreateOpProgress
00015     {
00016     public:
00017         enum TState
00018             {
00019             EInit,
00020             ECreateMessage,
00021             EEditMessage,
00022             EFinished
00023             };
00024 
00025     public:
00026         TState iState;
00027         TMsvId iFinalMsgId;
00028         TInt iError;
00029     };
00030 
00031 // utility typedef of package buffer
00032 typedef TPckgBuf <TTxtMtmCreateOpProgress> TTxtMtmCreateOpProgressBuf;
00033 
00034 
00035 class CTxtMtmCreateOperation : public CMsvOperation
00036         {       
00037         public:
00038         static CTxtMtmCreateOperation* NewL(const TMsvEntry& aEntry, CMsvEntry& aParent, CMsvSession& aMsvSession, CBaseMtmUi& aMtmUi, TRequestStatus& aObserverRequestStatus);
00039         ~CTxtMtmCreateOperation();
00040 
00041         public: // from CMsvOperation           
00042                 virtual const TDesC8& ProgressL();
00043         virtual const TDesC8& FinalProgress();
00044 
00045         public: // from CActive
00046                 virtual void DoCancel();
00047                 virtual void RunL();
00048         virtual TInt RunError(TInt aError);
00049 
00050     private:
00051                 void CreateBodyIfNoneL();
00052         void CreateMessageL();
00053         void ScheduleEditL();
00054         void Schedule(TInt aError);
00055 
00056     private:
00057                 CTxtMtmCreateOperation(const TMsvEntry& aEntry, CMsvEntry& aParent, CMsvSession& aMsvSession, CBaseMtmUi& aMtmUi, TRequestStatus& aObserverRequestStatus);
00058         void ConstructL();              
00059 
00060         private:
00061                 TTxtMtmCreateOpProgress iProgress;
00062         TTxtMtmCreateOpProgressBuf iProgressBuf;
00063         TMsvEntry iEntry; 
00064         CMsvEntry& iParent;
00065      
00066         CBaseMtmUi& iMtmUi;
00067         CMsvOperation* iOp;
00068         };
00069 
00070 #endif  // __TXTMTMCREATEDOP_H__

Generated by  doxygen 1.6.2