1 /* |
|
2 * Copyright (c) 2007 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: CCCHSPSHandler declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCHSPSHANDLER_H |
|
20 #define C_CCHSPSHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 #include <cchclientserver.h> |
|
26 #include <spproperty.h> |
|
27 |
|
28 // CONSTANTS |
|
29 // None |
|
30 |
|
31 // MACROS |
|
32 // None |
|
33 |
|
34 // DATA TYPES |
|
35 // None |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 // None |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CCCHServerBase; |
|
42 class CSPSettings; |
|
43 |
|
44 // CLASS DECLARATION |
|
45 |
|
46 /** |
|
47 * CCCHSPSHandler declaration. |
|
48 * Service provider settings handler is used to access service and |
|
49 * sub-service configuration data. |
|
50 * @lib cchserver.exe |
|
51 * @since S60 3.2 |
|
52 */ |
|
53 NONSHARABLE_CLASS( CCCHSPSHandler ) : public CBase |
|
54 { |
|
55 |
|
56 public: // Constructors and destructor |
|
57 |
|
58 /** |
|
59 * Two-phased constructor. |
|
60 */ |
|
61 static CCCHSPSHandler* NewL( CCCHServerBase& aServer ); |
|
62 |
|
63 /** |
|
64 * Two-phased constructor. |
|
65 */ |
|
66 static CCCHSPSHandler* NewLC( CCCHServerBase& aServer ); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 virtual ~CCCHSPSHandler(); |
|
72 |
|
73 public: // New functions |
|
74 |
|
75 /** |
|
76 * Get service count |
|
77 * @since S60 3.2 |
|
78 * @return TInt Count of services |
|
79 */ |
|
80 TInt GetServicesCountL() const; |
|
81 |
|
82 /** |
|
83 * Get service ids |
|
84 * @since S60 3.2 |
|
85 * @param aServiceIds On completion contains service ids |
|
86 */ |
|
87 void GetServiceIdsL( RArray<TUint>& aServiceIds ) const; |
|
88 |
|
89 /** |
|
90 * Get service's information |
|
91 * @since S60 3.2 |
|
92 * @param aServiceId Used Service |
|
93 * @param aService On completion, contains service information |
|
94 */ |
|
95 void GetServiceInfoL( const TUint32 aServiceId, TCCHService& aService ) const; |
|
96 |
|
97 /** |
|
98 * Get connectivity Plug-in's Uid |
|
99 * @since S60 3.2 |
|
100 * @param aSerivceId Used Service |
|
101 * @param aType Subservice's type |
|
102 * @param aUid On completion, contains Plug-ins Uid |
|
103 */ |
|
104 void GetConnectivityPluginUidL( TUint32 aServiceId, |
|
105 TCCHSubserviceType aType, |
|
106 TUid& aUid ) const; |
|
107 |
|
108 /** |
|
109 * Get SNAP Id |
|
110 * @since S60 3.2 |
|
111 * @param aServiceId Used Service |
|
112 * @param aType Subservice's type |
|
113 * @param aSNAPId On completion, contains SNAP Id |
|
114 */ |
|
115 void GetSNAPIdL( TUint32 aServiceId, |
|
116 TCCHSubserviceType aType, |
|
117 TInt& aSNAPId ) const; |
|
118 |
|
119 /** |
|
120 * Get IAP Id |
|
121 * @since S60 3.2 |
|
122 * @param aServiceId Used Service |
|
123 * @param aType Subservice's type |
|
124 * @param aIapId On completion, contains IAP Id |
|
125 */ |
|
126 void GetIapIdL( TUint32 aServiceId, |
|
127 TCCHSubserviceType aType, |
|
128 TInt& aIapIdL ) const; |
|
129 |
|
130 /** |
|
131 * Get Settings Id |
|
132 * @since S60 3.2 |
|
133 * @param aServiceId Used Service |
|
134 * @param aType Subservice's type |
|
135 * @param aId On completion, contains Settings Id |
|
136 */ |
|
137 void GetSettingsIdL( TUint32 aServiceId, |
|
138 TCCHSubserviceType aType, |
|
139 TInt& aId ) const; |
|
140 |
|
141 /** |
|
142 * Get Service's load at startup information |
|
143 * @since S60 3.2 |
|
144 * @param aServiceId Used Service |
|
145 * @param aType Subservice's type |
|
146 * @param aOnOff On completion, contains Service's startup info |
|
147 */ |
|
148 void LoadAtStartUpL( TUint32 aServiceId, |
|
149 TCCHSubserviceType aType, |
|
150 TBool& aOnOff ) const; |
|
151 |
|
152 /** |
|
153 * Set Service's load at startup information to service table |
|
154 * @since S60 3.2 |
|
155 * @param aServiceId Used Service |
|
156 * @param aType Subservice's type |
|
157 * @param aOnOff |
|
158 */ |
|
159 void SetLoadAtStartUpL( const TUint32 aServiceId, |
|
160 const TCCHSubserviceType aType, |
|
161 const TBool aOnOff ) const; |
|
162 |
|
163 private: |
|
164 |
|
165 /** |
|
166 * Changes Subservice's type to property type and name |
|
167 * @since S60 3.2 |
|
168 * @param aType Subservice's type |
|
169 * @param aPropertyType On completion, contains property's type |
|
170 * @param aPropertyName On completion, contains property's name |
|
171 */ |
|
172 void ChangeToPropertyStyleL( TCCHSubserviceType aType, |
|
173 TSPItemType& aPropertyType, |
|
174 TServicePropertyName& aPropertyName ) const; |
|
175 |
|
176 /** |
|
177 * Checks is given subservice valid. |
|
178 * @since S60 3.2 |
|
179 * aServiceId Used Service |
|
180 * @param aPropertyName Property's name |
|
181 * @return ETrue if subservice is valid, otherwise EFalse. |
|
182 */ |
|
183 TBool ValidSubserviceL( const TUint32 aServiceId, |
|
184 TServicePropertyName aPropertyName ) const; |
|
185 |
|
186 private: |
|
187 |
|
188 /** |
|
189 * C++ default constructor. |
|
190 */ |
|
191 CCCHSPSHandler( CCCHServerBase& aServer ); |
|
192 |
|
193 /** |
|
194 * By default Symbian 2nd phase constructor is private. |
|
195 */ |
|
196 void ConstructL(); |
|
197 |
|
198 private: // data |
|
199 |
|
200 /** |
|
201 * Handle to server |
|
202 */ |
|
203 CCCHServerBase& iServer; |
|
204 |
|
205 /** |
|
206 * CSPSettings. Own |
|
207 */ |
|
208 CSPSettings* iSettings; |
|
209 |
|
210 }; |
|
211 |
|
212 #endif // C_CCHSPSHANDLER_H |
|
213 |
|
214 // End of file |
|