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

00001 
00002 // � 2004 Nokia Corporation.  All rights reserved.
00003 //
00004 
00005 #ifndef __TXTMTMEDITOROP_H__
00006 #define __TXTMTMEDITOROP_H__
00007 
00008 #include <mtmuibas.h>
00009 #include <msvapi.h>     // CMsvOperation
00010 #include <apparc.h>
00011 #include <eikdoc.h>             // CEikDocument
00012 #include "TxtViewerService.h"
00013 #include <apaserverapp.h> 
00014 // generated filename base
00015 //const TUid KUidMsvEditorParameterValue = {0x100014AA};
00016 //const TUid KUidTextMTMView = { 0x05B22967 };
00017 // Progress information for create operation
00018 
00019 class CTextMtmUi;
00020 
00021 class TTxtMtmEditorOpProgress
00022     {
00023     public:
00024         enum TState
00025             {
00026             EInit,
00027                         EEditorLaunched,
00028                         EEditorOpen,
00029             EFinished
00030             };
00031 
00032     public:
00033         TState iState;
00034         TInt iError;
00035     };
00036 
00037 // utility typedef of package buffer
00038 typedef TPckgBuf <TTxtMtmEditorOpProgress> TTxtMtmEditorOpProgressBuf;
00039 
00040 class TTextMtmEditorParams
00041         {
00042         public:
00043                 enum TLaunchType {EEditor,EViewer};
00044         public:
00045                 TMsvId iMessage;
00046                 TLaunchType iLaunchType;
00047         };
00048 
00049 class CTxtMtmEditorOperation : public CMsvOperation, public MAknServerAppExitObserver
00050         {
00051         public:
00052                 enum TOpenMode {EEdit,EView};
00053         public:
00054         static CTxtMtmEditorOperation* NewL(const TMsvId& aId,TOpenMode aMode, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus,CTextMtmUi& aMtmUi);
00055         ~CTxtMtmEditorOperation();
00056 
00057         public: // from CMsvOperation
00058                 virtual const TDesC8& ProgressL();
00059         virtual const TDesC8& FinalProgress();
00060                 void HandleServerAppExit( TInt aReason );
00061 
00062     private:
00063         void LaunchEditorL();
00064                 void SendL(); 
00065                 CTxtMtmEditorOperation(const TMsvId& aId, TOpenMode aMode, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus,CTextMtmUi& aMtmUi);
00066         void ConstructL();
00067 
00068         private:// from CActive
00069                 virtual void RunL();
00070                 virtual void DoCancel();
00071         virtual TInt RunError(TInt aError);
00072 
00073     private:
00074                 TTxtMtmEditorOpProgress iProgress;
00075         TTxtMtmEditorOpProgressBuf iProgressBuf;
00076                 TMsvId iId;
00077                 TOpenMode iMode;
00078                 RTxtViewerService iService;
00079                 CEikDocument* iDocument;
00080                 CApaServerAppExitMonitor* iMonitor;
00081                 CTextMtmUi& iMtmUi;
00082         };
00083 
00084 #endif  // __TXTMTMEDITOROP_H__

Generated by  doxygen 1.6.2