epoc32/include/caf/content.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/caf/content.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/caf/content.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 -* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7  * All rights reserved.
     1.8  * This component and the accompanying materials are made available
     1.9  * under the terms of the License "Eclipse Public License v1.0"
    1.10 @@ -19,7 +19,7 @@
    1.11  /** 
    1.12  @file
    1.13  
    1.14 -@publishedPartner
    1.15 +@publishedAll
    1.16  @released
    1.17  */
    1.18  
    1.19 @@ -70,9 +70,6 @@
    1.20     
    1.21    During construction CContent loads the correct CAF Agent plugin to handle 
    1.22    the file specified by the URI.
    1.23 -  
    1.24 -  @publishedPartner
    1.25 -  @released
    1.26   */
    1.27  	class CContent :  public CBase
    1.28  		{
    1.29 @@ -168,6 +165,31 @@
    1.30  		*/
    1.31  		IMPORT_C static CContent* NewL(RFile& aFile);
    1.32  
    1.33 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT		
    1.34 +		/** 
    1.35 +		 Constructs a new CContent object.
    1.36 +
    1.37 +  		 @param aHeaderData	Header data of WMDRM file/stream content. 
    1.38 +		 @return 			CContent object.
    1.39 +		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  
    1.40 +		 					or one of the system-wide error codes for any other errors.
    1.41 +		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    1.42 +	 	 */
    1.43 +		IMPORT_C static CContent* NewL(const TDesC8& aHeaderData);
    1.44 +		
    1.45 +		/** 
    1.46 +		 Constructs a new CContent object.
    1.47 +  		 
    1.48 +  		 @param aHeaderData	Header data of WMDRM file/stream content.  
    1.49 +		 @return 			CContent object.
    1.50 +		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  or one of the 
    1.51 +							system-wide error codes for any other errors.
    1.52 +		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
    1.53 +		 */
    1.54 +		IMPORT_C static CContent* NewLC(const TDesC8& aHeaderData);
    1.55 +		
    1.56 +#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
    1.57 +
    1.58  		/** destructor */
    1.59  		virtual ~CContent();
    1.60  
    1.61 @@ -926,10 +948,14 @@
    1.62  
    1.63  		/** Find out which agent is handling this file
    1.64  		@return The agent handling the File
    1.65 -		@capability DRM Access to DRM agents is not permitted for processes without DRM capability
    1.66  		*/
    1.67  		IMPORT_C const TAgent& Agent() const;
    1.68  		
    1.69 +		/** Indicates the mode in which the content is shared.
    1.70 +			@return The content sharing mode
    1.71 +		*/
    1.72 +		inline TContentShareMode ShareMode() const;
    1.73 +		
    1.74  #ifndef REMOVE_CAF1
    1.75  		/** Create a CData object for reading the content 
    1.76  
    1.77 @@ -966,6 +992,34 @@
    1.78  		void ConstructL(RFile& aFile); 
    1.79  		void ConstructL(const TDesC& aURI, TContentShareMode aShareMode); 
    1.80  		
    1.81 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
    1.82 +		void ConstructL(const TDesC8& aHeaderData);
    1.83 +
    1.84 +		/**
    1.85 +		Create a CData object for reading WMDRM content.
    1.86 +		
    1.87 +		@param	aIntent		The intended use of the content.
    1.88 +		@param	aHeaderData	Header data of WMDRM file/stream content.
    1.89 +		@return				CData object.
    1.90 +		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
    1.91 +		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
    1.92 +		*/
    1.93 +		
    1.94 +		CData* OpenContentL(TIntent aIntent, const TDesC8& aHeaderData);
    1.95 +		
    1.96 +		/**
    1.97 +		Create a CData object for reading WMDRM content.
    1.98 +		
    1.99 +		@param	aIntent		The intended use of the content.
   1.100 +		@param	aHeaderData	Header data of WMDRM file/stream content.
   1.101 +		@return				CData object.
   1.102 +		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
   1.103 +		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
   1.104 +		*/
   1.105 +		CData* OpenContentLC(TIntent aIntent, const TDesC8& aHeaderData);
   1.106 +		
   1.107 +#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   1.108 +
   1.109  	private:	
   1.110  	
   1.111  		/** CAgentFactory object is effectively the	ECOM session handle */
   1.112 @@ -992,8 +1046,20 @@
   1.113  		TContentShareMode iShareMode;
   1.114  
   1.115  		/** Reference to the file handle if the content was opened with a file handle */
   1.116 +#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   1.117 +		RFile64 iFile;
   1.118 +#else
   1.119  		RFile iFile;
   1.120 +#endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
   1.121 +
   1.122 +#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   1.123 +		HBufC8* iHeaderData;
   1.124 +#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
   1.125 +
   1.126  		};
   1.127  
   1.128 +#include <caf/content.inl>
   1.129  	} // namespace ContentAccess
   1.130 -#endif /* __CONTENT_H__ */
   1.131 +
   1.132 +#endif // __CONTENT_H__ 
   1.133 +