114
|
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 item information that is not supported by
|
|
15 |
* the MCS server itself
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef __MCSGETLISTCREATORINTERFACE_H__
|
|
21 |
#define __MCSGETLISTCREATORINTERFACE_H__
|
|
22 |
|
|
23 |
#include <mcsmenuitem.h>
|
|
24 |
|
|
25 |
//forward declarations
|
|
26 |
class CLiwDefaultList;
|
|
27 |
class CLiwDefaultMap;
|
|
28 |
class CMenuSrvEng;
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Interface for creating list containg result for getlist operation
|
|
32 |
*
|
|
33 |
* @since S60 v3.2
|
|
34 |
*/
|
|
35 |
NONSHARABLE_CLASS( CMcsGetListCreatorInterface ) : public CBase
|
|
36 |
{
|
|
37 |
public:
|
|
38 |
/**
|
|
39 |
* Destructor.
|
|
40 |
*/
|
|
41 |
~CMcsGetListCreatorInterface();
|
|
42 |
|
|
43 |
/*
|
|
44 |
* Create getlist output list
|
|
45 |
* @param aIdsArray array containing ids of items to be added to output list
|
|
46 |
* @param aRequiredAttributes required attributes
|
|
47 |
* @param aIgnoredAttributes ignored attributes
|
|
48 |
* @result output list
|
|
49 |
*/
|
|
50 |
virtual CLiwDefaultList* CreateLC(
|
|
51 |
RArray<TMenuItem>& aIdsArray,
|
|
52 |
CDesC16Array* aRequiredAttributes,
|
|
53 |
CDesC16Array* aIgnoredAttributes) = 0;
|
|
54 |
|
|
55 |
protected:
|
|
56 |
/**
|
|
57 |
* Constructor.
|
|
58 |
*/
|
|
59 |
CMcsGetListCreatorInterface( CMenuSrvEng& aEng );
|
|
60 |
|
|
61 |
/**
|
|
62 |
* 2nd phase constructor
|
|
63 |
*/
|
|
64 |
void ConstructL();
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Builds map with attributes
|
|
68 |
* @param aMenuItem an item
|
|
69 |
* @param aRequiredAttributes required attributes
|
|
70 |
* @param aIgnoredAttributes ignored attributes
|
|
71 |
* @param aMap map to store result
|
|
72 |
*/
|
|
73 |
void BuildMapL(
|
|
74 |
const TMenuItem& aMenuItem,
|
|
75 |
CDesC16Array* aRequiredAttributes,
|
|
76 |
CDesC16Array* aIgnoredAttributes,
|
|
77 |
CLiwDefaultMap* aMap );
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Adds fundamental attributes for an item
|
|
81 |
* @param aMenuItem an item
|
|
82 |
* @param aMap map to store result
|
|
83 |
*/
|
|
84 |
void AddFundamentalAttributesL(
|
|
85 |
const TMenuItem& aMenuItem,
|
|
86 |
CLiwDefaultMap* aMap );
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Adds required attributes
|
|
90 |
* @param aMenuItem an item
|
|
91 |
* @param aRequiredAttributes required attributes
|
|
92 |
* @param aMap map to store results
|
|
93 |
*/
|
|
94 |
void AddRequiredAttributesL(
|
|
95 |
const TMenuItem& aMenuItem,
|
|
96 |
CDesC16Array* aRequiredAttributes,
|
|
97 |
CLiwDefaultMap* aMap );
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Adds all attributes without ignored
|
|
101 |
* @param aMenuItem an item
|
|
102 |
* @param aIgnoredAttributes ignored attributes
|
|
103 |
* @param aMap map to store results
|
|
104 |
*/
|
|
105 |
void AddAttributesWithoutIgnoredL(
|
|
106 |
const TMenuItem& aMenuItem,
|
|
107 |
CDesC16Array* aIgnoredAttributes,
|
|
108 |
CLiwDefaultMap* aMap );
|
|
109 |
|
|
110 |
/*
|
|
111 |
* Adds required attributes without ignored
|
|
112 |
* @param aMenuItem an item
|
|
113 |
* @param aRequiredAttributes required attributes
|
|
114 |
* @param aIgnoredAttributes ignored attributes
|
|
115 |
* @param aMap map to store results
|
|
116 |
*/
|
|
117 |
void AddRequiredAttributesWithoutIgnoredL(
|
|
118 |
const TMenuItem& aMenuItem,
|
|
119 |
CDesC16Array* aRequiredAttributes,
|
|
120 |
CDesC16Array* aIgnoredAttributes,
|
|
121 |
CLiwDefaultMap* aMap );
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Adds all attributes
|
|
125 |
* @param aMenuItem an item
|
|
126 |
* @param aMap map to store results
|
|
127 |
*/
|
|
128 |
void AddAllAttributesL(
|
|
129 |
const TMenuItem& aMenuItem,
|
|
130 |
CLiwDefaultMap* aMap );
|
|
131 |
|
|
132 |
/*
|
|
133 |
* Adds icon related attributes to a map
|
|
134 |
* @param aMenuItem an item
|
|
135 |
* @param aMap map to store results
|
|
136 |
*/
|
|
137 |
void FillIconAttributesMapL(
|
|
138 |
const TMenuItem& aMenuItem,
|
|
139 |
CLiwDefaultMap* aMap );
|
|
140 |
|
|
141 |
/*
|
|
142 |
* Appends attribute to a map
|
|
143 |
* @param aAttrName an attribute name
|
|
144 |
* @param aMap map to store results
|
|
145 |
*/
|
|
146 |
void AppendAttrL(
|
|
147 |
const TDesC& aAttrName,
|
|
148 |
CLiwDefaultMap* aMap );
|
|
149 |
|
|
150 |
/*
|
|
151 |
* Sets actual attribute getting strategy for give item id.
|
|
152 |
*/
|
|
153 |
void SetItemIdL(TInt aId);
|
|
154 |
|
|
155 |
protected:
|
|
156 |
/**
|
|
157 |
* Engine. not own
|
|
158 |
*/
|
|
159 |
CMenuSrvEng& iEng ;
|
|
160 |
TInt iId; ///< a id of an item.
|
|
161 |
};
|
|
162 |
#endif __MCSGETLISTCREATORINTERFACE_H__
|