1 /* |
|
2 * Copyright (c) 2007-2009 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: CCCHSubserviceInfo declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCHSUBSERVICEINFO_H |
|
20 #define C_CCHSUBSERVICEINFO_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <cchclientserver.h> |
|
26 |
|
27 // CONSTANTS |
|
28 // None |
|
29 |
|
30 // MACROS |
|
31 // None |
|
32 |
|
33 // DATA TYPES |
|
34 // None |
|
35 |
|
36 // FUNCTION PROTOTYPES |
|
37 // None |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 class CCCHServerBase; |
|
41 |
|
42 // CLASS DECLARATION |
|
43 |
|
44 /** |
|
45 * CCCHSubserviceInfo declaration |
|
46 * Contains Subservice information |
|
47 * @lib cchserver.exe |
|
48 * @since S60 3.2 |
|
49 */ |
|
50 NONSHARABLE_CLASS( CCCHSubserviceInfo ) : public CBase |
|
51 { |
|
52 |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CCCHSubserviceInfo* NewL( TUint aServiceId, |
|
59 CCCHServerBase& aServer ); |
|
60 |
|
61 /** |
|
62 * Two-phased constructor. |
|
63 */ |
|
64 static CCCHSubserviceInfo* NewLC( TUint aServiceId, |
|
65 CCCHServerBase& aServer ); |
|
66 |
|
67 /** |
|
68 * Destructor. |
|
69 */ |
|
70 virtual ~CCCHSubserviceInfo(); |
|
71 |
|
72 public: // New functions |
|
73 |
|
74 /** |
|
75 * SubserviceId setter |
|
76 * @since S60 3.2 |
|
77 * @param aSubserviceId Subservice Id |
|
78 */ |
|
79 void SetSubserviceId( const TUint aSubserviceId ); |
|
80 |
|
81 /** |
|
82 * Plug-in Uid's setter |
|
83 * @since S60 3.2 |
|
84 * @param aPluginUid Subservice's Plug-in's Uid |
|
85 */ |
|
86 void SetPluginUid( const TUid aPluginUid ); |
|
87 |
|
88 /** |
|
89 * Plug-in Uid's getter |
|
90 * @since S60 3.2 |
|
91 * @param TUid Subservice's Plug-in's Uid |
|
92 */ |
|
93 TUid GetPluginUid() const; |
|
94 |
|
95 /** |
|
96 * Subservice type setter |
|
97 * @since S60 3.2 |
|
98 * @param aType Type of Subservice |
|
99 */ |
|
100 void SetType( const TCCHSubserviceType aType ); |
|
101 |
|
102 /** |
|
103 * Subservice type getter |
|
104 * @since S60 3.2 |
|
105 * @return TCCHSubserviceType type of subservice |
|
106 */ |
|
107 TCCHSubserviceType Type(); |
|
108 |
|
109 /** |
|
110 * Subservice state setter |
|
111 * @since S60 3.2 |
|
112 * @param aState Current state of Subservice |
|
113 */ |
|
114 void SetState( const TCCHSubserviceState aState ); |
|
115 |
|
116 /** |
|
117 * Error setter |
|
118 * @since S60 3.2 |
|
119 * @param aState Current error of Subservice |
|
120 */ |
|
121 void SetError( const TInt aError ); |
|
122 |
|
123 /** |
|
124 * IAP Id setter |
|
125 * @since S60 3.2 |
|
126 * @param aIapId Currently used IAP Id |
|
127 */ |
|
128 void SetIapId( const TUint32 aIapId ); |
|
129 |
|
130 /** |
|
131 * SNAP Id setter |
|
132 * @since S60 3.2 |
|
133 * @param aSNAPid Currently used SNAP Id |
|
134 */ |
|
135 void SetSNAPId( const TUint32 aSNAPid ); |
|
136 |
|
137 /** |
|
138 * Update state of Subservice |
|
139 * @since S60 3.2 |
|
140 */ |
|
141 void Update(); |
|
142 |
|
143 /** |
|
144 * Is this Subservice enabled |
|
145 * @since S60 3.2 |
|
146 * @return ETrue if Subservice is enabled |
|
147 */ |
|
148 TBool IsEnabled() const; |
|
149 |
|
150 /** |
|
151 * Subservice error getter |
|
152 * @since S60 3.2 |
|
153 * @return TCCHSubserviceStates Current state of Subservice |
|
154 */ |
|
155 TInt GetError(); |
|
156 |
|
157 /** |
|
158 * Subservice state getter |
|
159 * @since S60 3.2 |
|
160 * @return TCCHSubserviceStates Current state of Subservice |
|
161 */ |
|
162 TCCHSubserviceState GetState(); |
|
163 |
|
164 /** |
|
165 * Get Subservice information |
|
166 * @since S60 3.2 |
|
167 * @param aSubservice On completion contains subservice information |
|
168 */ |
|
169 void FillSubserviceInfo( TCCHSubservice& aSubservice ); |
|
170 |
|
171 /** |
|
172 * Subservice's enable at startup info setter |
|
173 * @since S60 3.2 |
|
174 * @param aLoadAtStartUp Enable Subservice at the startup |
|
175 */ |
|
176 void SetStartupFlag( TBool aLoadAtStartUp ); |
|
177 |
|
178 /** |
|
179 * Subservice's enable at startup info getter |
|
180 * @since S60 3.2 |
|
181 * @param ETrue If Subservice have to enable at the startup |
|
182 */ |
|
183 TBool GetStartUpFlag() const; |
|
184 |
|
185 /** |
|
186 * Status has changed |
|
187 * @since S60 3.2 |
|
188 */ |
|
189 void StatusChanged(); |
|
190 |
|
191 private: |
|
192 |
|
193 /** |
|
194 * C++ default constructor. |
|
195 */ |
|
196 CCCHSubserviceInfo( TUint aServiceId, CCCHServerBase& aServer ); |
|
197 |
|
198 /** |
|
199 * Update connection related member variables from SIP Connection Provider |
|
200 * @since S60 3.2 |
|
201 */ |
|
202 void GetServiceNetworkInfo(); |
|
203 |
|
204 private: // data |
|
205 |
|
206 /** |
|
207 * Service Id, this service owns this subservice |
|
208 */ |
|
209 TUint32 iServiceId; |
|
210 |
|
211 /** |
|
212 * Handle to server |
|
213 */ |
|
214 CCCHServerBase& iServer; |
|
215 |
|
216 /** |
|
217 * Subservice's Id |
|
218 */ |
|
219 TUint iSubserviceId; |
|
220 |
|
221 /** |
|
222 * Subservice's Plug-in's Uid |
|
223 */ |
|
224 TUid iPluginUid; |
|
225 |
|
226 /** |
|
227 * Subservice's type |
|
228 */ |
|
229 TCCHSubserviceType iType; |
|
230 |
|
231 /** |
|
232 * Current state of subservice |
|
233 */ |
|
234 TCCHSubserviceState iState; |
|
235 |
|
236 /** |
|
237 * Current error of subservice |
|
238 */ |
|
239 TInt iError; |
|
240 |
|
241 /** |
|
242 * Subservice's IAP |
|
243 */ |
|
244 TUint32 iIapId; |
|
245 |
|
246 /** |
|
247 * Subservice's SNAP |
|
248 */ |
|
249 TUint32 iSNAPId; |
|
250 |
|
251 /** |
|
252 * Can SNAP be edited |
|
253 */ |
|
254 TBool iSNAPLocked; |
|
255 |
|
256 /** |
|
257 * Is password set. |
|
258 */ |
|
259 TBool iPasswordSet; |
|
260 |
|
261 /** |
|
262 * Enable at start-up |
|
263 */ |
|
264 TBool iEnableAtStartUp; |
|
265 |
|
266 /** |
|
267 * Previous state of subservice |
|
268 */ |
|
269 TCCHSubserviceState iPreviousState; |
|
270 }; |
|
271 |
|
272 #endif // C_CCHSUBSERVICEINFO_H |
|
273 |
|
274 // End of file |
|