contentmgmt/contentaccessfwfordrm/inc/data.h
branchRCL_3
changeset 96 a71299154b21
parent 95 641f389e9157
equal deleted inserted replaced
95:641f389e9157 96:a71299154b21
   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
       
   344 
   276 
   345 		/** destructor */
   277 		/** destructor */
   346 		virtual ~CData();
   278 		virtual ~CData();
   347 		
   279 		
   348 		/** 
   280 		/** 
   807 		@deprecated 
   739 		@deprecated 
   808 		*/
   740 		*/
   809 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   741 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   810 #endif	// REMOVE_CAF1
   742 #endif	// REMOVE_CAF1
   811 
   743 
   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
       
   843 	
   744 	
   844 	private:
   745 	private:
   845 		CData();
   746 		CData();
   846 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   747 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   847 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   748 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   851 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   752 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   852 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   753 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   853 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   754 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   854 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   755 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   855 
   756 
   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 
       
   865 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   757 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   866 		/*
   758 		/*
   867 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   759 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   868 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   760 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   869 		 * However, this function still exits at its original ordinal to avoid BC break. 
   761 		 * However, this function still exits at its original ordinal to avoid BC break.