omadrm/drmplugins/drmromtm/ui/inc/RoMtmUi.h
changeset 23 493788a4a8a4
parent 0 95b198f216e5
child 49 69d8e75812b7
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
    20 #define RIGHTSOBJECTMTMUI_H
    20 #define RIGHTSOBJECTMTMUI_H
    21 
    21 
    22 //  INCLUDES
    22 //  INCLUDES
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <mtmuibas.h>
    24 #include <mtmuibas.h>
    25 #include <aknserverapp.h>
    25 #include <AknServerApp.h>
    26  
    26 
    27 // CONSTANTS
    27 // CONSTANTS
    28 // MACRightsObjectS
    28 // MACRightsObjectS
    29 // DATA TYPES
    29 // DATA TYPES
    30 enum TMessageType
    30 enum TMessageType
    31     {
    31     {
    41 class CDocumentHandler;
    41 class CDocumentHandler;
    42 
    42 
    43 
    43 
    44 // CLASS DECLARATION
    44 // CLASS DECLARATION
    45 /**
    45 /**
    46 *	CRightsObjectMtmUi
    46 *   CRightsObjectMtmUi
    47 *  
    47 *
    48 *  @lib romtmui.lib
    48 *  @lib romtmui.lib
    49 *  @since 2.5
    49 *  @since 2.5
    50 */
    50 */
    51 //
    51 //
    52 // CRightsObjectMtmUi: User Interface MTM
    52 // CRightsObjectMtmUi: User Interface MTM
    53 //
    53 //
    54 class CRightsObjectMtmUi : public CBaseMtmUi , public MAknServerAppExitObserver , public MApaServerAppExitObserver
    54 class CRightsObjectMtmUi : public CBaseMtmUi , public MAknServerAppExitObserver , public MApaServerAppExitObserver
    55 	{
    55     {
    56 	public:
    56     public:
    57 		// Construction
    57         // Construction
    58         /**
    58         /**
    59         * Two-phased constructor.
    59         * Two-phased constructor.
    60         */
    60         */
    61 		static CRightsObjectMtmUi* NewL( CBaseMtm& aBaseMtm , CRegisteredMtmDll& aRegisteredMtmDll );
    61         static CRightsObjectMtmUi* NewL( CBaseMtm& aBaseMtm , CRegisteredMtmDll& aRegisteredMtmDll );
    62 
    62 
    63 		// Destruction
    63         // Destruction
    64 
    64 
    65         /**
    65         /**
    66         * Destructor.
    66         * Destructor.
    67         */
    67         */
    68 		~CRightsObjectMtmUi();
    68         ~CRightsObjectMtmUi();
    69 
    69 
    70 		/*************************************
    70         /*************************************
    71 		*
    71         *
    72 		*		from CBaseMtmUi
    72         *       from CBaseMtmUi
    73 		*
    73         *
    74 		**************************************/
    74         **************************************/
    75 
    75 
    76 
    76 
    77         /**
    77         /**
    78         * CancelL.
    78         * CancelL.
    79         * @since 2.5
    79         * @since 2.5
    80 		*
    80         *
    81 		* Not Supported
    81         * Not Supported
    82 		*
    82         *
    83         */
    83         */
    84 		CMsvOperation* CancelL( TRequestStatus& aStatus, const CMsvEntrySelection& aSelection );
    84         CMsvOperation* CancelL( TRequestStatus& aStatus, const CMsvEntrySelection& aSelection );
    85 
    85 
    86 		// Context-specific
    86         // Context-specific
    87         /**
    87         /**
    88         * OpenL.
    88         * OpenL.
    89         * @since 2.5
    89         * @since 2.5
    90 		*
    90         *
    91 		* @param aStatus The request status to be completed when the operation has finished
    91         * @param aStatus The request status to be completed when the operation has finished
    92 		* @return If successful, this is an asynchronously completing open operation. 
    92         * @return If successful, this is an asynchronously completing open operation.
    93 		*         If failed, this is a completed operation, with status set to the relevant error code.
    93         *         If failed, this is a completed operation, with status set to the relevant error code.
    94         */
    94         */
    95 		CMsvOperation* OpenL( TRequestStatus& aStatus ); 
    95         CMsvOperation* OpenL( TRequestStatus& aStatus );
    96 		
    96 
    97         /**
    97         /**
    98         * OpenL.
    98         * OpenL.
    99         * @since 2.5
    99         * @since 2.5
   100 		*
   100         *
   101 		* @param aStatus The request status to be completed when the operation has finished
   101         * @param aStatus The request status to be completed when the operation has finished
   102 		* @param aSelection Selection of message entries 
   102         * @param aSelection Selection of message entries
   103 		* @return If successful, this is an asynchronously completing open operation. 
   103         * @return If successful, this is an asynchronously completing open operation.
   104 		*         If failed, this is a completed operation, with status set to the relevant error code.
   104         *         If failed, this is a completed operation, with status set to the relevant error code.
   105         */
   105         */
   106 		CMsvOperation* OpenL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection ); 
   106         CMsvOperation* OpenL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection );
   107 
   107 
   108         /**
   108         /**
   109         * CloseL.
   109         * CloseL.
   110         * @since 2.5
   110         * @since 2.5
   111 		*
   111         *
   112 		* Not Supported
   112         * Not Supported
   113 		*
   113         *
   114         */
   114         */
   115 		CMsvOperation* CloseL( TRequestStatus& aStatus ); 
   115         CMsvOperation* CloseL( TRequestStatus& aStatus );
   116 		
   116 
   117 		/**
   117         /**
   118         * CloseL.
   118         * CloseL.
   119         * @since 2.5
   119         * @since 2.5
   120 		*
   120         *
   121 		* Not Supported
   121         * Not Supported
   122 		*
   122         *
   123         */
   123         */
   124 		CMsvOperation* CloseL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection );
   124         CMsvOperation* CloseL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection );
   125 
   125 
   126 		// Launches editor/settings dialog as appropriate  
   126         // Launches editor/settings dialog as appropriate
   127 		/**
   127         /**
   128         * EditL.
   128         * EditL.
   129         * @since 2.5
   129         * @since 2.5
   130 		*
   130         *
   131 		* Not Supported
   131         * Not Supported
   132 		*
   132         *
   133         */
   133         */
   134 		CMsvOperation* EditL( TRequestStatus& aStatus );
   134         CMsvOperation* EditL( TRequestStatus& aStatus );
   135 		
   135 
   136 		/**
   136         /**
   137         * EditL.
   137         * EditL.
   138         * @since 2.5
   138         * @since 2.5
   139 		*
   139         *
   140 		* Not Supported
   140         * Not Supported
   141 		*
   141         *
   142         */
   142         */
   143 		CMsvOperation* EditL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection ) ;
   143         CMsvOperation* EditL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection ) ;
   144 
   144 
   145 		// Launches viewer/settings dialog as appropriate  
   145         // Launches viewer/settings dialog as appropriate
   146         /**
   146         /**
   147         * ViewL.
   147         * ViewL.
   148         * @since 2.5
   148         * @since 2.5
   149 		*
   149         *
   150 		* @param aStatus The request status to be completed when the operation has finished
   150         * @param aStatus The request status to be completed when the operation has finished
   151 		* @return If successful, this is an asynchronously completing open operation. 
   151         * @return If successful, this is an asynchronously completing open operation.
   152 		*         If failed, this is a completed operation, with status set to the relevant error code.
   152         *         If failed, this is a completed operation, with status set to the relevant error code.
   153         */
   153         */
   154 		CMsvOperation* ViewL( TRequestStatus& aStatus );
   154         CMsvOperation* ViewL( TRequestStatus& aStatus );
   155 		
   155 
   156         /**
   156         /**
   157         * ViewL.
   157         * ViewL.
   158         * @since 2.5
   158         * @since 2.5
   159 		*
   159         *
   160 		* @param aStatus The request status to be completed when the operation has finished
   160         * @param aStatus The request status to be completed when the operation has finished
   161 		* @param aSelection Selection of message entries 
   161         * @param aSelection Selection of message entries
   162 		* @return If successful, this is an asynchronously completing open operation. 
   162         * @return If successful, this is an asynchronously completing open operation.
   163 		*         If failed, this is a completed operation, with status set to the relevant error code.
   163         *         If failed, this is a completed operation, with status set to the relevant error code.
   164         */		
   164         */
   165 		CMsvOperation* ViewL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection );
   165         CMsvOperation* ViewL( TRequestStatus& aStatus , const CMsvEntrySelection& aSelection );
   166 
   166 
   167 		// Reply/forward
   167         // Reply/forward
   168 		/**
   168         /**
   169         * ReplyL.
   169         * ReplyL.
   170         * @since 2.5
   170         * @since 2.5
   171 		*
   171         *
   172 		* Not Supported
   172         * Not Supported
   173 		*
   173         *
   174         */
   174         */
   175 		CMsvOperation* ReplyL( TMsvId aDestination , TMsvPartList aPartList , TRequestStatus& aCompletionStatus );
   175         CMsvOperation* ReplyL( TMsvId aDestination , TMsvPartList aPartList , TRequestStatus& aCompletionStatus );
   176 		
   176 
   177 		/**
   177         /**
   178         * ForwardL.
   178         * ForwardL.
   179         * @since 2.5
   179         * @since 2.5
   180 		*
   180         *
   181 		* Not Supported
   181         * Not Supported
   182 		*
   182         *
   183         */
   183         */
   184 		CMsvOperation* ForwardL( TMsvId aDestination , TMsvPartList aPartList , TRequestStatus& aCompletionStatus );
   184         CMsvOperation* ForwardL( TMsvId aDestination , TMsvPartList aPartList , TRequestStatus& aCompletionStatus );
   185 
   185 
   186 
   186 
   187 	public:
   187     public:
   188 		void HandleServerAppExit(TInt aReason);
   188         void HandleServerAppExit(TInt aReason);
   189 
   189 
   190 
   190 
   191 	protected: 
   191     protected:
   192 		/*************************************
   192         /*************************************
   193 		*
   193         *
   194 		*		from CBaseMtm
   194         *       from CBaseMtm
   195 		*
   195         *
   196 		**************************************/
   196         **************************************/
   197 		void GetResourceFileName( TFileName& aFileName ) const;
   197         void GetResourceFileName( TFileName& aFileName ) const;
   198 
   198 
   199 	protected:
   199     protected:
   200 		CRightsObjectMtmUi( CBaseMtm& aBaseMtm , CRegisteredMtmDll& aRegisteredMtmDll );
   200         CRightsObjectMtmUi( CBaseMtm& aBaseMtm , CRegisteredMtmDll& aRegisteredMtmDll );
   201 		void ConstructL();
   201         void ConstructL();
   202 
   202 
   203 	private:
   203     private:
   204 		void CheckMessageTypeL();
   204         void CheckMessageTypeL();
   205 		CMsvOperation* LaunchEditorApplicationL( TRequestStatus& aStatus , TMsvId aId , TBool aReadOnly );
   205         CMsvOperation* LaunchEditorApplicationL( TRequestStatus& aStatus , TMsvId aId , TBool aReadOnly );
   206 		void SetProgressSuccess( TPckgBuf<TMsvLocalOperationProgress>& aProgress , TMsvId aId );
   206         void SetProgressSuccess( TPckgBuf<TMsvLocalOperationProgress>& aProgress , TMsvId aId );
   207 		CMsvOperation* CompletedOperationL( TRequestStatus& aObserverStatus );
   207         CMsvOperation* CompletedOperationL( TRequestStatus& aObserverStatus );
   208         TBool ShowQueryL( TDesC16& aFile );
   208         TBool ShowQueryL( TDesC16& aFile );
   209         TInt CheckTriggerTypeL( TDesC16& aFile );
   209         TInt CheckTriggerTypeL( TDesC16& aFile );
   210 	private:
   210     private:
   211 		TMessageType iType;
   211         TMessageType iType;
   212 		CDocumentHandler* iDocHandler;
   212         CDocumentHandler* iDocHandler;
   213 		RFs iFs;
   213         RFs iFs;
   214 		CEikProcess* iHostProcess;
   214         CEikProcess* iHostProcess;
   215     CAknLaunchAppService* iOpenService;
   215     CAknLaunchAppService* iOpenService;
   216 	};
   216     };
   217 
   217 
   218 #endif      // RIGHTSOBJECTMTMUI_H
   218 #endif      // RIGHTSOBJECTMTMUI_H
   219             
   219 
   220 // End of File
   220 // End of File