omadrm/drmplugins/drmromtm/uiData/inc/RoMtmDat.h
changeset 23 493788a4a8a4
parent 0 95b198f216e5
equal deleted inserted replaced
5:79d62d1d7957 23:493788a4a8a4
    23 #if !defined(__MSVSTD_H__)
    23 #if !defined(__MSVSTD_H__)
    24 #include <MSVSTD.H>
    24 #include <MSVSTD.H>
    25 #endif
    25 #endif
    26 
    26 
    27 #if !defined(__MTUDBAS_H__)
    27 #if !defined(__MTUDBAS_H__)
    28 #include <MTUDCBAS.H>
    28 #include <mtudcbas.h>
    29 #endif
    29 #endif
    30 
    30 
    31 // CONSTANTS
    31 // CONSTANTS
    32 // MACROS
    32 // MACROS
    33 // DATA TYPES
    33 // DATA TYPES
    36 class CRightsObjectMtmUiDataSessionObserver;
    36 class CRightsObjectMtmUiDataSessionObserver;
    37 class CMsvSession;
    37 class CMsvSession;
    38 
    38 
    39 // CLASS DECLARATION
    39 // CLASS DECLARATION
    40 /**
    40 /**
    41 *	CRightsObjectMtmUiDataSessionObserver
    41 *   CRightsObjectMtmUiDataSessionObserver
    42 *  
    42 *
    43 *   CMsvSession Observer
    43 *   CMsvSession Observer
    44 *
    44 *
    45 *  @lib RoMtmDat.lib
    45 *  @lib RoMtmDat.lib
    46 *  @since 2.5
    46 *  @since 2.5
    47 */
    47 */
    48 class CRightsObjectMtmUiDataSessionObserver : public CBase, public MMsvSessionObserver
    48 class CRightsObjectMtmUiDataSessionObserver : public CBase, public MMsvSessionObserver
    49 	{
    49     {
    50 	public:
    50     public:
    51 
    51 
    52         /**
    52         /**
    53 		* Two-phased constructor.
    53         * Two-phased constructor.
    54 		*/
    54         */
    55 		static CRightsObjectMtmUiDataSessionObserver* NewL();
    55         static CRightsObjectMtmUiDataSessionObserver* NewL();
    56 
    56 
    57 		/**
    57         /**
    58 		* Destructor.
    58         * Destructor.
    59 		*/
    59         */
    60 		~CRightsObjectMtmUiDataSessionObserver();
    60         ~CRightsObjectMtmUiDataSessionObserver();
    61 
    61 
    62         /**
    62         /**
    63         * From MMsvSessionObserver
    63         * From MMsvSessionObserver
    64         */
    64         */
    65         void HandleSessionEventL( 
    65         void HandleSessionEventL(
    66             TMsvSessionEvent aEvent, 
    66             TMsvSessionEvent aEvent,
    67             TAny* aArg1, 
    67             TAny* aArg1,
    68             TAny* aArg2, 
    68             TAny* aArg2,
    69             TAny* aArg3 );
    69             TAny* aArg3 );
    70 
    70 
    71     private:
    71     private:
    72         CRightsObjectMtmUiDataSessionObserver();
    72         CRightsObjectMtmUiDataSessionObserver();
    73         void ConstructL();
    73         void ConstructL();
    74     };
    74     };
    75 
    75 
    76 
    76 
    77 // CLASS DECLARATION
    77 // CLASS DECLARATION
    78 /**
    78 /**
    79 *	CRightsObjectMtmUiData
    79 *   CRightsObjectMtmUiData
    80 *  
    80 *
    81 *  @lib RoMtmDat.lib
    81 *  @lib RoMtmDat.lib
    82 *  @since 2.5
    82 *  @since 2.5
    83 */
    83 */
    84 class CRightsObjectMtmUiData : public CBaseMtmUiData
    84 class CRightsObjectMtmUiData : public CBaseMtmUiData
    85 	{
    85     {
    86 	public:
    86     public:
    87 	// Construction, initialisation, and destruction 
    87     // Construction, initialisation, and destruction
    88 	
    88 
    89 		/**
    89         /**
    90 		* Two-phased constructor.
    90         * Two-phased constructor.
    91 		*/
    91         */
    92 		static CRightsObjectMtmUiData* NewL( CRegisteredMtmDll& aRegisteredDll );
    92         static CRightsObjectMtmUiData* NewL( CRegisteredMtmDll& aRegisteredDll );
    93 
    93 
    94 		/**
    94         /**
    95 		* Destructor.
    95         * Destructor.
    96 		*/
    96         */
    97 		~CRightsObjectMtmUiData();
    97         ~CRightsObjectMtmUiData();
    98 
    98 
    99 		/*************************************
    99         /*************************************
   100 		*
   100         *
   101 		*		from CBaseMtm
   101         *       from CBaseMtm
   102 		*
   102         *
   103 		**************************************/	
   103         **************************************/
   104 
   104 
   105 		// Context-specific information 
   105         // Context-specific information
   106 
   106 
   107 		/**
   107         /**
   108         * CanEditEntryL
   108         * CanEditEntryL
   109         * @since 2.5
   109         * @since 2.5
   110         * 
   110         *
   111 		* Not supported
   111         * Not supported
   112 		*
   112         *
   113         */
   113         */
   114 		TBool CanEditEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   114         TBool CanEditEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   115 		
   115 
   116 		/**
   116         /**
   117         * CanViewEntryL
   117         * CanViewEntryL
   118         * @since 2.5
   118         * @since 2.5
   119         * 
   119         *
   120 		* @param aContext  The entry to which the operation applies. 
   120         * @param aContext  The entry to which the operation applies.
   121  		* @param aReasonResourceId  On return, a resource string ID or 0. 
   121         * @param aReasonResourceId  On return, a resource string ID or 0.
   122  		*   
   122         *
   123 		* @return KErrNone: the operation is appropriate on the entry. KErrNotSupported: the operation is not appropriate on the entry. 
   123         * @return KErrNone: the operation is appropriate on the entry. KErrNotSupported: the operation is not appropriate on the entry.
   124         */		
   124         */
   125 		TBool CanViewEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   125         TBool CanViewEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   126 		
   126 
   127 		/**
   127         /**
   128         * CanOpenEntryL
   128         * CanOpenEntryL
   129         * @since 2.5
   129         * @since 2.5
   130         * 
   130         *
   131 		* @param aContext  The entry to which the operation applies. 
   131         * @param aContext  The entry to which the operation applies.
   132  		* @param aReasonResourceId  On return, a resource string ID or 0. 
   132         * @param aReasonResourceId  On return, a resource string ID or 0.
   133  		*   
   133         *
   134 		* @return KErrNone: the operation is appropriate on the entry. KErrNotSupported: the operation is not appropriate on the entry. 
   134         * @return KErrNone: the operation is appropriate on the entry. KErrNotSupported: the operation is not appropriate on the entry.
   135 	    */		
   135         */
   136 		TBool CanOpenEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   136         TBool CanOpenEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   137 		
   137 
   138 		/**
   138         /**
   139         * CanCloseEntryL
   139         * CanCloseEntryL
   140         * @since 2.5
   140         * @since 2.5
   141         * 
   141         *
   142 		* Not supported
   142         * Not supported
   143 		*
   143         *
   144         */		
   144         */
   145 		TBool CanCloseEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   145         TBool CanCloseEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   146 		
   146 
   147 		/**
   147         /**
   148         * CanDeleteFromEntryL
   148         * CanDeleteFromEntryL
   149         * @since 2.5
   149         * @since 2.5
   150         * 
   150         *
   151 		* Not supported
   151         * Not supported
   152 		*
   152         *
   153         */		
   153         */
   154 		TBool CanDeleteFromEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   154         TBool CanDeleteFromEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   155 		
   155 
   156 		/**
   156         /**
   157         * CanCopyMoveToEntryL
   157         * CanCopyMoveToEntryL
   158         * @since 2.5
   158         * @since 2.5
   159         * 
   159         *
   160 		* Not supported
   160         * Not supported
   161 		*
   161         *
   162         */		
   162         */
   163 		TBool CanCopyMoveToEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   163         TBool CanCopyMoveToEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   164 		
   164 
   165 		/**
   165         /**
   166         * CanCopyMoveFromEntryL
   166         * CanCopyMoveFromEntryL
   167         * @since 2.5
   167         * @since 2.5
   168         * 
   168         *
   169 		* Not supported
   169         * Not supported
   170 		*
   170         *
   171         */		
   171         */
   172 		TBool CanCopyMoveFromEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   172         TBool CanCopyMoveFromEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   173 		
   173 
   174 		/**
   174         /**
   175         * CanReplyToEntryL
   175         * CanReplyToEntryL
   176         * @since 2.5
   176         * @since 2.5
   177         * 
   177         *
   178 		* Not supported
   178         * Not supported
   179 		*
   179         *
   180         */		
   180         */
   181 		TBool CanReplyToEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   181         TBool CanReplyToEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   182 		
   182 
   183 		/**
   183         /**
   184         * CanForwardEntryL
   184         * CanForwardEntryL
   185         * @since 2.5
   185         * @since 2.5
   186         * 
   186         *
   187 		* Not supported
   187         * Not supported
   188 		*
   188         *
   189         */		
   189         */
   190 		TBool CanForwardEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   190         TBool CanForwardEntryL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   191 		
   191 
   192 		/**
   192         /**
   193         * CanCreateEntryL
   193         * CanCreateEntryL
   194         * @since 2.5
   194         * @since 2.5
   195         * 
   195         *
   196 		* Not supported
   196         * Not supported
   197 		*
   197         *
   198         */		
   198         */
   199 		TBool CanCreateEntryL( const TMsvEntry& aContext , TMsvEntry& aNewEntry , TInt& aReasonResourceId ) const;
   199         TBool CanCreateEntryL( const TMsvEntry& aContext , TMsvEntry& aNewEntry , TInt& aReasonResourceId ) const;
   200 		
   200 
   201 		/**
   201         /**
   202         * CanDeleteServiceL
   202         * CanDeleteServiceL
   203         * @since 2.5
   203         * @since 2.5
   204         * 
   204         *
   205 		* Not supported
   205         * Not supported
   206 		*
   206         *
   207         */		
   207         */
   208 		TBool CanDeleteServiceL( const TMsvEntry& aService , TInt& aReasonResourceId ) const;
   208         TBool CanDeleteServiceL( const TMsvEntry& aService , TInt& aReasonResourceId ) const;
   209 		
   209 
   210 		/**
   210         /**
   211         * CanCancelL
   211         * CanCancelL
   212         * @since 2.5
   212         * @since 2.5
   213         * 
   213         *
   214 		* Not supported
   214         * Not supported
   215 		*
   215         *
   216         */		
   216         */
   217 		TBool CanCancelL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   217         TBool CanCancelL( const TMsvEntry& aContext , TInt& aReasonResourceId ) const;
   218 
   218 
   219 	// Context-specific icons 
   219     // Context-specific icons
   220 
   220 
   221 		/**
   221         /**
   222         * ContextIcon
   222         * ContextIcon
   223         * @since 2.5
   223         * @since 2.5
   224         * 
   224         *
   225 		* @param aContext  Context entry to return the icons for. 
   225         * @param aContext  Context entry to return the icons for.
   226   		* @param aStateFlags  Flasgs indicating the user interface state of the entry. 
   226         * @param aStateFlags  Flasgs indicating the user interface state of the entry.
   227   		*   
   227         *
   228 		* @return Bitmap array for the given context.. 
   228         * @return Bitmap array for the given context..
   229 	    */	
   229         */
   230 		const CBitmapArray& ContextIcon( const TMsvEntry& aContext , TInt aStateFlags ) const;
   230         const CBitmapArray& ContextIcon( const TMsvEntry& aContext , TInt aStateFlags ) const;
   231 
   231 
   232 		/**
   232         /**
   233         * GetResourceFileName
   233         * GetResourceFileName
   234         * @since 2.5
   234         * @since 2.5
   235         * 
   235         *
   236 		* @param aFileName Filename buffer to be filled with the resource file path and name 
   236         * @param aFileName Filename buffer to be filled with the resource file path and name
   237 	    */	
   237         */
   238 		void GetResourceFileName( TFileName& aFileName ) const;	
   238         void GetResourceFileName( TFileName& aFileName ) const;
   239 		
   239 
   240 		/**
   240         /**
   241         * PopulateArraysL
   241         * PopulateArraysL
   242         * @since 2.5
   242         * @since 2.5
   243         * 
   243         *
   244 	    */			
   244         */
   245 		void PopulateArraysL();
   245         void PopulateArraysL();
   246 
   246 
   247 		
   247 
   248 		/**
   248         /**
   249         * StatusTextL
   249         * StatusTextL
   250         * @since 2.5
   250         * @since 2.5
   251         * 
   251         *
   252 		* Not supported
   252         * Not supported
   253 		*
   253         *
   254 		*/			
   254         */
   255 		HBufC* StatusTextL( const TMsvEntry& aContext ) const;
   255         HBufC* StatusTextL( const TMsvEntry& aContext ) const;
   256 
   256 
   257 
   257 
   258 	// MTM-specific functionality 
   258     // MTM-specific functionality
   259 
   259 
   260 		/**
   260         /**
   261         * OperationSupportedL
   261         * OperationSupportedL
   262         * @since 2.5
   262         * @since 2.5
   263         * 
   263         *
   264 		* Not supported
   264         * Not supported
   265 		*
   265         *
   266 		*/	
   266         */
   267 		TInt OperationSupportedL( 
   267         TInt OperationSupportedL(
   268             TInt aOperationId , 
   268             TInt aOperationId ,
   269             const TMsvEntry& aContext ) const;
   269             const TMsvEntry& aContext ) const;
   270 		
   270 
   271 		/**
   271         /**
   272         * QueryCapability
   272         * QueryCapability
   273         * @since 2.5
   273         * @since 2.5
   274         * 
   274         *
   275 		* @param aCapability UID of capability to be queried 
   275         * @param aCapability UID of capability to be queried
   276 		* @param aResponse Response value. The format of the response varies 
   276         * @param aResponse Response value. The format of the response varies
   277         * according to the capability
   277         * according to the capability
   278 		*
   278         *
   279 		* @return KErrNone if aCapability is a recognised value and a response is 
   279         * @return KErrNone if aCapability is a recognised value and a response is
   280         * returned KErrNotSupported if aCapability is not a recognised value 
   280         * returned KErrNotSupported if aCapability is not a recognised value
   281         */			
   281         */
   282 		TInt QueryCapability( TUid aCapability , TInt& aResponse ) const;
   282         TInt QueryCapability( TUid aCapability , TInt& aResponse ) const;
   283 
   283 
   284 
   284 
   285     protected:
   285     protected:
   286         /**
   286         /**
   287         * Creates skinned icons. Fallbacks are normal icons
   287         * Creates skinned icons. Fallbacks are normal icons
   289         * @param aNumZoomStates: amount of elements in vector
   289         * @param aNumZoomStates: amount of elements in vector
   290         *        ( bitmap & bitmapmask )
   290         *        ( bitmap & bitmapmask )
   291         */
   291         */
   292         void CreateSkinnedBitmapsL( TInt aNumZoomStates );
   292         void CreateSkinnedBitmapsL( TInt aNumZoomStates );
   293 
   293 
   294 	private:
   294     private:
   295         void ConstructL();
   295         void ConstructL();
   296 
   296 
   297 		CRightsObjectMtmUiData( CRegisteredMtmDll& aRegisteredDll );
   297         CRightsObjectMtmUiData( CRegisteredMtmDll& aRegisteredDll );
   298 
   298 
   299         void SetDescriptionL( const TMsvEntry& aContext ) const;
   299         void SetDescriptionL( const TMsvEntry& aContext ) const;
   300         
   300 
   301 
   301 
   302 	public:     // Data
   302     public:     // Data
   303     protected:  // Data
   303     protected:  // Data
   304     private:    // Data
   304     private:    // Data
   305 
   305 
   306         CRightsObjectMtmUiDataSessionObserver*  iObserver;
   306         CRightsObjectMtmUiDataSessionObserver*  iObserver;
   307         CMsvSession*                            iSession;
   307         CMsvSession*                            iSession;
   308         
   308 
   309     public:     // Friend classes
   309     public:     // Friend classes
   310     protected:  // Friend classes
   310     protected:  // Friend classes
   311     private:    // Friend classes
   311     private:    // Friend classes
   312 
   312 
   313 	};
   313     };
   314 
   314 
   315 #endif      // RIGHTSOBJECTMTMUIDATA_H
   315 #endif      // RIGHTSOBJECTMTMUIDATA_H
   316             
   316 
   317 // End of File
   317 // End of File