|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MCSGETLISTIMPL_H |
|
20 #define __MCSGETLISTIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class MMCSCallback; |
|
25 class RMenuSapi; |
|
26 class TMenuItem; |
|
27 class RMcsOperationManager; |
|
28 class CLiwGenericParamList; |
|
29 class CLiwDefaultMap; |
|
30 class CLiwList; |
|
31 class CLiwDefaultList; |
|
32 class CAknIcon; |
|
33 |
|
34 /** |
|
35 * This class implements MCS SAPI core logic for GetList async requests. |
|
36 * |
|
37 */ |
|
38 class CMCSGetListImpl : public CActive |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aMCS MenuContentService object. |
|
45 * @param aCallback Callback Object for Change notification. |
|
46 * @return CMCSGetListImpl reference. |
|
47 */ |
|
48 static CMCSGetListImpl* NewL( RMenuSapi& aMCS, MMCSCallback* aCallback, |
|
49 RMcsOperationManager& aOperationManager ); |
|
50 |
|
51 /** |
|
52 * GetListL for asynchronous calls. |
|
53 * @param aInParamList list containing input parameters for getlist |
|
54 */ |
|
55 void GetListL( const CLiwGenericParamList& aInParamList ); |
|
56 |
|
57 /** |
|
58 * GetListL for synchronous calls. |
|
59 */ |
|
60 void GetListL( ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CMCSGetListImpl(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * Default constructor. |
|
71 * @param aMCS MenuContentService object. |
|
72 * @param aCallback It is a callback notification. |
|
73 * @param aOperationManager for safe cleanup |
|
74 */ |
|
75 CMCSGetListImpl( RMenuSapi& aMCS, MMCSCallback* aCallback, |
|
76 RMcsOperationManager& aOperationManager ); |
|
77 |
|
78 /** |
|
79 * ConstructL |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 /** |
|
84 * Inherited from CActive class |
|
85 */ |
|
86 virtual void DoCancel(); |
|
87 |
|
88 /** |
|
89 * Inherited from CActive class |
|
90 */ |
|
91 virtual void RunL(); |
|
92 |
|
93 /** |
|
94 * Notify callback in case RunL leaved; |
|
95 */ |
|
96 TInt RunError(TInt aError); |
|
97 |
|
98 /** |
|
99 * Activates the request and call SetActive() function |
|
100 */ |
|
101 void ActivateRequest(TInt aReason); |
|
102 |
|
103 /** |
|
104 * Gives the result for notification request. |
|
105 */ |
|
106 void NotifyRequestResultL(TInt aReason); |
|
107 |
|
108 /* |
|
109 * Handle append icons |
|
110 */ |
|
111 void HandleAppendIconsL( CLiwGenericParamList* aParamList ); |
|
112 |
|
113 /** |
|
114 * Appends icons to generic param list. |
|
115 */ |
|
116 void AppendIconsL( const CLiwList* aList, |
|
117 CLiwDefaultList* aDefaultList ); |
|
118 |
|
119 /** |
|
120 * Appends icon to specific map. |
|
121 */ |
|
122 void AppendIconL( CLiwDefaultMap* aMap ); |
|
123 void GetMaskAndBitmapL( CLiwDefaultMap& aMap, CAknIcon* aIcon ); |
|
124 |
|
125 private: |
|
126 /*own*/ |
|
127 RBuf8 iSerializedInputList; |
|
128 /*own*/ |
|
129 RBuf8 iSerializedOutputList; |
|
130 /** Callback Object. Not owned. */ |
|
131 MMCSCallback* iCallback; |
|
132 /** iMCS reference. Not owned. */ |
|
133 RMenuSapi iMCS; |
|
134 /*not own*/ |
|
135 RMcsOperationManager& iOperationManager; |
|
136 }; |
|
137 |
|
138 |
|
139 |
|
140 #endif //__MCSGETLISTIMPL_H |
|
141 |
|
142 // End of file |