|
1 /* |
|
2 * Copyright (c) 2008 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: The API supports attributes not present in MCS from SAT Api |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MCSDRMHANDLER_H__ |
|
20 #define __MCSDRMHANDLER_H__ |
|
21 |
|
22 #include "mcsinstallnotifier.h" |
|
23 |
|
24 #include "mcsdrmobserver.h" |
|
25 #include "mcsdrmscanner.h" |
|
26 #include "mcsdrmobservermanager.h" |
|
27 |
|
28 class CMcsCacheHandler; |
|
29 class MMcsInstallListener; |
|
30 /** |
|
31 * DRM Handler. |
|
32 * @lib mcsmenu.lib |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CMcsDrmHandler ): |
|
36 public CBase, |
|
37 public MMcsInstallListener, |
|
38 public MMcsDrmObserver, |
|
39 public MMcsDrmAppScanner |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. Leaves on failure. |
|
45 * @return The constructed object. |
|
46 */ |
|
47 |
|
48 static CMcsDrmHandler* NewL( |
|
49 CMenuSrvEng& aSrvEng, |
|
50 CMenuSrvEngUtils& aUtils, |
|
51 CMcsCacheHandler& aCacheHandler ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 * @since S60 v5.0 |
|
56 * @capability None. |
|
57 * @throws None. |
|
58 * @panic None. |
|
59 */ |
|
60 virtual ~CMcsDrmHandler(); |
|
61 |
|
62 void HandleDrmEvent( TUid aUid ); |
|
63 |
|
64 void HandleDrmAppEvent(); |
|
65 |
|
66 void EngineEvents( TInt aFolder, TInt aEvents ); |
|
67 |
|
68 /** |
|
69 * Handle Install Event |
|
70 */ |
|
71 void HandleInstallNotifyL(TInt aPackageUid); |
|
72 |
|
73 private: |
|
74 |
|
75 /** |
|
76 * Constructor. |
|
77 */ |
|
78 CMcsDrmHandler( |
|
79 CMenuSrvEng& aSrvEng, |
|
80 CMenuSrvEngUtils& aUtils, |
|
81 CMcsCacheHandler& aCacheHandler ); |
|
82 |
|
83 /** |
|
84 * 2nd phase constructor. |
|
85 */ |
|
86 void ConstructL(); |
|
87 |
|
88 void AddRemoveObserversL( |
|
89 const RArray<TUid>& aDrmProtectedArray ); |
|
90 |
|
91 TInt AppFolderIdL( TUid aUid ); |
|
92 |
|
93 private: // data |
|
94 |
|
95 RMcsDrmObserverManager iObserversManager; |
|
96 |
|
97 |
|
98 CMenuSrvEng& iSrvEng; ///< Menu Engine. Not own. |
|
99 |
|
100 CMenuSrvEngUtils& iUtils; |
|
101 |
|
102 CMcsCacheHandler& iCacheHandler; |
|
103 |
|
104 CMcsDrmScanner* iScanner; |
|
105 |
|
106 CMcsInstallNotifier* iInstallNotifier; |
|
107 |
|
108 }; |
|
109 |
|
110 #endif // __MCSDRMHANDLER_H__ |