contentmgmt/contentaccessfwfordrm/inc/data.h
changeset 15 da2ae96f639b
parent 8 35751d3474b7
child 33 cf642210ecb7
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
   277 
   277 
   278 		@internalComponent
   278 		@internalComponent
   279 		@released
   279 		@released
   280 		 */
   280 		 */
   281 		static CData* NewLC(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   281 		static CData* NewLC(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   282 		
   282 
       
   283 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   284 		
       
   285 		/** 
       
   286 		 Creates a new CData object. 
       
   287 		 @param aHeaderData				Header data of WMDRM file/stream content. 
       
   288 		 @return 						CData object.
       
   289 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   290 										system-wide error for any other errors.
       
   291 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   292 										Access to unprotected content is unrestricted.
       
   293 		*/
       
   294 			
       
   295 		IMPORT_C static CData* NewL(const TDesC8& aHeaderData);
       
   296 		
       
   297 		/** 
       
   298 		 Creates a new CData object. 
       
   299 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   300 		 @param aIntent					The intended use of the content.
       
   301 		 @return 						CData object.
       
   302 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   303 										system-wide error for any other errors.
       
   304 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   305 										Access to unprotected content is unrestricted.
       
   306 		*/		
       
   307 		
       
   308 		IMPORT_C static CData* NewL(const TDesC8& aHeaderData, TIntent aIntent);
       
   309 		
       
   310 		/** 
       
   311 		 Creates a new CData object. 
       
   312 		 @param aHeaderData				Header data of WMDRM file/stream content. 
       
   313 		 @return 						CData object.
       
   314 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   315 										system-wide error for any other errors.
       
   316 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   317 										Access to unprotected content is unrestricted.
       
   318 		*/
       
   319 		
       
   320 		IMPORT_C static CData* NewLC(const TDesC8& aHeaderData);
       
   321 		
       
   322 		/** 
       
   323 		 Creates a new CData object. 
       
   324 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   325 		 @param aIntent					The intended use of the content. 
       
   326 		 @return 						CData object.
       
   327 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   328 										system-wide error for any other errors.
       
   329 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   330 										Access to unprotected content is unrestricted.
       
   331 		*/
       
   332 		
       
   333 		IMPORT_C static CData* NewLC(const TDesC8& aHeaderData, TIntent aIntent);
       
   334 		
       
   335 		/** 
       
   336 		 Creates a new CData object.
       
   337 		 @param	aAgentUid				UID of an agent which supports this content. 
       
   338 		 @param aHeaderData				Header data of WMDRM file/stream content.
       
   339 		 @param aIntent					The intended use of the content.
       
   340 		 @return 						CData object.
       
   341 		 @leave							One of the CAF error codes defined in caferr.h or one of the 
       
   342 										system-wide error for any other errors.
       
   343 		 @capability 					DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   344 										Access to unprotected content is unrestricted.
       
   345 		 @internalComponent
       
   346 		 @released
       
   347 		*/
       
   348 		
       
   349 		static CData* NewLC(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
       
   350 		
       
   351 #endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   352 
   283 		/** destructor */
   353 		/** destructor */
   284 		virtual ~CData();
   354 		virtual ~CData();
   285 		
   355 		
   286 		/** 
   356 		/** 
   287 		 Reads from a content object up to the maximum length of the
   357 		 Reads from a content object up to the maximum length of the
   745 		@deprecated 
   815 		@deprecated 
   746 		*/
   816 		*/
   747 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   817 		IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
   748 #endif	// REMOVE_CAF1
   818 #endif	// REMOVE_CAF1
   749 
   819 
       
   820 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   821 		/**
       
   822 		Decrypts the encrypted input data packet.
       
   823 		
       
   824 		@param aEncryptedInputDataPacket	Buffer descriptor containing the encrypted data packet supplied by client application. 
       
   825 		@param aDecryptedOutputDataPacket	Buffer descriptor supplied by the client application into which the decrypted data is written.
       
   826 											The length of this descriptor must be equal to or greater than the input packet.
       
   827 		@return								KErrNone if successful.KErrInsufficientDataPacketLength if a part of input packet is provided,
       
   828 											otherwise one of the CAF error codes defined in \c caferr.h  or 
       
   829 		 									one of the other system-wide error codes.
       
   830 		@capability 						DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   831 											Access to unprotected content is unrestricted.
       
   832 		*/
       
   833 
       
   834 		IMPORT_C TInt Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket) const;
       
   835 		
       
   836 		/**
       
   837 		Decrypts the encrypted input data packet asynchronously.
       
   838 		@param aEncryptedInputDataPacket	Buffer descriptor containing the encrypted data packet supplied by client application. 
       
   839 		@param aDecryptedOutputDataPacket	Buffer descriptor supplied by the client application into which the decrypted data is written.
       
   840 											The length of this descriptor must be equal to or greater than the input packet.
       
   841 		@param aStatus						Asynchronous request status. On completion this will contain one of the following error codes:
       
   842 											KErrNone if the data packet was successfully decrypted.KErrInsufficientDataPacketLength if a 
       
   843 											part of input packet is provided, otherwise one of the CAF error codes defined in \c caferr.h or 
       
   844 		 									one of the other system-wide error codes.
       
   845 		@capability 						DRM Access to DRM protected content is not permitted for processes without DRM capability.
       
   846 										    Access to unprotected content is unrestricted. 
       
   847 		*/
       
   848 		IMPORT_C void Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket, TRequestStatus& aStatus) const;
       
   849 
       
   850 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   750 	
   851 	
   751 	private:
   852 	private:
   752 		CData();
   853 		CData();
   753 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   854 		void ConstructL(RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
   754 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   855 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TIntent aIntent, TContentShareMode aShareMode);
   758 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   859 		void ConstructL(RFile& aFile, const TDesC& aUniqueId);
   759 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   860 		void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
   760 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   861 		void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
   761 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   862 		void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); 
   762 
   863 
       
   864 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   865 		
       
   866 		void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
       
   867 		void ConstructL(const TDesC8& aHeaderData);
       
   868 		void ConstructL(const TDesC8& aHeaderData, TIntent aIntent);
       
   869 		void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData);
       
   870 		
       
   871 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
       
   872 
   763 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   873 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   764 		/*
   874 		/*
   765 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   875 		 * This is the obselete 32bit Read and replaced by its 64bit counterpart
   766 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   876 		 * TInt Read(TInt64 aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus) const
   767 		 * However, this function still exits at its original ordinal to avoid BC break. 
   877 		 * However, this function still exits at its original ordinal to avoid BC break.