28
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-2010 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 service´s destination Id where the given iapid belongs.
|
|
102 |
*
|
|
103 |
* @since S60 9.2
|
|
104 |
* @param aIapId internet accesspoint Id.
|
|
105 |
* @param aError error code in return
|
|
106 |
* @param aDestinationId returns destination id
|
|
107 |
*/
|
|
108 |
void GetDestinationL(
|
|
109 |
TUint aIapId, TInt& aError, TUint32& aDestinationId );
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Gets all access point ids from snap.
|
|
113 |
*
|
|
114 |
* @since S60 5.0
|
|
115 |
* @param aIapIds will store iap ids
|
|
116 |
* @param aDestinationId id of destination to use
|
|
117 |
*/
|
|
118 |
void GetAccessPointsFromSnapL(
|
|
119 |
RArray<TUint32>& aIapIds,
|
|
120 |
TUint32 aDestinationId );
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Gets all gprs accesspoints id's from the service's snap.
|
|
124 |
*
|
|
125 |
* @since S60 9.2
|
|
126 |
* @param aIapIds will store iap ids
|
|
127 |
* @param aDestinationId id of destination to use
|
|
128 |
* @return error. KErrNotFound if no gprs accesspoints
|
|
129 |
*/
|
|
130 |
TInt GetGprsAccessPointsSetToServiceSnapL(
|
|
131 |
CDesCArray& aIaps, RArray<TUint32>& aIapIds, TUint aIapId );
|
|
132 |
|
|
133 |
/**
|
|
134 |
* Checks given connection methods equality
|
|
135 |
*
|
|
136 |
* @since S60 9.2
|
|
137 |
* @param aIapId Iap Id.
|
|
138 |
* @param aIapIdToCompare Iap Id to compare.
|
|
139 |
* @return ETrue if equals
|
|
140 |
*/
|
|
141 |
TBool IsConnectionMethodSimilarL(
|
|
142 |
TUint32 aIapId, TUint32 aIapIdToCompare );
|
|
143 |
|
|
144 |
private:
|
|
145 |
|
|
146 |
CCchUiNotifConnectionHandler();
|
|
147 |
|
|
148 |
void ConstructL();
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Fills GPRS access point names and ids from provided destination.
|
|
152 |
*
|
|
153 |
* @since S60 5.0
|
|
154 |
* @param aIaps will store iap names
|
|
155 |
* @param aIapIds will store iap ids
|
|
156 |
* @param aDestination destination to use
|
|
157 |
*/
|
|
158 |
void GetGprsAccessPointsFromSnapL(
|
|
159 |
CDesCArray& aIaps, RArray<TUint32>& aIapIds,
|
|
160 |
RCmDestinationExt& aDestination );
|
|
161 |
|
|
162 |
private: // data
|
|
163 |
|
|
164 |
/**
|
|
165 |
* Handle to connection method manager.
|
|
166 |
* Own.
|
|
167 |
*/
|
|
168 |
RCmManagerExt iCmManagerExt;
|
|
169 |
|
|
170 |
CCHUI_UNIT_TEST( T_CCchUiNotifConnectionHandler )
|
|
171 |
};
|
|
172 |
|
|
173 |
#endif // C_CCCHUINOTIFCONNECTIONHANDLER_H
|