1 /* |
1 /* |
2 * Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of the License "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
166 other system-wide error codes for any other errors. |
166 other system-wide error codes for any other errors. |
167 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted |
167 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted |
168 */ |
168 */ |
169 IMPORT_C static CContent* NewL(RFile& aFile); |
169 IMPORT_C static CContent* NewL(RFile& aFile); |
170 |
170 |
|
171 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
172 /** |
|
173 Constructs a new CContent object. |
|
174 |
|
175 @param aHeaderData Header data of WMDRM file/stream content. |
|
176 @return CContent object. |
|
177 @leave KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h |
|
178 or one of the system-wide error codes for any other errors. |
|
179 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted |
|
180 */ |
|
181 IMPORT_C static CContent* NewL(const TDesC8& aHeaderData); |
|
182 |
|
183 /** |
|
184 Constructs a new CContent object. |
|
185 |
|
186 @param aHeaderData Header data of WMDRM file/stream content. |
|
187 @return CContent object. |
|
188 @leave KErrMissingHeaderData if the header data is NULL or one of the CAF error codes defined in caferr.h or one of the |
|
189 system-wide error codes for any other errors. |
|
190 @capability DRM Access to DRM protected content is not permitted for processes without DRM capability. Access to unprotected content is unrestricted |
|
191 */ |
|
192 IMPORT_C static CContent* NewLC(const TDesC8& aHeaderData); |
|
193 |
|
194 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
195 |
171 /** destructor */ |
196 /** destructor */ |
172 virtual ~CContent(); |
197 virtual ~CContent(); |
173 |
198 |
174 /** Open a Container object within the file. |
199 /** Open a Container object within the file. |
175 |
200 |
963 private: |
988 private: |
964 CContent(); |
989 CContent(); |
965 void ConstructL(RFile& aFile); |
990 void ConstructL(RFile& aFile); |
966 void ConstructL(const TDesC& aURI, TContentShareMode aShareMode); |
991 void ConstructL(const TDesC& aURI, TContentShareMode aShareMode); |
967 |
992 |
|
993 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
994 void ConstructL(const TDesC8& aHeaderData); |
|
995 |
|
996 /** |
|
997 Create a CData object for reading WMDRM content. |
|
998 |
|
999 @param aIntent The intended use of the content. |
|
1000 @param aHeaderData Header data of WMDRM file/stream content. |
|
1001 @return CData object. |
|
1002 @leave One of the CAF error codes defined in caferr.h or one of the system-wide error codes for any errors. |
|
1003 @capability DRM Access to DRM agents is not permitted for processes without DRM capability. |
|
1004 */ |
|
1005 |
|
1006 CData* OpenContentL(TIntent aIntent, const TDesC8& aHeaderData); |
|
1007 |
|
1008 /** |
|
1009 Create a CData object for reading WMDRM content. |
|
1010 |
|
1011 @param aIntent The intended use of the content. |
|
1012 @param aHeaderData Header data of WMDRM file/stream content. |
|
1013 @return CData object. |
|
1014 @leave One of the CAF error codes defined in caferr.h or one of the system-wide error codes for any errors. |
|
1015 @capability DRM Access to DRM agents is not permitted for processes without DRM capability. |
|
1016 */ |
|
1017 CData* OpenContentLC(TIntent aIntent, const TDesC8& aHeaderData); |
|
1018 |
|
1019 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
1020 |
968 private: |
1021 private: |
969 |
1022 |
970 /** CAgentFactory object is effectively the ECOM session handle */ |
1023 /** CAgentFactory object is effectively the ECOM session handle */ |
971 CAgentFactory* iAgentFactory; |
1024 CAgentFactory* iAgentFactory; |
972 |
1025 |
994 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
1047 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
995 RFile64 iFile; |
1048 RFile64 iFile; |
996 #else |
1049 #else |
997 RFile iFile; |
1050 RFile iFile; |
998 #endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
1051 #endif //SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
1052 |
|
1053 #ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
1054 HBufC8* iHeaderData; |
|
1055 #endif //#ifdef SYMBIAN_ENABLE_SDP_WMDRM_SUPPORT |
|
1056 |
999 }; |
1057 }; |
1000 |
1058 |
1001 } // namespace ContentAccess |
1059 } // namespace ContentAccess |
1002 #endif /* __CONTENT_H__ */ |
1060 #endif /* __CONTENT_H__ */ |