|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 @released |
|
23 */ |
|
24 |
|
25 #ifndef __WMDRMCONTENTPARSER_H__ |
|
26 #define __WMDRMCONTENTPARSER_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <f32file.h> |
|
30 #include <caf/attributeset.h> |
|
31 #include <caf/stringattributeset.h> |
|
32 |
|
33 namespace ReferenceTestAgent |
|
34 { |
|
35 NONSHARABLE_CLASS(CWmdrmContentParser) : public CBase |
|
36 { |
|
37 public: |
|
38 IMPORT_C static CWmdrmContentParser* NewL(const TDesC8& aHeaderData); |
|
39 virtual ~CWmdrmContentParser(); |
|
40 |
|
41 IMPORT_C TInt GetAttribute(TInt aAttribute, TInt& aValue) const; |
|
42 IMPORT_C TInt GetStringAttribute(TInt aAttribute, TDes& aValue) const; |
|
43 IMPORT_C TInt GetAttributeSet(ContentAccess::RAttributeSet &aAttributeSet) const; |
|
44 IMPORT_C TInt GetStringAttributeSet(ContentAccess::RStringAttributeSet &aStringAttributeSet) const; |
|
45 |
|
46 private: |
|
47 CWmdrmContentParser(); |
|
48 void ConstructL(const TDesC8& aHeaderData); |
|
49 void CreateAttributeSetL(); |
|
50 void CreateStringAttributeSetL(); |
|
51 void SetAttributeL(TInt aAttribute, TInt aValue, TInt aErrorCode); |
|
52 void SetStringAttributeL(TInt aAttribute, const TDesC& aValue, TInt aErrorCode); |
|
53 |
|
54 private: |
|
55 HBufC8* iHeaderData; |
|
56 |
|
57 ContentAccess::RAttributeSet iAttributeSet; |
|
58 ContentAccess::RStringAttributeSet iStringAttributeSet; |
|
59 |
|
60 }; |
|
61 } |
|
62 #endif |