1 /* |
|
2 * Copyright (c) 2008-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CCCHUINOTIFCONNECTIONHANDLER_H |
|
20 #define C_CCCHUINOTIFCONNECTIONHANDLER_H |
|
21 |
|
22 #include <badesca.h> |
|
23 #include <e32base.h> |
|
24 #include <e32const.h> |
|
25 #include <rconnmon.h> |
|
26 #include <cmmanagerext.h> |
|
27 #include <wlanmgmtcommon.h> // TWlanConnectionSecurityMode |
|
28 #include <cmpluginwlandef.h> |
|
29 |
|
30 #include "cchuicommon.hrh" |
|
31 |
|
32 class RCmDestinationExt; |
|
33 class CmConnectionMethodExt; |
|
34 |
|
35 /** |
|
36 * Connection Handler for notifier plugin. |
|
37 * This class implements the access to SNAPs. |
|
38 * |
|
39 * @code |
|
40 * @endcode |
|
41 * |
|
42 * @lib cchui.lib |
|
43 * @since S60 5.0 |
|
44 */ |
|
45 NONSHARABLE_CLASS( CCchUiNotifConnectionHandler ): public CBase |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CCchUiNotifConnectionHandler* NewL(); |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 static CCchUiNotifConnectionHandler* NewLC(); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 virtual ~CCchUiNotifConnectionHandler(); |
|
63 |
|
64 |
|
65 /** |
|
66 * Gets all gprs access points in internet snap to array. |
|
67 * |
|
68 * @since S60 5.0 |
|
69 * @param aIaps will store iap names |
|
70 * @param aIapIds will store iap ids |
|
71 */ |
|
72 TUint32 GetGprsAccessPointsL( |
|
73 CDesCArray& aIaps, |
|
74 RArray<TUint32>& aIapIds ); |
|
75 |
|
76 /** |
|
77 * Gets connection name. |
|
78 * |
|
79 * @since S60 5.0 |
|
80 * @param aIapid current connection iap id |
|
81 * @param aServiceName service name |
|
82 * @param aIapName accesspoint name to be stored here |
|
83 */ |
|
84 void ConnectionNameL( |
|
85 TUint aIapid, |
|
86 TDesC& aServiceName, |
|
87 RBuf& aIapName ); |
|
88 |
|
89 /** |
|
90 * Gets all but specified service´s destinations. |
|
91 * |
|
92 * @since S60 5.0 |
|
93 * @param aServiceName services name which destination can be ignored. |
|
94 * @param aDestinationIds will store destination ids |
|
95 */ |
|
96 void GetDestinationsL( |
|
97 TDesC& aServiceName, |
|
98 RArray<TUint32>& aDestinationIds ); |
|
99 |
|
100 /** |
|
101 * Gets all access point ids from snap. |
|
102 * |
|
103 * @since S60 5.0 |
|
104 * @param aIapIds will store iap ids |
|
105 * @param aDestinationId id of destination to use |
|
106 */ |
|
107 void GetAccessPointsFromSnapL( |
|
108 RArray<TUint32>& aIapIds, |
|
109 TUint32 aDestinationId ); |
|
110 |
|
111 private: |
|
112 |
|
113 CCchUiNotifConnectionHandler(); |
|
114 |
|
115 void ConstructL(); |
|
116 |
|
117 /** |
|
118 * Fills GPRS access point names and ids from provided destination. |
|
119 * |
|
120 * @since S60 5.0 |
|
121 * @param aIaps will store iap names |
|
122 * @param aIapIds will store iap ids |
|
123 * @param aDestination destination to use |
|
124 */ |
|
125 void GetGprsAccessPointsFromSnapL( |
|
126 CDesCArray& aIaps, RArray<TUint32>& aIapIds, |
|
127 RCmDestinationExt& aDestination ); |
|
128 |
|
129 private: // data |
|
130 |
|
131 /** |
|
132 * Handle to connection method manager. |
|
133 * Own. |
|
134 */ |
|
135 RCmManagerExt iCmManagerExt; |
|
136 |
|
137 CCHUI_UNIT_TEST( T_CCchUiNotifConnectionHandler ) |
|
138 }; |
|
139 |
|
140 #endif // C_CCCHUINOTIFCONNECTIONHANDLER_H |
|