diff -r afc583cfa176 -r da2ae96f639b contentmgmt/contentaccessfwfordrm/inc/content.h --- a/contentmgmt/contentaccessfwfordrm/inc/content.h Fri Oct 02 13:15:59 2009 +0300 +++ b/contentmgmt/contentaccessfwfordrm/inc/content.h Mon Oct 12 10:17:04 2009 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2008 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" @@ -168,6 +168,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(); @@ -965,6 +990,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 */ @@ -996,6 +1049,11 @@ #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 + }; } // namespace ContentAccess