--- a/contentmgmt/contentaccessfwfordrm/inc/data.h Fri Oct 02 13:15:59 2009 +0300
+++ b/contentmgmt/contentaccessfwfordrm/inc/data.h Mon Oct 12 10:17:04 2009 +0300
@@ -279,7 +279,77 @@
@released
*/
static CData* NewLC(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId, TIntent aIntent);
+
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+ /**
+ Creates a new CData object.
+ @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 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 CData* NewL(const TDesC8& aHeaderData);
+
+ /**
+ Creates a new CData object.
+ @param aHeaderData Header data of WMDRM file/stream content.
+ @param aIntent The intended use of the content.
+ @return CData object.
+ @leave One of the CAF error codes defined in caferr.h or one of the
+ system-wide error 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 CData* NewL(const TDesC8& aHeaderData, TIntent aIntent);
+
+ /**
+ Creates a new CData object.
+ @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 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 CData* NewLC(const TDesC8& aHeaderData);
+
+ /**
+ Creates a new CData object.
+ @param aHeaderData Header data of WMDRM file/stream content.
+ @param aIntent The intended use of the content.
+ @return CData object.
+ @leave One of the CAF error codes defined in caferr.h or one of the
+ system-wide error 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 CData* NewLC(const TDesC8& aHeaderData, TIntent aIntent);
+
+ /**
+ Creates a new CData object.
+ @param aAgentUid UID of an agent which supports this content.
+ @param aHeaderData Header data of WMDRM file/stream content.
+ @param aIntent The intended use of the content.
+ @return CData object.
+ @leave One of the CAF error codes defined in caferr.h or one of the
+ system-wide error 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.
+ @internalComponent
+ @released
+ */
+
+ static CData* NewLC(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
+
+#endif //SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
/** destructor */
virtual ~CData();
@@ -747,6 +817,37 @@
IMPORT_C TBool GetMimeTypeL(TDes8& aMimeType) const;
#endif // REMOVE_CAF1
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+ /**
+ Decrypts the encrypted input data packet.
+
+ @param aEncryptedInputDataPacket Buffer descriptor containing the encrypted data packet supplied by client application.
+ @param aDecryptedOutputDataPacket Buffer descriptor supplied by the client application into which the decrypted data is written.
+ The length of this descriptor must be equal to or greater than the input packet.
+ @return KErrNone if successful.KErrInsufficientDataPacketLength if a part of input packet is provided,
+ otherwise one of the CAF error codes defined in \c caferr.h or
+ one of the other system-wide error codes.
+ @capability DRM Access to DRM protected content is not permitted for processes without DRM capability.
+ Access to unprotected content is unrestricted.
+ */
+
+ IMPORT_C TInt Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket) const;
+
+ /**
+ Decrypts the encrypted input data packet asynchronously.
+ @param aEncryptedInputDataPacket Buffer descriptor containing the encrypted data packet supplied by client application.
+ @param aDecryptedOutputDataPacket Buffer descriptor supplied by the client application into which the decrypted data is written.
+ The length of this descriptor must be equal to or greater than the input packet.
+ @param aStatus Asynchronous request status. On completion this will contain one of the following error codes:
+ KErrNone if the data packet was successfully decrypted.KErrInsufficientDataPacketLength if a
+ part of input packet is provided, otherwise one of the CAF error codes defined in \c caferr.h or
+ one of the other system-wide error codes.
+ @capability DRM Access to DRM protected content is not permitted for processes without DRM capability.
+ Access to unprotected content is unrestricted.
+ */
+ IMPORT_C void Read(const TDesC8& aEncryptedInputDataPacket, TDes8& aDecryptedOutputDataPacket, TRequestStatus& aStatus) const;
+
+#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
private:
CData();
@@ -760,6 +861,15 @@
void ConstructL(TUid aAgentUid, RFile& aFile, const TDesC& aUniqueId);
void ConstructL(TUid aAgentUid, const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode);
+#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
+ void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData, TIntent aIntent);
+ void ConstructL(const TDesC8& aHeaderData);
+ void ConstructL(const TDesC8& aHeaderData, TIntent aIntent);
+ void ConstructL(TUid aAgentUid, const TDesC8& aHeaderData);
+
+#endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT
+
#ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
/*
* This is the obselete 32bit Read and replaced by its 64bit counterpart