epoc32/include/caf/content.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
--- a/epoc32/include/caf/content.h	Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/caf/content.h	Wed Mar 31 12:33:34 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -19,7 +19,7 @@
 /** 
 @file
 
-@publishedPartner
+@publishedAll
 @released
 */
 
@@ -70,9 +70,6 @@
    
   During construction CContent loads the correct CAF Agent plugin to handle 
   the file specified by the URI.
-  
-  @publishedPartner
-  @released
  */
 	class CContent :  public CBase
 		{
@@ -168,6 +165,31 @@
 		*/
 		IMPORT_C static CContent* NewL(RFile& aFile);
 
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT		
+		/** 
+		 Constructs a new CContent object.
+
+  		 @param aHeaderData	Header data of WMDRM file/stream content. 
+		 @return 			CContent object.
+		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  
+		 					or one of the system-wide error codes for any other errors.
+		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
+	 	 */
+		IMPORT_C static CContent* NewL(const TDesC8& aHeaderData);
+		
+		/** 
+		 Constructs a new CContent object.
+  		 
+  		 @param aHeaderData	Header data of WMDRM file/stream content.  
+		 @return 			CContent object.
+		 @leave 			KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h  or one of the 
+							system-wide error codes for any other errors.
+		 @capability DRM 	Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted 
+		 */
+		IMPORT_C static CContent* NewLC(const TDesC8& aHeaderData);
+		
+#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
 		/** destructor */
 		virtual ~CContent();
 
@@ -926,10 +948,14 @@
 
 		/** Find out which agent is handling this file
 		@return The agent handling the File
-		@capability DRM Access to DRM agents is not permitted for processes without DRM capability
 		*/
 		IMPORT_C const TAgent& Agent() const;
 		
+		/** Indicates the mode in which the content is shared.
+			@return The content sharing mode
+		*/
+		inline TContentShareMode ShareMode() const;
+		
 #ifndef REMOVE_CAF1
 		/** Create a CData object for reading the content 
 
@@ -966,6 +992,34 @@
 		void ConstructL(RFile& aFile); 
 		void ConstructL(const TDesC& aURI, TContentShareMode aShareMode); 
 		
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+		void ConstructL(const TDesC8& aHeaderData);
+
+		/**
+		Create a CData object for reading WMDRM content.
+		
+		@param	aIntent		The intended use of the content.
+		@param	aHeaderData	Header data of WMDRM file/stream content.
+		@return				CData object.
+		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
+		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
+		*/
+		
+		CData* OpenContentL(TIntent aIntent, const TDesC8& aHeaderData);
+		
+		/**
+		Create a CData object for reading WMDRM content.
+		
+		@param	aIntent		The intended use of the content.
+		@param	aHeaderData	Header data of WMDRM file/stream content.
+		@return				CData object.
+		@leave 				One of the CAF error codes defined in caferr.h  or one of the system-wide error codes for any errors.
+		@capability DRM 	Access to DRM agents is not permitted for processes without DRM capability.
+		*/
+		CData* OpenContentLC(TIntent aIntent, const TDesC8& aHeaderData);
+		
+#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
 	private:	
 	
 		/** CAgentFactory object is effectively the	ECOM session handle */
@@ -992,8 +1046,20 @@
 		TContentShareMode iShareMode;
 
 		/** Reference to the file handle if the content was opened with a file handle */
+#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+		RFile64 iFile;
+#else
 		RFile iFile;
+#endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
+
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+		HBufC8* iHeaderData;
+#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
 		};
 
+#include <caf/content.inl>
 	} // namespace ContentAccess
-#endif /* __CONTENT_H__ */
+
+#endif // __CONTENT_H__ 
+