|
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: CMSStoreServersSetting class definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_MSSTORESERVERSSETTING_H |
|
20 #define C_MSSTORESERVERSSETTING_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <aknsettingitemlist.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CMSAppUi; |
|
27 class CCmMediaServerFull; |
|
28 class CMSAppUi; |
|
29 class CSelectionItemList; |
|
30 class CCmStoreRule; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * CMSStoreServersSetting class. This class is used when |
|
37 * server list is modified |
|
38 * |
|
39 * @since S60 5.1 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CMSStoreServersSetting ): public CAknTextSettingItem |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 * |
|
48 * @since S60 5.1 |
|
49 * @param aIdentifier, setting resource id |
|
50 * @param aAppUi, application UI |
|
51 * @param aText, dummy - just for setting creation |
|
52 * @return pointer to CMSStoreServersSetting |
|
53 */ |
|
54 static CMSStoreServersSetting* NewL( TInt aIdentifier, |
|
55 CCmStoreRule* aRule, |
|
56 CMSAppUi& aAppUi, |
|
57 TDes& aText ); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * |
|
62 * @since S60 5.1 |
|
63 * @param aIdentifier, setting resource id |
|
64 * @param aAppUi, application UI |
|
65 * @param aText, dummy - just for setting creation |
|
66 * @return None |
|
67 */ |
|
68 static CMSStoreServersSetting* NewLC( TInt aIdentifier, |
|
69 CCmStoreRule* aRule, |
|
70 CMSAppUi& aAppUi, |
|
71 TDes& aText ); |
|
72 |
|
73 /** |
|
74 * Destructor. |
|
75 */ |
|
76 virtual ~CMSStoreServersSetting(); |
|
77 |
|
78 |
|
79 protected: |
|
80 |
|
81 /** |
|
82 * Creates selection list for setting page |
|
83 * @since S60 3.1 |
|
84 */ |
|
85 void CreateSelectionItemListL(); |
|
86 |
|
87 /** |
|
88 * Counts selected items |
|
89 * @since S60 3.1 |
|
90 * @return TInt, item count |
|
91 */ |
|
92 TInt CountSelectedItems(); |
|
93 |
|
94 /** |
|
95 * Sets setting item secondary text according to selected devices |
|
96 * @since S60 3.1 |
|
97 */ |
|
98 void SetSettingItemTextL(); |
|
99 |
|
100 // From base class CAknSettingItem |
|
101 |
|
102 /** |
|
103 * From CAknSettingItem |
|
104 * See base class definition |
|
105 */ |
|
106 void EditItemL( TBool aCalledFromMenu ); |
|
107 |
|
108 |
|
109 private: |
|
110 |
|
111 /** |
|
112 * Performs the first phase of two phase construction. |
|
113 * |
|
114 * @since S60 5.1 |
|
115 * @param aIdentifier, setting resource id |
|
116 * @param aAppUi, application UI |
|
117 * @param aText, dummy - just for setting creation |
|
118 * @return None |
|
119 */ |
|
120 CMSStoreServersSetting( |
|
121 TInt aIdentifier, |
|
122 CCmStoreRule* aRule, |
|
123 CMSAppUi& aAppUi, |
|
124 TDes& aText |
|
125 ); |
|
126 |
|
127 /** |
|
128 * Performs the second phase construction. |
|
129 */ |
|
130 void ConstructL(); |
|
131 |
|
132 |
|
133 /** |
|
134 * Deletes all servers from rule |
|
135 * |
|
136 * @since S60 5.1 |
|
137 */ |
|
138 void DeleteAllServersFromRuleL(); |
|
139 |
|
140 private: |
|
141 |
|
142 /** |
|
143 * server list |
|
144 */ |
|
145 RPointerArray<CCmMediaServerFull>* iServers; // owned |
|
146 /** |
|
147 * current rule |
|
148 */ |
|
149 CCmStoreRule* iRule; // not owned |
|
150 /** |
|
151 * application ui |
|
152 */ |
|
153 CMSAppUi& iAppUi; |
|
154 /** |
|
155 * setting page item array (servers) |
|
156 */ |
|
157 CSelectionItemList* iItemArray; // owned |
|
158 /** |
|
159 * Server name string (external set) |
|
160 */ |
|
161 HBufC* iSettingText; // owned |
|
162 /** |
|
163 * Selected item count |
|
164 */ |
|
165 TInt iSelectedItemCount; |
|
166 }; |
|
167 |
|
168 #endif // C_MSSTORESERVERSSETTING_H |
|
169 |
|
170 // End of File |