|
1 /* |
|
2 * Copyright (c) 2007 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: Implementation class of DRM Automated Usage API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CDRMAUTOMATEDUSAGEIMPL_H |
|
20 #define CDRMAUTOMATEDUSAGEIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <f32file.h> |
|
24 #include <caf/caftypes.h> |
|
25 #include <caf/data.h> |
|
26 #include <drmrightsclient.h> |
|
27 #include <drmautomatedusage.h> |
|
28 #include <drmautomatedusageobserver.h> |
|
29 |
|
30 #include "rdrmhelperclient.h" |
|
31 #include "drmqueue.h" |
|
32 |
|
33 //forward declarations |
|
34 class CDRMConstraint; |
|
35 |
|
36 namespace DRM |
|
37 { |
|
38 class CDrmAutomatedUsageData; |
|
39 class CDrmUtility; |
|
40 class CDrmUtilityUI; |
|
41 |
|
42 /** |
|
43 * Utility class for DRM related automated usage handling |
|
44 * |
|
45 * This is implementation class for interface DRM::DrmAutomatedUsage. |
|
46 * This is only used via class DRM::DrmAutomatedUsage |
|
47 * |
|
48 * @lib drmautomatedusageimpl.lib |
|
49 * @since S60 5.0 |
|
50 */ |
|
51 NONSHARABLE_CLASS( CDrmAutomatedUsageImpl ) : public CActive |
|
52 { |
|
53 |
|
54 public: |
|
55 |
|
56 /** Automated usage states */ |
|
57 enum TState |
|
58 { |
|
59 EInit, |
|
60 EHandeError, |
|
61 ESetAutomated, |
|
62 EReady, |
|
63 EComplete |
|
64 }; |
|
65 |
|
66 public: |
|
67 |
|
68 IMPORT_C static CDrmAutomatedUsageImpl* NewL( CCoeEnv* aCoeEnv, |
|
69 CDrmUtility* aDrmUtility ); |
|
70 |
|
71 IMPORT_C static CDrmAutomatedUsageImpl* NewLC( CCoeEnv* aCoeEnv, |
|
72 CDrmUtility* aDrmUtility ); |
|
73 |
|
74 virtual ~CDrmAutomatedUsageImpl(); |
|
75 |
|
76 /** |
|
77 * Checks if given content can be set as an automated content. |
|
78 * |
|
79 * @since S60 5.0 |
|
80 * |
|
81 * @param[in] aFile file handle to the file |
|
82 * @param[in] aIntent See ContentAccess::Intent |
|
83 * @param[in] AutomatedType Usage intention of the automated content |
|
84 * |
|
85 * @return ETrue if the content can be set as automated content |
|
86 * EFalse if the content can't be set as automated content |
|
87 * |
|
88 * @leave System wide or DRM specific error code. |
|
89 * |
|
90 * @see RFile |
|
91 * @see ContentAccess::TIntent |
|
92 * @see DRM::TDrmAutomatedType |
|
93 * |
|
94 * @see DRM::CDrmaAutomatedUsage |
|
95 */ |
|
96 IMPORT_C TBool CanSetAutomatedL( |
|
97 RFile& aFile, |
|
98 const ContentAccess::TIntent aIntent, |
|
99 const TDrmAutomatedType aAutomatedType ); |
|
100 |
|
101 |
|
102 /** |
|
103 * Checks if given content can be set as an automated content. |
|
104 * |
|
105 * @since S60 5.0 |
|
106 * |
|
107 * @param[in] aData CData object to the protected content |
|
108 * @param[in] aIntent See ContentAccess::Intent |
|
109 * @param[in] AutomatedType Usage intention of the automated content |
|
110 * |
|
111 * @return ETrue if the content can be set as automated content |
|
112 * EFalse if the content can't be set as automated content |
|
113 * |
|
114 * @leave System wide or DRM specific error code. |
|
115 * |
|
116 * @see ContentAccess::CData |
|
117 * @see ContentAccess::TIntent |
|
118 * @see DRM::TDrmAutomatedType |
|
119 * |
|
120 * @see DRM::CDrmaAutomatedUsage |
|
121 */ |
|
122 IMPORT_C TBool CanSetAutomatedL( |
|
123 const ContentAccess::CData& aData, |
|
124 const ContentAccess::TIntent aIntent, |
|
125 const TDrmAutomatedType aAutomatedType ); |
|
126 |
|
127 |
|
128 /** |
|
129 * Registers given content to be used as an automated content. |
|
130 * |
|
131 * @since S60 5.0 |
|
132 * |
|
133 * @param[in] aFile file handle to the file |
|
134 * @param[in] aIntent See ContentAccess::Intent |
|
135 * @param[in] aAutomatedType Usage intention of the automated content |
|
136 * @param[in] aServiceType default: EAUActive |
|
137 * |
|
138 * @leave System wide or DRM specific error code. |
|
139 * |
|
140 * @see RFile |
|
141 * @see ContentAccess::TIntent |
|
142 * @see DRM::TDrmAutomatedType |
|
143 * @see DRM::TDrmAutomatedServiceType |
|
144 * |
|
145 * @see DRM::CDrmaAutomatedUsage |
|
146 */ |
|
147 IMPORT_C void SetAutomatedL( |
|
148 RFile& aFile, |
|
149 const ContentAccess::TIntent aIntent, |
|
150 const TDrmAutomatedType aAutomatedType, |
|
151 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
152 |
|
153 |
|
154 /** |
|
155 * Registers given content to be used as an automated content. |
|
156 * |
|
157 * @since S60 5.0 |
|
158 * |
|
159 * @param[in] aFile file handle to the file |
|
160 * @param[in] aIntent See ContentAccess::Intent |
|
161 * @param[in] aAutomatedType Usage intention of the automated content |
|
162 * @param[in] aObserver Async callback observer |
|
163 * @param[in] aServiceType default: EAUActive |
|
164 * |
|
165 * @return Operation Identifier for the async request |
|
166 * required for cancelling an operation and |
|
167 * identifying which request has been completed |
|
168 * |
|
169 * @leave System wide or DRM specific error code. |
|
170 * |
|
171 * @see RFile |
|
172 * @see ContentAccess::TIntent |
|
173 * @see DRM::TDrmAutomatedType |
|
174 * @see DRM::MDrmAsyncObserver |
|
175 * @see DRM::TDrmAutomatedServiceType |
|
176 * |
|
177 * @see DRM::CDrmaAutomatedUsage |
|
178 */ |
|
179 IMPORT_C TInt SetAutomatedAsyncL( |
|
180 RFile& aFile, |
|
181 const ContentAccess::TIntent aIntent, |
|
182 const TDrmAutomatedType aAutomatedType, |
|
183 MDrmAsyncObserver& aObserver, |
|
184 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
185 |
|
186 |
|
187 /** |
|
188 * Registers given content to be used as an automated content. |
|
189 * |
|
190 * @since S60 5.0 |
|
191 * |
|
192 * @param[in] aData CData object to the protected content |
|
193 * @param[in] aIntent See ContentAccess::Intent |
|
194 * @param[in] aAutomatedType Usage intention of the automated content |
|
195 * @param[in] aServiceType default: EAUActive |
|
196 * |
|
197 * @leave System wide or DRM specific error code. |
|
198 * |
|
199 * @see ContentAccess::CData |
|
200 * @see ContentAccess::TIntent |
|
201 * @see DRM::TDrmAutomatedType |
|
202 * @see DRM::TDrmAutomatedServiceType |
|
203 * |
|
204 * @see DRM::CDrmaAutomatedUsage |
|
205 */ |
|
206 IMPORT_C void SetAutomatedL( |
|
207 const ContentAccess::CData& aData, |
|
208 const ContentAccess::TIntent aIntent, |
|
209 const TDrmAutomatedType aAutomatedType, |
|
210 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
211 |
|
212 |
|
213 /** |
|
214 * Registers given content to be used as an automated content. |
|
215 * |
|
216 * @since S60 5.0 |
|
217 * |
|
218 * @param[in] aData CData object to the protected content |
|
219 * @param[in] aIntent See ContentAccess::Intent |
|
220 * @param[in] aAutomatedType Usage intention of the automated content |
|
221 * @param[in] aObserver Async callback observer |
|
222 * @param[in] aServiceType default: EAUActive |
|
223 * |
|
224 * @return Operation Identifier for the async request |
|
225 * required for cancelling an operation and |
|
226 * identifying which request has been completed |
|
227 * |
|
228 * @leave System wide or DRM specific error code. |
|
229 * |
|
230 * @see ContentAccess::CData |
|
231 * @see ContentAccess::TIntent |
|
232 * @see DRM::TDrmAutomatedType |
|
233 * @see DRM::MDrmAsyncObserver |
|
234 * @see DRM::TDrmAutomatedServiceType |
|
235 * |
|
236 * @see DRM::CDrmaAutomatedUsage |
|
237 */ |
|
238 IMPORT_C TInt SetAutomatedAsyncL( |
|
239 const ContentAccess::CData& aData, |
|
240 const ContentAccess::TIntent aIntent, |
|
241 const TDrmAutomatedType aAutomatedType, |
|
242 MDrmAsyncObserver& aObserver, |
|
243 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
244 |
|
245 |
|
246 /** |
|
247 * Unregisters given content from being used as an automated content. |
|
248 * |
|
249 * @since S60 5.0 |
|
250 * |
|
251 * @param[in] aFile file handle to the file |
|
252 * @param[in] aIntent See ContentAccess::Intent |
|
253 * @param[in] aAutomatedType Usage intention of the automated content |
|
254 * @param[in] aServiceType default: EAUActive |
|
255 * |
|
256 * @leave System wide or DRM specific error code. |
|
257 * |
|
258 * @see RFile |
|
259 * @see ContentAccess::TIntent |
|
260 * @see DRM::TDrmAutomatedType |
|
261 * @see DRM::TDrmAutomatedServiceType |
|
262 * |
|
263 * @see DRM::CDrmaAutomatedUsage |
|
264 */ |
|
265 IMPORT_C void RemoveAutomatedL( |
|
266 RFile& aFile, |
|
267 const ContentAccess::TIntent aIntent, |
|
268 const TDrmAutomatedType aAutomatedType, |
|
269 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
270 |
|
271 |
|
272 /** |
|
273 * Unregisters given content from being used as an automated content. |
|
274 * |
|
275 * @since S60 5.0 |
|
276 * |
|
277 * @param[in] aFile file handle to the file |
|
278 * @param[in] aIntent See ContentAccess::Intent |
|
279 * @param[in] aAutomatedType Usage intention of the automated content |
|
280 * @param[in] aObserver Async callback observer |
|
281 * @param[in] aServiceType default: EAUActive |
|
282 * |
|
283 * @return Operation Identifier for the async request |
|
284 * required for cancelling an operation and |
|
285 * identifying which request has been completed |
|
286 * |
|
287 * @leave System wide or DRM specific error code. |
|
288 * |
|
289 * @see RFile |
|
290 * @see ContentAccess::TIntent |
|
291 * @see DRM::TDrmAutomatedType |
|
292 * @see DRM::MDrmAsyncObserver |
|
293 * @see DRM::TDrmAutomatedServiceType |
|
294 * |
|
295 * @see DRM::CDrmaAutomatedUsage |
|
296 */ |
|
297 IMPORT_C TInt RemoveAutomatedAsyncL( |
|
298 RFile& aFile, |
|
299 const ContentAccess::TIntent aIntent, |
|
300 const TDrmAutomatedType aAutomatedType, |
|
301 MDrmAsyncObserver& aObserver, |
|
302 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
303 |
|
304 |
|
305 /** |
|
306 * Unregisters given content from being used as an automated content. |
|
307 * |
|
308 * @since S60 5.0 |
|
309 * |
|
310 * @param[in] aData CData object to the protected content |
|
311 * @param[in] aIntent See ContentAccess::Intent |
|
312 * @param[in] aAutomatedType Usage intention of the automated content |
|
313 * @param[in] aServiceType default: EAUActive |
|
314 * |
|
315 * @leave System wide or DRM specific error code. |
|
316 * |
|
317 * @see ContentAccess::CData |
|
318 * @see ContentAccess::TIntent |
|
319 * @see DRM::TDrmAutomatedType |
|
320 * @see DRM::TDrmAutomatedServiceType |
|
321 * |
|
322 * @see DRM::CDrmaAutomatedUsage |
|
323 */ |
|
324 IMPORT_C void RemoveAutomatedL( |
|
325 const ContentAccess::CData& aData, |
|
326 const ContentAccess::TIntent aIntent, |
|
327 const TDrmAutomatedType aAutomatedType, |
|
328 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
329 |
|
330 |
|
331 /** |
|
332 * Unregisters given content from being used as an automated content. |
|
333 * |
|
334 * @since S60 5.0 |
|
335 * |
|
336 * @param[in] aData CData object to the protected content |
|
337 * @param[in] aIntent See ContentAccess::Intent |
|
338 * @param[in] aAutomatedType Usage intention of the automated content |
|
339 * @param[in] aObserver Async callback observer |
|
340 * @param[in] aServiceType default: EAUActive |
|
341 * |
|
342 * @return Operation Identifier for the async request |
|
343 * required for cancelling an operation and |
|
344 * identifying which request has been completed |
|
345 * |
|
346 * @leave System wide or DRM specific error code. |
|
347 * |
|
348 * @see ContentAccess::CData |
|
349 * @see ContentAccess::TIntent |
|
350 * @see DRM::TDrmAutomatedType |
|
351 * @see DRM::MDrmAsyncObserver |
|
352 * @see DRM::TDrmAutomatedServiceType |
|
353 * |
|
354 * @see DRM::CDrmaAutomatedUsage |
|
355 */ |
|
356 IMPORT_C TInt RemoveAutomatedAsyncL( |
|
357 const ContentAccess::CData& aData, |
|
358 const ContentAccess::TIntent aIntent, |
|
359 const TDrmAutomatedType aAutomatedType, |
|
360 MDrmAsyncObserver& aObserver, |
|
361 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
362 |
|
363 |
|
364 /** |
|
365 * Unregisters given content from being used as an automated content. |
|
366 * |
|
367 * @since S60 5.0 |
|
368 * |
|
369 * @param[in] aUniqueId unique content id |
|
370 * @param[in] aIntent See ContentAccess::Intent |
|
371 * @param[in] aAutomatedType Usage intention of the automated content |
|
372 * @param[in] aServiceType default: EAUActive |
|
373 * |
|
374 * @leave System wide or DRM specific error code. |
|
375 * |
|
376 * @see ContentAccess::TIntent |
|
377 * |
|
378 * @see ContentAccess::CData::GetStringAttribute() |
|
379 * @see ContentAccess::TStringAttribute |
|
380 * @see ContentAccess::TIntent |
|
381 * @see DRM::TDrmAutomatedType |
|
382 * @see DRM::TDrmAutomatedServiceType |
|
383 * |
|
384 * @see DRM::CDrmaAutomatedUsage |
|
385 */ |
|
386 IMPORT_C void RemoveAutomatedL( |
|
387 const TDesC& aUniqueId, |
|
388 const ContentAccess::TIntent aIntent, |
|
389 const TDrmAutomatedType aAutomatedType, |
|
390 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
391 |
|
392 |
|
393 /** |
|
394 * Unregisters given content from being used as an automated content. |
|
395 * |
|
396 * @since S60 5.0 |
|
397 * |
|
398 * @param[in] aUniqueId unique content id |
|
399 * @param[in] aIntent See ContentAccess::Intent |
|
400 * @param[in] aAutomatedType Usage intention of the automated content |
|
401 * @param[in] aObserver Async callback observer |
|
402 * @param[in] aServiceType default: EAUActive |
|
403 * |
|
404 * @return Operation Identifier for the async request |
|
405 * required for cancelling an operation and |
|
406 * identifying which request has been completed |
|
407 * |
|
408 * @leave System wide or DRM specific error code. |
|
409 * |
|
410 * @see ContentAccess::CData::GetStringAttribute() |
|
411 * @see ContentAccess::TStringAttribute |
|
412 * @see ContentAccess::TIntent |
|
413 * @see DRM::TDrmAutomatedType |
|
414 * @see DRM::MDrmAsyncObserver |
|
415 * @see DRM::TDrmAutomatedServiceType |
|
416 * |
|
417 * @see DRM::CDrmaAutomatedUsage |
|
418 */ |
|
419 IMPORT_C TInt RemoveAutomatedAsyncL( |
|
420 const TDesC& aUniqueId, |
|
421 const ContentAccess::TIntent aIntent, |
|
422 const TDrmAutomatedType aAutomatedType, |
|
423 MDrmAsyncObserver& aObserver, |
|
424 const TDrmAutomatedServiceType aServiceType = EAUActive ); |
|
425 |
|
426 |
|
427 /** |
|
428 * Registers client to listen events related to automated usage. If |
|
429 * the client doesn't do this, all the events are handled automatically |
|
430 * according to the S60 style. |
|
431 * |
|
432 * The observer registered with this function needs to be unregistered |
|
433 * before it is deleted. |
|
434 * |
|
435 * @since S60 5.0 |
|
436 * |
|
437 * @param[in] aObserver |
|
438 * |
|
439 * @leave System wide or DRM specific error code. |
|
440 * |
|
441 * @see DRM::MDrmAutomatedUsageObserver |
|
442 * |
|
443 * @see DRM::CDrmaAutomatedUsage |
|
444 */ |
|
445 IMPORT_C void RegisterEventObserverL( |
|
446 MDrmAutomatedUsageObserver& aObserver ); |
|
447 |
|
448 |
|
449 /** |
|
450 * Unregisters client from listening to events related to automated usage. |
|
451 * |
|
452 * If register event observer has been called, it must be unregistered |
|
453 * before the observer object is deleted. |
|
454 * |
|
455 * @since S60 5.0 |
|
456 * |
|
457 * @param[in] aObserver |
|
458 * |
|
459 * @leave System wide or DRM specific error code. |
|
460 * |
|
461 * @see DRM::MDrmAutomatedUsageObserver |
|
462 * |
|
463 * @see DRM::CDrmaAutomatedUsage |
|
464 */ |
|
465 IMPORT_C void UnregisterEventObserverL( |
|
466 MDrmAutomatedUsageObserver& aObserver ); |
|
467 |
|
468 |
|
469 /** |
|
470 * Cancel an asyncronous operation |
|
471 * |
|
472 * @since S60 5.0 |
|
473 * |
|
474 * @param[in] aOperationId identifier of the async operation |
|
475 * to be cancelled |
|
476 * @return KErrNotFound if the operation has already been executed |
|
477 * or it does not exist |
|
478 * |
|
479 * @see DRM::CDrmaAutomatedUsage |
|
480 */ |
|
481 IMPORT_C TInt CancelOperation( TInt aOperationId ); |
|
482 |
|
483 |
|
484 /** |
|
485 * Implementation for MDrmErrorHandling::HandleErrorAsyncL |
|
486 * |
|
487 * Handles DRM error situations related to invalid rights. |
|
488 * This method displays appropriate notes, which observer can override, |
|
489 * to the user and acquires new rights if needed. Asynchronous version, |
|
490 * all errors are signalled using request status. |
|
491 * |
|
492 * @since S60 v5.0 |
|
493 * @param[in] aFile file for which the error happened |
|
494 * @param[in] aIntent the CAF intent which was used to recieve |
|
495 * the error |
|
496 * @param[in] aError error code |
|
497 * @param[in] aObserver reference to observer |
|
498 * |
|
499 * @return Operation Identifier for the async request |
|
500 * required for cancelling an operation and |
|
501 * identifying which request has been completed |
|
502 * |
|
503 * @see MDrmHandleErrorObserver |
|
504 * @see MDrmErrorHandling |
|
505 */ |
|
506 IMPORT_C TInt HandleErrorAsyncL( |
|
507 RFile& aFile, |
|
508 ContentAccess::TIntent aIntent, |
|
509 TInt aError, |
|
510 MDrmHandleErrorObserver& aObserver ); |
|
511 |
|
512 /** |
|
513 * Implementation for MDrmErrorHandling::HandleErrorL |
|
514 * |
|
515 * Handles DRM error situations related to invalid rights. |
|
516 * This method displays appropriate notes, which observer can override, |
|
517 * to the user and acquires new rights if needed. Synchronous version, |
|
518 * leaves in case of error. |
|
519 * |
|
520 * @since S60 5.0 |
|
521 * @param[in] aFile file for which the error happened |
|
522 * @param[in] aIntent the CAF intent which was used to recieve |
|
523 * the error |
|
524 * @param[in] aError error code |
|
525 * @param[in] aObserver pointer to observer, NULL if no observer |
|
526 * |
|
527 * @leave KErrArgument File is not DRM protected. |
|
528 * |
|
529 * @see MDrmHandleErrorObserver |
|
530 * @see MDrmErrorHandling |
|
531 */ |
|
532 IMPORT_C void HandleErrorL( |
|
533 RFile& aFile, |
|
534 ContentAccess::TIntent aIntent, |
|
535 TInt aError, |
|
536 MDrmHandleErrorObserver* aObserver ); |
|
537 |
|
538 /** |
|
539 * Implementation for MDrmErrorHandling::HandleErrorAsyncL |
|
540 * |
|
541 * Handles DRM error situations related to invalid rights. |
|
542 * This method displays appropriate notes, which observer can override, |
|
543 * to the user and acquires new rights if needed. Asynchronous version, |
|
544 * all errors are signalled using request status. |
|
545 * |
|
546 * @since S60 5.0 |
|
547 * @param[in] aFile content for which the error happened |
|
548 * @param[in] aIntent the CAF intent which was used to recieve |
|
549 * the error |
|
550 * @param[in] aError error code |
|
551 * @param[in] aObserver reference to observer |
|
552 * |
|
553 * @return Operation Identifier for the async request |
|
554 * required for cancelling an operation and |
|
555 * identifying which request has been completed |
|
556 * |
|
557 * @see MDrmHandleErrorObserver |
|
558 * @see MDrmErrorHandling |
|
559 */ |
|
560 IMPORT_C TInt HandleErrorAsyncL( |
|
561 ContentAccess::CData& aFile, |
|
562 ContentAccess::TIntent aIntent, |
|
563 TInt aError, |
|
564 MDrmHandleErrorObserver& aObserver ); |
|
565 |
|
566 /** |
|
567 * Implementation for MDrmErrorHandling::HandleErrorL |
|
568 * |
|
569 * Handles DRM error situations related to invalid rights. |
|
570 * This method displays appropriate notes, which observer can override, |
|
571 * to the user and acquires new rights if needed. Synchronous version, |
|
572 * leaves in case of error. |
|
573 * |
|
574 * @since S60 5.0 |
|
575 * @param[in] aFile content for which the error happened |
|
576 * @param[in] aIntent the CAF intent which was used to recieve |
|
577 * the error |
|
578 * @param[in] aError error code |
|
579 * @param[in] aObserver pointer to observer, NULL if no observer |
|
580 * |
|
581 * @leave KErrArgument File is not DRM protected. |
|
582 * |
|
583 * @see MDrmHandleErrorObserver |
|
584 * @see MDrmErrorHandling |
|
585 */ |
|
586 IMPORT_C void HandleErrorL( |
|
587 ContentAccess::CData& aFile, |
|
588 ContentAccess::TIntent aIntent, |
|
589 TInt aError, |
|
590 MDrmHandleErrorObserver* aObserver ); |
|
591 |
|
592 |
|
593 protected: // Functions from base classes |
|
594 |
|
595 /** |
|
596 * From CActive Cancels async request. |
|
597 */ |
|
598 void DoCancel(); |
|
599 |
|
600 /** |
|
601 * From CActive Called when async request completes. |
|
602 */ |
|
603 void RunL(); |
|
604 |
|
605 |
|
606 /** |
|
607 * From CActive Called if RunL leaves |
|
608 */ |
|
609 TInt RunError( TInt aError ); |
|
610 |
|
611 |
|
612 private: // Member functions |
|
613 |
|
614 CDrmAutomatedUsageImpl( CCoeEnv* aCoeEnv, |
|
615 CDrmUtility* aDrmUtility ); |
|
616 |
|
617 void ConstructL(); |
|
618 |
|
619 void Activate( TRequestStatus*& aStatus ); |
|
620 |
|
621 // Checks whether there exists suitable oma RO for automated use |
|
622 TBool DoCanSetAutomatedL( |
|
623 const TDesC8& aUniqueId8, |
|
624 const ContentAccess::TIntent aIntent, |
|
625 const TDrmAutomatedType aAutomatedType, |
|
626 const TBool aUseQueries = EFalse ); |
|
627 |
|
628 // Additional RO checks tor theme. |
|
629 TBool DoCanSetAutomatedThemeL( const TDesC8& aUniqueId8 ); |
|
630 |
|
631 |
|
632 TInt DoSetAutomatedL( CDrmAutomatedUsageData* aAutomatedUsageData ); |
|
633 |
|
634 |
|
635 TInt DoRemoveAutomated( CDrmAutomatedUsageData* aAutomatedUsageData ); |
|
636 |
|
637 |
|
638 private: // Data members |
|
639 |
|
640 // Oma Drm client |
|
641 RDRMRightsClient iOmaClient; |
|
642 |
|
643 // WM Drm Client |
|
644 // RWMDrmClient iWmClient; |
|
645 |
|
646 // own |
|
647 RDrmHelperClient iDrmHelperClient; |
|
648 |
|
649 // not own |
|
650 MDrmAutomatedUsageObserver* iAuObserver; |
|
651 |
|
652 // not own |
|
653 CCoeEnv* iCoeEnv; |
|
654 |
|
655 // not own |
|
656 CDrmUtility* iDrmUtility; |
|
657 |
|
658 // own |
|
659 CDrmQueue< CDrmAutomatedUsageData >* iDrmQueue; |
|
660 |
|
661 // own |
|
662 CDrmUtilityUI* iDrmUtilityUi; |
|
663 |
|
664 // Async observer and current operation id for async operations |
|
665 // not own |
|
666 MDrmAsyncObserver* iObserver; |
|
667 // not own |
|
668 TInt iOperationId; |
|
669 }; |
|
670 } |
|
671 |
|
672 #endif // CDrmAutomatedUsageImpl_H |