|
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 "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: Stub implementation of CAgentRightsManager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <caf.h> |
|
22 #include <utf.h> |
|
23 #include "wmdrmagentrightsmanager.h" |
|
24 #include "rightsinfo.h" |
|
25 #include "asf.h" |
|
26 |
|
27 #include "logfn.h" |
|
28 |
|
29 using namespace ContentAccess; |
|
30 // ============================ LOCAL FUNCTIONS ================================ |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // PointerArrayResetDestroyAndClose |
|
34 // Template method used to push RPointerArrays to the cleanup stack. Takes |
|
35 // care of deleting all pointers in the array. |
|
36 // ----------------------------------------------------------------------------- |
|
37 // |
|
38 template<class S> |
|
39 void PointerArrayResetDestroyAndClose(TAny* aPtr) |
|
40 { |
|
41 (reinterpret_cast<RPointerArray<S>*>(aPtr))->ResetAndDestroy(); |
|
42 (reinterpret_cast<RPointerArray<S>*>(aPtr))->Close(); |
|
43 } |
|
44 |
|
45 // ============================ MEMBER FUNCTIONS =============================== |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CWmDrmAgentRightsManager::CWmDrmAgentRightsManager |
|
49 // C++ default constructor can NOT contain any code, that |
|
50 // might leave. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 CWmDrmAgentRightsManager::CWmDrmAgentRightsManager() |
|
54 { |
|
55 LOGFN( "CWmDrmAgentRightsManager::CWmDrmAgentRightsManager" ); |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CWmDrmAgentRightsManager::ConstructL |
|
60 // Symbian 2nd phase constructor can leave. |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CWmDrmAgentRightsManager::ConstructL() |
|
64 { |
|
65 LOGFN( "CWmDrmAgentRightsManager::ConstructL" ); |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // CWmDrmAgentRightsManager::NewL |
|
70 // Two-phased constructor. |
|
71 // ----------------------------------------------------------------------------- |
|
72 // |
|
73 CWmDrmAgentRightsManager* CWmDrmAgentRightsManager::NewL() |
|
74 { |
|
75 LOGFN( "CWmDrmAgentRightsManager::NewL" ); |
|
76 CWmDrmAgentRightsManager* self = new( ELeave ) CWmDrmAgentRightsManager; |
|
77 CleanupStack::PushL( self ); |
|
78 self->ConstructL(); |
|
79 CleanupStack::Pop(); |
|
80 return self; |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CWmDrmAgentRightsManager::~CWmDrmAgentRightsManager |
|
85 // Destructor |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 |
|
89 CWmDrmAgentRightsManager::~CWmDrmAgentRightsManager() |
|
90 { |
|
91 LOGFN( "CWmDrmAgentRightsManager::~CWmDrmAgentRightsManager" ); |
|
92 } |
|
93 |
|
94 // ----------------------------------------------------------------------------- |
|
95 // CWmDrmAgentRightsManager::ListAllRightsL |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 void CWmDrmAgentRightsManager::ListAllRightsL( |
|
99 RStreamablePtrArray<CRightsInfo>& /*aArray*/) const |
|
100 { |
|
101 LOGFN( "CWmDrmAgentRightsManager::ListAllRightsL" ); |
|
102 User::Leave(KErrNotSupported); |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // CWmDrmAgentRightsManager::ListRightsL |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 void CWmDrmAgentRightsManager::ListRightsL( |
|
110 RStreamablePtrArray<CRightsInfo>& /*aArray*/, |
|
111 const TDesC& /*aUri*/) const |
|
112 { |
|
113 LOGFN( "CWmDrmAgentRightsManager::ListRightsL" ); |
|
114 User::Leave(KErrCANotSupported); |
|
115 } |
|
116 |
|
117 // ----------------------------------------------------------------------------- |
|
118 // CWmDrmAgentRightsManager::ListRightsL |
|
119 // ----------------------------------------------------------------------------- |
|
120 // |
|
121 void CWmDrmAgentRightsManager::ListRightsL( |
|
122 RStreamablePtrArray<CRightsInfo>& aArray, |
|
123 TVirtualPathPtr& aVirtualPath) const |
|
124 { |
|
125 LOGFN( "CWmDrmAgentRightsManager::ListRightsL (2)" ); |
|
126 ListRightsL( aArray, aVirtualPath.URI() ); |
|
127 } |
|
128 |
|
129 // ----------------------------------------------------------------------------- |
|
130 // CWmDrmAgentRightsManager::ListContentL |
|
131 // ----------------------------------------------------------------------------- |
|
132 // |
|
133 void CWmDrmAgentRightsManager::ListContentL( |
|
134 RStreamablePtrArray<CVirtualPath>& /*aArray*/, |
|
135 CRightsInfo& /*aRightsInfo*/) const |
|
136 { |
|
137 LOGFN( "CWmDrmAgentRightsManager::ListContentL" ); |
|
138 User::Leave(KErrCANotSupported); |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // CWmDrmAgentRightsManager::GetRightsDataL |
|
143 // ----------------------------------------------------------------------------- |
|
144 // |
|
145 MAgentRightsBase* CWmDrmAgentRightsManager::GetRightsDataL( |
|
146 const CRightsInfo& /*aRightsInfo*/) const |
|
147 { |
|
148 LOGFN( "CWmDrmAgentRightsManager::GetRightsDataL" ); |
|
149 User::Leave(KErrCANotSupported); |
|
150 return NULL; |
|
151 } |
|
152 |
|
153 // ----------------------------------------------------------------------------- |
|
154 // CWmDrmAgentRightsManager::DeleteRightsObject |
|
155 // ----------------------------------------------------------------------------- |
|
156 // |
|
157 TInt CWmDrmAgentRightsManager::DeleteRightsObject( |
|
158 const CRightsInfo& /*aRightsInfo*/) |
|
159 { |
|
160 LOGFN( "CWmDrmAgentRightsManager::DeleteRightsObject" ); |
|
161 return KErrCANotSupported; |
|
162 } |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CWmDrmAgentRightsManager::DeleteAllRightsObjects |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 TInt CWmDrmAgentRightsManager::DeleteAllRightsObjects( |
|
169 const TVirtualPathPtr& /*aVirtualPath*/) |
|
170 { |
|
171 LOGFN( "CWmDrmAgentRightsManager::DeleteAllRightsObjects" ); |
|
172 return KErrCANotSupported; |
|
173 } |
|
174 |
|
175 // ----------------------------------------------------------------------------- |
|
176 // CWmDrmAgentRightsManager::SetProperty |
|
177 // ----------------------------------------------------------------------------- |
|
178 // |
|
179 TInt CWmDrmAgentRightsManager::SetProperty( |
|
180 TAgentProperty /*aProperty*/, |
|
181 TInt /*aValue*/) |
|
182 { |
|
183 LOGFN( "CWmDrmAgentRightsManager::SetProperty" ); |
|
184 return KErrCANotSupported; |
|
185 } |