Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Connection manager IF class.
25 #include <cmdefconnvalues.h>
27 // Forward Declarations
28 class RCmConnectionMethod;
31 class TBearerPriority;
35 * RCmManager gives access to network destinations and connection methods.
40 NONSHARABLE_CLASS(RCmManager)
42 //=====================================================================
43 // Constructors/Destructors
48 * Default constructor.
52 //=====================================================================
61 IMPORT_C void OpenL();
65 * Pushes the object on the cleanup stack
69 IMPORT_C void OpenLC();
72 * Secondary destructor
76 IMPORT_C void Close();
78 //=======================================================================
83 * Used to query bearer information that doesn't belong
84 * to a specific connection method, such as
85 * ECmCoverage or ECmDefaultPriority etc.
88 * @param aBearerType the bearer
89 * @param aAttribute the setting value
90 * @return the setting value
92 IMPORT_C TUint32 GetBearerInfoIntL( TUint32 aBearerType,
93 TUint32 aAttribute ) const;
97 * Used to query bearer information that doesn't belong
98 * to a specific connection method, such as
99 * ECmCoverage or ECmDefaultPriority etc.
102 * @param aBearerType the bearer
103 * @param aAttribute the setting value
104 * @return the setting value
106 IMPORT_C TBool GetBearerInfoBoolL( TUint32 aBearerType,
107 TUint32 aAttribute ) const;
109 * Used to query bearer information that doesn't belong
110 * to a specific connection method, such as
111 * ECmCoverage or ECmDefaultPriority etc.
112 * HBuf ownership is passed to the caller
115 * @param aBearerType the bearer
116 * @param aAttribute the setting value
117 * @return the setting value
119 IMPORT_C HBufC* GetBearerInfoStringL( TUint32 aBearerType,
120 TUint32 aAttribute ) const;
122 * Used to query bearer information that does not belong
123 * to a specific connection method, such as
124 * ECmCoverage or ECmDefaultPriority, etc.
125 * HBuf ownership is passed to the caller
128 * @param aBearerType the bearer
129 * @param aAttribute the setting value
130 * @return the setting value
132 IMPORT_C HBufC8* GetBearerInfoString8L( TUint32 aBearerType,
133 TUint32 aAttribute ) const;
136 * Used to query any non-bearer specific information about
137 * a given connection method. This can be e.g. ECmBearerType,
138 * ECmName, ECmStartPage, etc.
141 * @param aIapId the connection method id
142 * @param aAttribute the setting value
143 * @return the setting value
145 IMPORT_C TUint32 GetConnectionMethodInfoIntL( TUint32 aIapId,
146 TUint32 aAttribute ) const;
149 * Used to query any, non-bearer specific information about
150 * a given connection method. This can be e.g. ECmBearerType,
151 * ECmName, ECmStartPage, etc.
154 * @param aIapId the connection method id
155 * @param aAttribute the setting value
156 * @return the setting value
158 IMPORT_C TBool GetConnectionMethodInfoBoolL( TUint32 aIapId,
159 TUint32 aAttribute ) const;
162 * Used to query any non-bearer specific information about
163 * a given connection method. This can be e.g. ECmBearerType,
164 * ECmName, ECmStartPage, etc.
165 * HBuf ownership is passed to the caller
168 * @param aIapId the connection method id
169 * @param aAttribute the setting value
170 * @return the setting value
172 IMPORT_C HBufC* GetConnectionMethodInfoStringL( TUint32 aIapId,
173 TUint32 aAttribute ) const;
176 * Used to query any non-bearer specific information about
177 * a given connection method. This can be e.g. ECmBearerType,
178 * ECmName, ECmStartPage, etc.
179 * HBuf ownership is passed to the caller
182 * @param aIapId the connection method id
183 * @param aAttribute the setting value
184 * @return the setting value
186 IMPORT_C HBufC8* GetConnectionMethodInfoString8L( TUint32 aIapId,
187 TUint32 aAttribute ) const;
190 * Returns the connection method queried by its ID
193 * @param aConnectionMethodId id of the connection method
194 * @return RCmConnectionMethod connection method
196 IMPORT_C RCmConnectionMethod ConnectionMethodL(
197 TUint32 aConnectionMethodId ) const;
200 * Returns the list of connection methods. Connection Methods are
201 * filtered by the switch parameters e.g. aLegacyOnly.
204 * @param aCMArray on return it is the array of IAP ids.
205 * @param aCheckBearerType If ETrue only connection methods with
206 * supported bearer type are returned
207 * @param aLegacyOnly when set to ETrue only Legacy IAP ids will
209 * @param aEasyWlan when set to ETrue EasyWlan id is returned, too
211 IMPORT_C void ConnectionMethodL( RArray<TUint32>& aCMArray,
212 TBool aCheckBearerType = ETrue,
213 TBool aLegacyOnly = ETrue,
214 TBool aEasyWlan = EFalse ) const;
217 * Returns an array of all destination id's
220 * @param aDestArray list all available destinations' id
222 IMPORT_C void AllDestinationsL( RArray<TUint32>& aDestArray ) const;
225 * Returns the destination to which a specified
226 * connection method belongs, search is by destination ID
229 * @param aDestinationId id of destination
230 * @return RCmDestination network destination
232 IMPORT_C RCmDestination DestinationL( TUint32 aDestinationId ) const;
235 * Returns the copy of the bearer priority array. Ownership is passed.
238 * @param aArray bearer priority array
240 IMPORT_C void BearerPriorityArrayL(
241 RArray<TBearerPriority>& aArray ) const;
244 * Clean up passed global bearer priority array. Delete
245 * the elements and calls Reset and Close on the array.
248 * @param aArray array to be cleaned up
250 IMPORT_C void CleanupGlobalPriorityArray(
251 RArray<TBearerPriority>& aArray ) const;
254 * Returns the id of the EasyWlan connection method.
257 * @return id of the EasyWLan connection method. 0 if not found.
259 IMPORT_C TUint32 EasyWlanIdL() const;
262 * Returns the default connection method/SNAP.
266 IMPORT_C void ReadDefConnL( TCmDefConnValue& aDCSetting );
269 * Stores the default connection method/SNAP.
273 IMPORT_C void WriteDefConnL( const TCmDefConnValue& aDCSetting );
276 /** Open session and create tables if they don't exist*/
277 IMPORT_C void CreateTablesAndOpenL();
280 * Creates a Destination with the passed name.
281 * @param aName the name of the new destination.
282 * @return RCmDestination new destination. ownership is passed to the
285 IMPORT_C RCmDestination CreateDestinationL( const TDesC& aName );
288 * Creates a connection method does not belong to any destination
289 * @param aImplementationUid - bearer type of the new connection method
290 * @return RCmConnectionMethod newly created connection method.
292 IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aBearerType );
295 * Copies a connection method belonging to one destination to
296 * another. The connection method becomes shared.
297 * Calls UpdateL on the destination
298 * @param aTargetDestination
299 * @param aConnectionMethodId
300 * @return TInt - index in the Connection Method list
302 IMPORT_C TInt CopyConnectionMethodL( RCmDestination& aTargetDestination,
303 RCmConnectionMethod& aConnectionMethod );
306 * Moves a connection method belonging to one destination to
307 * another. The connection method is removed from the source destination
308 * @param aSourceDestination
309 * @param aTargetDestination
310 * @param aConnectionMethod
311 * @return TInt - index in the Connection Method list
313 IMPORT_C TInt MoveConnectionMethodL( RCmDestination& aSourceDestination,
314 RCmDestination& aTargetDestination,
315 RCmConnectionMethod& aConnectionMethod );
318 * Remove connection method from the destination
319 * @param aDestination destination the connection method is attached to
320 * @param aConnectionMethod connection method to be removed
322 IMPORT_C void RemoveConnectionMethodL( RCmDestination& aDestination,
323 RCmConnectionMethod& aConnectionMethod );
326 * Removes connection method from every destination and make it
328 * @param aConnectionMethod connection method to be removed
330 IMPORT_C void RemoveAllReferencesL( RCmConnectionMethod& aConnectionMethod );
333 * Update bearer priority array
334 * @param aArray array with new global bearer priority
336 IMPORT_C void UpdateBearerPriorityArrayL( const RArray<TBearerPriority>& aArray );
339 * Creates a Destination with the passed name and id.
340 * @param aName the name of the new destination.
341 * @param aDestId Predefined id of the destination.
342 * @return RCmDestination newly created destination or leaves with
343 * KErrAlreadyExists if there exists CM with the same Id.
344 * Ownership is passed to the caller.
346 IMPORT_C RCmDestination CreateDestinationL( const TDesC& aName,
350 * Creates a connection method does not belong to any destination
351 * @param aImplementationUid - bearer type of the new connection
353 * @param aConnMethodId Predefined id for the connection method.
354 * @return RCmConnectionMethod newly created connection
355 * method or leaves with KErrAlreadyExists if there exists CM
358 IMPORT_C RCmConnectionMethod CreateConnectionMethodL( TUint32 aImplementationUid,
359 TUint32 aConnMethodId );
362 * Query all of the supported bearer types.
363 * @param aArray list of all supported bearer types.
365 IMPORT_C void SupportedBearersL( RArray<TUint32>& aArray ) const;
368 * Returns "Uncategorized" icon.
369 * This fucton leaves if the client does not have a valid UI context
370 * @return CGulIcon* Icon of uncategorized connection methods. Ownership
373 IMPORT_C CGulIcon* UncategorizedIconL() const;
377 * This is a private copy constructor without implementation.
378 * The sole purpose of this declaration is to forbid the copying of
379 * the objects of this class.
381 RCmManager(RCmManager& );
383 * This is a private copy constructor without implementation.
384 * The sole purpose of this declaration is to forbid the copying of
385 * the objects of this class.
387 RCmManager& operator=( RCmManager& );
388 //=========================================================================
394 * the implementation class
396 CCmManagerImpl* iImplementation;
399 #include "cmmanager.inl"
401 #endif // CMMANAGER_H