contentmgmt/contentaccessfwfordrm/inc/data.h
branchRCL_3
changeset 61 641f389e9157
parent 45 030c4fbc13d7
child 62 a71299154b21
equal deleted inserted replaced
60:f18401adf8e1 61:641f389e9157
   271 								any other errors.
   271 								any other errors.
   272 
   272 
   273 		 */
   273 		 */
   274 		static CData* NewLC(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   274 		static CData* NewLC(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   275 
   275 
       
   276 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   277 		
       
   278 		/** 
       
   279 		 Creates a new CData object. 
       
   280 		 @param aHeaderData				Header data of WMDRM file/stream content. 
       
   281 		 @return 						CData object.
       
   282 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   283 										system-wide error for any other errors.
       
   284 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   285 										Access to unprotected content is unrestricted.
       
   286 		*/
       
   287 			
       
   288 		IMPORT_C static CData* NewL(const TDesC8& aHeaderData);
       
   289 		
       
   290 		/** 
       
   291 		 Creates a new CData object. 
       
   292 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   293 		 @param aIntent					The intended use of the content.
       
   294 		 @return 						CData object.
       
   295 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   296 										system-wide error for any other errors.
       
   297 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   298 										Access to unprotected content is unrestricted.
       
   299 		*/		
       
   300 		
       
   301 		IMPORT_C static CData* NewL(const TDesC8& aHeaderData, TIntent aIntent);
       
   302 		
       
   303 		/** 
       
   304 		 Creates a new CData object. 
       
   305 		 @param aHeaderData				Header data of WMDRM file/stream content. 
       
   306 		 @return 						CData object.
       
   307 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   308 										system-wide error for any other errors.
       
   309 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   310 										Access to unprotected content is unrestricted.
       
   311 		*/
       
   312 		
       
   313 		IMPORT_C static CData* NewLC(const TDesC8& aHeaderData);
       
   314 		
       
   315 		/** 
       
   316 		 Creates a new CData object. 
       
   317 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   318 		 @param aIntent					The intended use of the content. 
       
   319 		 @return 						CData object.
       
   320 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   321 										system-wide error for any other errors.
       
   322 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   323 										Access to unprotected content is unrestricted.
       
   324 		*/
       
   325 		
       
   326 		IMPORT_C static CData* NewLC(const TDesC8& aHeaderData, TIntent aIntent);
       
   327 		
       
   328 		/** 
       
   329 		 Creates a new CData object.
       
   330 		 @param	aAgentUid				UID of an agent which supports this content. 
       
   331 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   332 		 @param aIntent					The intended use of the content.
       
   333 		 @return 						CData object.
       
   334 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   335 										system-wide error for any other errors.
       
   336 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   337 										Access to unprotected content is unrestricted.
       
   338 		 
       
   339 		*/
       
   340 		
       
   341 		static CData* NewLC(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
       
   342 		
       
   343 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   276 
   344 
   277 		/** destructor */
   345 		/** destructor */
   278 		virtual ~CData();
   346 		virtual ~CData();
   279 		
   347 		
   280 		/** 
   348 		/** 
   739 		@deprecated 
   807 		@deprecated 
   740 		*/
   808 		*/
   741 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   809 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   742 #endif	// REMOVE_CAF1
   810 #endif	// REMOVE_CAF1
   743 
   811 
       
   812 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   813 		/**
       
   814 		Decrypts the encrypted input data packet.
       
   815 		
       
   816 		@param aEncryptedInputDataPacket	Buffer descriptor containing the encrypted data packet supplied by client application. 
       
   817 		@param aDecryptedOutputDataPacket	Buffer descriptor supplied by the client application into which the decrypted data is written.
       
   818 											The length of this descriptor must be equal to or greater than the input packet.
       
   819 		@return								KErrNone if successful.KErrInsufficientDataPacketLength if a part of input packet is provided,
       
   820 											otherwise one of the CAF error codes defined in \c caferr.h  or 
       
   821 		 									one of the other system-wide error codes.
       
   822 		@capability 						DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   823 											Access to unprotected content is unrestricted.
       
   824 		*/
       
   825 
       
   826 		IMPORT_C TInt Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket) const;
       
   827 		
       
   828 		/**
       
   829 		Decrypts the encrypted input data packet asynchronously.
       
   830 		@param aEncryptedInputDataPacket	Buffer descriptor containing the encrypted data packet supplied by client application. 
       
   831 		@param aDecryptedOutputDataPacket	Buffer descriptor supplied by the client application into which the decrypted data is written.
       
   832 											The length of this descriptor must be equal to or greater than the input packet.
       
   833 		@param aStatus						Asynchronous request status. On completion this will contain one of the following error codes:
       
   834 											KErrNone if the data packet was successfully decrypted.KErrInsufficientDataPacketLength if a 
       
   835 											part of input packet is provided, otherwise one of the CAF error codes defined in \c caferr.h or 
       
   836 		 									one of the other system-wide error codes.
       
   837 		@capability 						DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   838 										    Access to unprotected content is unrestricted. 
       
   839 		*/
       
   840 		IMPORT_C void Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket, TRequestStatus& aStatus) const;
       
   841 
       
   842 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   744 	
   843 	
   745 	private:
   844 	private:
   746 		CData();
   845 		CData();
   747 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   846 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   748 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   847 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   752 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   851 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   753 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   852 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   754 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   853 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   755 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   854 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   756 
   855 
       
   856 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   857 		
       
   858 		void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
       
   859 		void ConstructL(const TDesC8& aHeaderData);
       
   860 		void ConstructL(const TDesC8& aHeaderData, TIntent aIntent);
       
   861 		void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData);
       
   862 		
       
   863 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   864 
   757 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   865 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   758 		/*
   866 		/*
   759 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   867 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   760 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   868 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   761 		 * However, this function still exits at its original ordinal to avoid BC break. 
   869 		 * However, this function still exits at its original ordinal to avoid BC break.