|
1 /* |
|
2 * Copyright (c) 2006-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 "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef WMDRMAGENTDATA_H |
|
21 #define WMDRMAGENTDATA_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <f32file.h> |
|
25 #include <caf.h> |
|
26 #include <agentinterface.h> |
|
27 #include <caf/attributeset.h> |
|
28 #include <caf/stringattributeset.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class CAsf; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 namespace ContentAccess |
|
36 { |
|
37 class TVirtualPathPtr; |
|
38 |
|
39 /** |
|
40 * WmDrm agent implementation of the CAgentData class used to read |
|
41 * |
|
42 * @lib ECOM plugin |
|
43 * @since S60 3.2 |
|
44 */ |
|
45 class CWmDrmAgentData : public CAgentData |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 static CWmDrmAgentData* NewL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); |
|
52 static CWmDrmAgentData* NewLC(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); |
|
53 static CWmDrmAgentData* NewL(RFile& aFile, const TDesC& aUniqueId); |
|
54 static CWmDrmAgentData* NewLC(RFile& aFile, const TDesC& aUniqueId); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 ~CWmDrmAgentData(); |
|
60 |
|
61 public: // From CAgentData |
|
62 TInt Read(TDes8& aDes); |
|
63 TInt Read(TDes8& aDes,TInt aLength); |
|
64 void Read(TDes8& aDes, TRequestStatus& aStatus); |
|
65 void Read(TDes8& aDes, TInt aLength, TRequestStatus& aStatus); |
|
66 void DataSizeL(TInt& aSize); |
|
67 TInt Seek(TSeek aMode,TInt& aPos); |
|
68 TInt SetProperty(TAgentProperty aProperty, TInt aValue); |
|
69 TInt EvaluateIntent(TIntent aIntent); |
|
70 TInt ExecuteIntent(TIntent aIntent); |
|
71 TInt GetAttribute(TInt aAttribute, TInt& aValue); |
|
72 TInt GetAttributeSet(RAttributeSet& aAttributeSet); |
|
73 TInt GetStringAttribute(TInt aAttribute, TDes& aValue); |
|
74 TInt GetStringAttributeSet(RStringAttributeSet& aStringAttributeSet); |
|
75 TInt Read(TInt aPos, TDes8& aDes, TInt aLength, TRequestStatus& aStatus); |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CWmDrmAgentData(); |
|
83 |
|
84 /** |
|
85 * By default Symbian 2nd phase constructor is private. |
|
86 */ |
|
87 void ConstructL(const TVirtualPathPtr& aVirtualPath, TContentShareMode aShareMode); |
|
88 void ConstructL(RFile& aFile, const TDesC& aUniqueId); |
|
89 |
|
90 protected: // Data |
|
91 |
|
92 /** Handle to the filesystem */ |
|
93 RFs iFs; |
|
94 |
|
95 /** RFile object */ |
|
96 RFile iFile; |
|
97 TVirtualPathPtr iVirtualPath; |
|
98 |
|
99 /** The ASF file */ |
|
100 CAsf* iAsf; |
|
101 }; |
|
102 |
|
103 } // namespace ContentAccess |
|
104 |
|
105 #endif // WMDRMAGENTDATA_H |