|
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 __MCSCACHEHANDLER_H__ |
|
20 #define __MCSCACHEHANDLER_H__ |
|
21 |
|
22 #include "menusrvattr.h" |
|
23 class CMenuEng; |
|
24 class CMenuSrvEngUtils; |
|
25 |
|
26 /** |
|
27 * DRM Handler. |
|
28 * @lib mcsdrmhandler.lib |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 NONSHARABLE_CLASS( CMcsCacheHandler ): |
|
32 public CBase |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Two-phased constructor. Leaves on failure. |
|
38 * @return The constructed object. |
|
39 */ |
|
40 IMPORT_C static CMcsCacheHandler* NewL( |
|
41 CMenuEng& aEng, |
|
42 CMenuSrvEngUtils& aUtils ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 * @since S60 v5.0 |
|
47 * @capability None. |
|
48 * @throws None. |
|
49 * @panic None. |
|
50 */ |
|
51 virtual ~CMcsCacheHandler(); |
|
52 |
|
53 void HandleRemoveId( TInt aId ); |
|
54 void HandleRemoveAttribute( TInt aId, const TDesC& aAttrName ); |
|
55 |
|
56 void EngineEvents( TInt aEvents ); |
|
57 |
|
58 private: |
|
59 |
|
60 /** |
|
61 * Constructor. |
|
62 */ |
|
63 CMcsCacheHandler( |
|
64 CMenuEng& aEng, |
|
65 CMenuSrvEngUtils& aUtils ); |
|
66 |
|
67 /** |
|
68 * 2nd phase constructor. |
|
69 */ |
|
70 void ConstructL(); |
|
71 |
|
72 void RemoveNotExistItems(); |
|
73 |
|
74 void CMcsCacheHandler::RemoveItemsWithChangedAttributesL(); |
|
75 |
|
76 |
|
77 private: // data |
|
78 CMenuEng& iEng ; ///< Engine. |
|
79 |
|
80 CMenuSrvEngUtils& iUtils; |
|
81 |
|
82 public: |
|
83 RMenuSrvAttrArray iAttrCache; |
|
84 }; |
|
85 |
|
86 #endif // __MCSDRMHANDLER_H__ |