2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Declaration of the class CApAccessPointItem
19 #ifndef ACCESSPOINTITEM_H
20 #define ACCESSPOINTITEM_H
22 // Deprecation warning
23 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
30 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
31 #include <nifvar_internal.h>
33 #include <ApEngineVer.h>
34 #include <ApEngineConsts.h>
39 * This enum is used to identify the data when reading or writing
40 * CApAccessPointItem data.
44 * <br>ReadTextL( const TApMember aColumn, TDes8& aValue )
45 * <br>WriteTextL( const TApMember aColumn, const TDesC8& aValue )
46 * <br> EApIspIfCallbackInfo
47 * <br> EApIspInitString
51 * <br>ReadTextL( const TApMember aColumn, TDes16& aValue )
52 * <br>WriteTextL( const TApMember aColumn, const TDesC16& aValue )
53 * <br> EApWapAccessPointName
54 * <br> EApWapCurrentBearer
55 * <br> EApWapGatewayAddress
56 * <br> EApWapServiceCentreAddress
58 * <br> EApIapServiceType
60 * <br> EApIspDescription
61 * <br> EApIspDefaultTelNumber
62 * <br> EApIspLoginName
63 * <br> EApIspLoginPass
67 * <br> EApGprsIfParams
68 * <br> EApIspIfNetworks
69 * <br> EApGprsIfNetworks
70 * <br> EApIspIfAuthName
71 * <br> EApGprsIfAuthName
72 * <br> EApIspIfAuthPass
73 * <br> EApGprsIfAuthPassword
76 * <br> EApIspIPNetMask
77 * <br> EApGprsIpNetMask
78 * <br> EApIspIPGateway
79 * <br> EApGprsIpGateway
80 * <br> EApIspIPNameServer1
81 * <br> EApGprsIPNameServer1
82 * <br> EApIspIPNameServer2
83 * <br> EApGprsIPNameServer2
84 * <br> EApGprsPdpAddress
85 * <br> EApProxyProtocolName
87 * <br> EApProxyLoginName
88 * <br> EApProxyLoginPass
89 * <br> EApIP6NameServer1
90 * <br> EApIP6NameServer2
91 * <br> EApLanBearerName
93 * <br>Long text, 16 bit:
94 * <br>const HBufC* ReadConstLongTextL( const TApMember aColumn )
95 * <br>WriteLongTextL( const TApMember aColumn, const TDesC& aValue )
96 * <br> EApWapStartPage
97 * <br> EApIspLoginScript
98 * <br> EApGprsAccessPointName
99 * <br> EApProxyServerAddress
100 * <br> EApProxyExceptions
103 * <br>ReadUint( const TApMember aColumn, TUint32& aValue )
104 * <br>WriteUint( const TApMember aColumn, const TUint32& aValue )
105 * <br> EApWapAccessPointID
111 * <br> EApWapChargecard
118 * <br> EApIapServiceId
119 * <br> EApIapChargecard
121 * <br> EApIspAuthRetries
122 * <br> EApGprsIfAuthRetries
123 * <br> EApIspIfCallbackType
124 * <br> EApIspCallBackTimeOut
125 * <br> EApIspBearerName
126 * <br> EApIspBearerSpeed
127 * <br> EApIspBearerCE
128 * <br> EApIspBearerType
129 * <br> EApIspBearerCallTypeIsdn
130 * <br> EApIspChannelCoding
132 * <br> EApIspRequestedTimeSlots
133 * <br> EApIspMaximumTimeSlots
134 * <br> EApGprsPdpType
135 * <br> EApGprsReqPrecedence
136 * <br> EApGprsReqDelay
137 * <br> EApGprsReqReliability
138 * <br> EApGprsReqPeakThroughput
139 * <br> EApGprsReqMeanPeakThroughput
140 * <br> EApGprsMinPrecedence
141 * <br> EApGprsMinDelay
142 * <br> EApGprsMinReliability
143 * <br> EApGprsMinPeakThroughput
144 * <br> EApGprsMinMeanThroughput
145 * <br> EApWapWspOption
146 * <br> EApIspBearerCallTypeIsdn
147 * <br> EApProxyPortNumber
149 * <br> EApWapProxyPort
150 * <br> EApIapBearerService
151 * <br> EApIapBearerID
154 * <br>ReadBool( const TApMember aColumn, TBool& aValue )
155 * <br>WriteBool( const TApMember aColumn, const TBool& aValue )
156 * <br> EApWapSecurity
157 * <br> EApIspDialResolution
158 * <br> EApIspUseLoginScript
159 * <br> EApIspPromptForLogin
160 * <br> EApIspDisplayPCT
161 * <br> EApIspIfPromptForAuth
162 * <br> EApGprsIfPromptForAuth
163 * <br> EApIspIfCallbackEnabled
164 * <br> EApIspIPAddrFromServer
165 * <br> EApGprsIpAddrFromServer
166 * <br> EApIspIPDnsAddrFromServer
167 * <br> EApGprsIpDnsAddrFromServer
168 * <br> EApIspEnableIpHeaderComp
169 * <br> EApGprsHeaderCompression
170 * <br> EApIspEnableLCPExtensions
171 * <br> EApGprsEnableLCPExtensions
172 * <br> EApIspDisablePlainTextAuth
173 * <br> EApGprsDisablePlainTextAuth
174 * <br> EApIspEnableSWCompression
175 * <br> EApGprsDataCompression
176 * <br> EApGprsUseAnonymAccess
178 * <br> EApProxyUseProxy
179 * <br> EApHasProxySettings
180 * <br> EApIP6DNSAddrFromServer
184 // WAP Access Point Table
185 EApWapAccessPointID, ///< The Uid of the access point.
186 ///< READ ONLY, assigned by the database.
187 EApWapAccessPointName, ///< The name of the access point
188 EApWapCurrentBearer, ///< Indicates the name of the table from
189 ///< which to read the bearer information
190 EApWapStartPage, ///< WAP start page URL, LONG TEXT!
192 // WAP Common (present in both tables)
193 EApWapGatewayAddress, ///< WAP gateway address (IP address)
194 EApWapWspOption, ///< Enum value indicating whether
195 ///< connection-oriented or connectionless
196 ///< API should be used.
197 ///< Type is TCommsDbWapWspOption.
198 EApWapSecurity, ///< Attepmt secure WTLS connection to
201 // WAP IP Bearer Table
203 EApWapIsp, ///< Identifier of the ISP to use if this
204 ///< is an ISP type database
206 EApWapChargecard, ///< Identifier for the chargecard to use
207 ///< if this is an ISP type database
208 EApWapIap, ///< Identifier of a record in the IAP
209 ///< table to be used if this is an IAP
212 EApWapIspType, ///< Enum value indicating whether IAP/ISP
213 ///< is a dial in or a dial out
215 // WAP SMS Bearer Table
216 // EApSmsWapGatewayAddress is mapped to EApWapGatewayAddress,
217 // different enum needed only for being able to
218 // distinguish when editing...
221 EApIapName, ///< The name of this IAP
222 EApIapServiceType, ///< Name of service table in this IAP
223 EApIapServiceId, ///< Identifier of service in this IAP
224 EApIapChargecard, ///< Identifier of the chargecard in
228 EApIspName, ///< The name of this ISP
229 EApIspDescription, ///< Application's description of this ISP
230 EApIspIspType, ///< Enum value indicating ISP type, e.g.
231 ///< Internet ISP, WAP Isp.TCommsDbIspType.
232 EApIspDefaultTelNumber, ///< Default phone number
233 EApIspDialResolution, ///< Perform dialing resolution for default
235 EApIspUseLoginScript, ///< Use login script?
236 EApIspLoginScript, ///< Login script (used only if Use Login
237 ///< Script is true), LONG TEXT.
238 EApIspPromptForLogin, ///< Prompt user for username and password?
239 EApIspLoginName, ///< Login name
240 EApIspLoginPass, ///< Login password
241 EApIspDisplayPCT, ///< Display PCT (without scanning script
242 ///< for READ command) UNUSED, always FALSE
243 EApIspIfName, ///< Interface name
244 EApIspIfParams, ///< Interface parameter string
245 EApIspIfNetworks, ///< Comma separated list of network
247 EApIspIfPromptForAuth, ///< Prompt user for authentication
248 ///< username and password?
249 EApIspIfAuthName, ///< Authentication username used by PPP
250 EApIspIfAuthPass, ///< Authentication password used by PPP
251 EApIspAuthRetries, ///< Number of times to retry
252 ///< authentication if it fails
253 EApIspIfCallbackEnabled, ///< Is callback enabled?
254 EApIspIfCallbackType, ///< Enum value indicating the type of
255 ///< callback (if enabled).
256 ///< enum TCallbackAction.
257 EApIspIfCallbackInfo, ///< Info for callback request (if enabled)
258 ///< 8-bit text field.
259 EApIspCallBackTimeOut, ///< Time to wait for callback in
260 ///< microseconds (if enabled)
261 EApIspIPAddrFromServer, ///< Get IP address from server?
262 EApIspIPAddr, ///< IP address of interface
263 EApIspIPNetMask, ///< IP net mask of interface
264 EApIspIPGateway, ///< IP address of gateway
265 EApIspIPDnsAddrFromServer, ///< Get DNS address from server?
266 EApIspIPNameServer1, ///< IP address of primary name server
267 EApIspIPNameServer2, ///< IP address of secondary name server
268 EApIspEnableIpHeaderComp, ///< Enable IP header compression?
269 EApIspEnableLCPExtensions, ///< Enable LCP extensions?
270 EApIspDisablePlainTextAuth, ///< Disable plain text authentication?
271 EApIspEnableSWCompression, ///< Enable software compression?
272 EApIspBearerName, ///< Enum value specifying the name of the
273 ///< bearer, e.g. Asunchronous Modem,
274 ///< RBasicGsmCall::TBearerName
275 EApIspBearerSpeed, ///< Enum value specifying the bearer speed
277 EApIspBearerCallTypeIsdn, ///< call type is ISDN or Analogue...
278 EApIspBearerCE, ///< Enum value specifying the bearer CE,
279 ///< RBasicGsmCall::TBearerCE
280 EApIspInitString, ///< Modem initialization string to be used
281 ///< when this ISP is in use.This string
282 ///< will be copied into the
283 ///< MODEM_ISP_INIT_STRING field by
284 ///< NetDial. 8-bit text field.
285 EApIspBearerType, ///< Enum value indicating connection type
286 ///< (CSD or HSCSD), TCommsDbBearerType
287 EApIspChannelCoding, ///< Enum value specifying HSCSD channel
289 EApIspAIUR, ///< Enum value specifying AIUR for HSCSD
290 EApIspRequestedTimeSlots, ///< Requested number of time slots for
292 EApIspMaximumTimeSlots, ///< Maximum number of time slots for HSCSD
293 ///< which could be requested during this
296 EApGprsAccessPointName, ///< Access Point Name, LONG TEXT!
297 EApGprsPdpType, ///< PDP type
298 EApGprsPdpAddress, ///< PDP address
299 EApGprsReqPrecedence, ///< Requested quality of service
300 ///< precedence class
301 EApGprsReqDelay, ///< Requested quality of service
303 EApGprsReqReliability, ///< Requested quality of service
304 ///< reliability class
305 EApGprsReqPeakThroughput, ///< Requested quality of service
306 ///< peak throughput class
307 EApGprsReqMeanPeakThroughput, ///< Requested quality of service
308 ///< mean throughput class
309 EApGprsMinPrecedence, ///< Minimum quality of service
310 ///< precedence class
311 EApGprsMinDelay, ///< Minimum quality of service
313 EApGprsMinReliability, ///< Minimum quality of service
314 ///< reliability class
315 EApGprsMinPeakThroughput, ///< Minimum quality of service
316 ///< peak throughput class
317 EApGprsMinMeanThroughput, ///< Minimum quality of service
318 ///< mean throughput class
319 EApGprsUseAnonymAccess, ///< Use anonymous access on?
321 // followings are mapped to ISP... fields
322 EApGprsDataCompression, ///< Data compression on?
323 EApGprsHeaderCompression, ///< IP header compression on?
324 EApGprsIfName, ///< Interface name
325 EApGprsIfParams, ///< Interface parameter string
326 EApGprsIfNetworks, ///< Comma separated list of network
328 EApGprsIfPromptForAuth, ///< Prompt user for authentication
329 ///< username and password?
330 EApGprsIfAuthName, ///< Authentication username used by PPP
331 EApGprsIfAuthPassword, ///< Authentication password used by PPP
332 EApGprsIfAuthRetries, ///< Number of times to retry
333 ///< authentication if it fails
334 EApGprsIpNetMask, ///< IP net mask of interface
335 EApGprsIpGateway, ///< IP address of gateway
336 EApGprsIpAddrFromServer, ///< Get IP adresses (for Symbian OS)
338 EApGprsIpAddr, ///< IP address of Symbian OS
339 EApGprsIpDnsAddrFromServer, ///< Get DNS addresses from server?
340 EApGprsIPNameServer1, ///< IP address of primary name server
341 EApGprsIPNameServer2, ///< IP address of secondary name server
342 EApGprsEnableLCPExtensions, ///< Enable LCP extension?
343 EApGprsDisablePlainTextAuth, ///< Disable plain text authentication?
344 EApIsReadOnly ///< Is the current record read only?
347 // expanding this enum is safe and will not cause any trouble as all public
348 // part of this module uses it as a const parameter and NEVER as
349 // a return value, therefore non-aware clients will NEVER meet with the new
350 // ones, thus it can not cause any problems that they do not expect them...
352 EApProxyServerAddress, ///< Proxy server address, long text
353 EApProxyProtocolName, ///< Proxy protocol name, Text
354 EApProxyPortNumber, ///< Proxy port number, TUint32
355 EApProxyUseProxy, ///< Use proxy server?, TBool
356 EApProxyExceptions, ///< ';' separated list of addr. for wich
357 ///< the server should not be used.
359 EApHasProxySettings, ///< Has proxy settings? READ ONLY.
360 EApNetworkID, ///< The network ID
361 EApNetworkName, ///< The network name
363 EApWapProxyPort, ///< The wap proxy port number
364 EApProxyLoginName, ///< The proxy login name
365 EApProxyLoginPass, ///< The proxy login password
366 EApIapBearerService, ///< Bearer service
368 EApIP6DNSAddrFromServer, ///< Get IPv6 DNS addresses from server?
369 EApIP6NameServer1, ///< IP address of primary name server
370 EApIP6NameServer2, ///< IP address of secondary name server
373 EApCdmaIwfName, ///< IWF name, Text
374 EApCdmaServiceOption, ///< Service Option, TUint32
375 EApCdmaPdpType, ///< PDP type, TUin32
376 EApCdmaPdpAddress, ///< PDP address, Text
377 EApCdmaReqFwdPriority, ///< Requested forward priority, TUint32
378 EApCdmaReqRevPriority, ///< Requested reverse priority, TUint32
379 EApCdmaReqFwdBitrate, ///< Requested forward bitrate, TUint32
380 EApCdmaReqRevBitrate, ///< Requested reverse bitrate, TUint32
381 EApCdmaReqFwdLoss, ///< Req. forward frame loss rate, TUint32
382 EApCdmaReqRevLoss, ///< Req. reverse frame loss rate, TUint32
383 EApCdmaReqFwdMaxDelay, ///< Requested forward delay, TUint32
384 EApCdmaReqRevMaxDelay, ///< Requested reverse delay, TUint32
385 EApCdmaMinFwdBitrate, ///< Min. acceptable fwd bitrate, TUint32
386 EApCdmaMinRevBitrate, ///< Min. acceptable rev bitrate, TUint32
387 EApCdmaAccptFwdLoss, ///< Max. acc. fwd frame loss rate, TUint32
388 EApCdmaAccptRevLoss, ///< Max. acc. rev frame loss rate, TUint32
389 EApCdmaAccptFwdMaxDelay, ///< Max. acceptable forward delay, TUint32
390 EApCdmaAccptRevMaxDelay, ///< Max. acceptable reverse delay, TUint32
392 // CDMA2000, mapped to ISP... fields
393 EApCdmaDataCompression, ///< Data compression on? TBool
394 EApCdmaHeaderCompression, ///< IP header compression on? TBool
395 EApCdmaAnonymousAccess, ///< Use anonymous access on? TBool
396 EApCdmaIfName, ///< Interface name
397 EApCdmaIfParams, ///< Interface parameter string
398 EApCdmaIfNetworks, ///< Comma separated list of network
400 EApCdmaIfPromptForAuth, ///< Prompt user for authentication
401 ///< username and password?
402 EApCdmaIfAuthName, ///< Authentication username used by PPP
403 EApCdmaIfAuthPassword, ///< Authentication password used by PPP
404 EApCdmaIfAuthRetries, ///< Number of times to retry
405 ///< authentication if it fails
406 EApCdmaIpNetMask, ///< IP net mask of interface
407 EApCdmaIpGateway, ///< IP address of gateway
408 EApCdmaIpAddrFromServer, ///< Get IP adresses (for Symbian OS)
410 EApCdmaIpAddr, ///< IP address of Symbian OS
411 EApCdmaIpDnsAddrFromServer, ///< Get DNS addresses from server?
412 EApCdmaIPNameServer1, ///< IP address of primary name server
413 EApCdmaIPNameServer2, ///< IP address of secondary name server
414 EApCdmaEnableLCPExtensions, ///< Enable LCP extension?
415 EApCdmaDisablePlainTextAuth, ///< Disable plain text authentication?
418 EApCdmaApType, ///< Internet / WAP or both? TUint32
419 EApCdmaQosWarningTimeout, ///< Notify user if the requested QOS
420 ///< cannot be satisfied for this time in
421 ///< microseconds, TUint32
422 EApCdmaRlpMode, ///< Transparent or non-transparent
423 ///< radio link protocol, TUint32
424 // CDMA2000 deprecated Mobile IP fields
425 EApCdmaMip, ///< Attempt to use mobile IP, TBool
426 EApCdmaHomeAgentAddress, ///< Home Agent address, Text
427 EApCdmaMipTimeout, ///< A normal reconnect (informing the
428 ///< user) takes place if both the PPP link
429 ///< drops and a change in SID or NID is
430 ///< received within this time in
431 ///< milliseconds, TUint32
432 // CDMA2000 specific CDMA parameters provisioned through OTA and defined
433 // in TIA-683B section 3.5.8
434 // These fields replace the old Mobile IP fields (above).
435 EApCdmaNaiType, ///< Type of NAI, TUint32
436 EApCdmaSimpleIpAuthAlgorithm, ///< SimpleIP auth.algorithm, TUint32
437 EApCdmaSimpleIpPapSsHandle, ///< SimpleIP PAP shared secret handle,
439 EApCdmaSimpleIpChapSsHandle, ///< SimpleIP CHAP shared secret handle,
441 EApCdmaMipTBit, ///< Reverse-tunneling reqd flag, TUint32
442 EApCdmaMipHomeAddress, ///< Home address, Text
443 EApCdmaMipPrimaryHomeAgent, ///< IP address of mobile node's
444 ///< primary home agent, Text
445 EApCdmaMipSecondaryHomeAgent, ///< IP address of mobile node's
446 ///< secondary home agent, Text
447 EApCdmaMipMnAaaAuthAlgorithm, ///< MN-AAA auth algorithm, TUint32
448 EApCdmaMipMnAaaSpi, ///< MN-AAA security param index, TUint32
449 EApCdmaMipMnAaaSsHandle, ///< MN-AAA shared secret handle, TUint32
450 EApCdmaMipMnHaAuthAlgorithm, ///< MN-HA auth algorithm, TUint32
451 EApCdmaMipMnHaSpi, ///< MN-HA security param index, TUint32
452 EApCdmaMipMnHaSsHandle, ///< MN-HA shared secret handle, TUint32
455 // WLAN specific fields
456 EApWlanNetworkName, ///< The network name, Text
457 EApWlanNetworkMode, ///< Gives network mode, TUint32
458 EApWlanSecurityMode, ///< The security mode, TUint32
460 // WLAN, mapped to ISP... fields
461 EApWlanIfNetworks, ///< Comma separated list of network
463 EApWlanIfPromptForAuth, ///< Prompt user for authentication
464 ///< username and password?
465 EApWlanIfAuthName, ///< Authentication username used by PPP
466 EApWlanIfAuthPassword, ///< Authentication password used by PPP
467 EApWlanIfAuthRetries, ///< Number of times to retry
468 ///< authentication if it fails
469 EApWlanIpNetMask, ///< IP net mask of interface
470 EApWlanIpGateway, ///< IP address of gateway
471 EApWlanIpAddrFromServer, ///< Get IP adresses (for Symbian OS)
473 EApWlanIpAddr, ///< IP address of Symbian OS
474 EApWlanIpDnsAddrFromServer, ///< Get DNS addresses from server?
475 EApWlanIPNameServer1, ///< IP address of primary name server
476 EApWlanIPNameServer2, ///< IP address of secondary name server
477 EApWlanSettingsId, ///< COMMDB_ID of the WLAN settings,
479 EApWlanScanSSID, ///< TBool, whether need to scan the SSID
480 EApWlanChannelId, ///< In ad-hoc network mode, the channel
482 EApLanBearerName, ///< The name of the LAN bearer
483 EApIapBearerID, ///< UID of the bearer record (LAN/Modem)
484 EApIapBearerType, ///< The name of the iap bearer
485 ///< table (LAN/Modem)
486 // some defines for UI ONLY, NOT TO BE USED BY ANYONE ELSE!!!
487 EApIpv4Settings = 0x00010000,
489 EApWlanSecuritySettings ///< The security settings launcher
495 // D E P R E C A T E D, please do not use it!!!!!!!!!!
496 // can not remove as it was part of the public API...
497 const TInt KApMemberNum = EApGprsDisablePlainTextAuth+1;
506 * CApAccessPointItem is used to exchange data between engine and client.
507 * It holds the information for an access point including WAP, IAP, ISP
508 * (if present & applies).
509 * This class uses the same approach as CommDB to read and write data: it
510 * has functions for each data type implemented. To read or write the data,
511 * we have to know the data type and the enum name of the 'column'.
512 * The column values has the names of the database columns with the 'EAp'
513 * prefix. The reason for this (not using the database column descriptors)
514 * is performance. It is much faster to compare enum values than literals.
516 class CApAccessPointItem :public CBase
519 public: // Constructors and destructor
521 * Two-phased constructor. Leaves on failure, places instance
522 * on cleanup stack. Instance is initialised to default values.
523 * The created instance is suitable for passing to CApDataHandler's
524 * functions, contains all necessary information.
525 * @return The constructed CApAccessPointItem.
529 IMPORT_C static CApAccessPointItem* NewLC();
537 IMPORT_C virtual ~CApAccessPointItem();
541 * Copies the data from another CApAccessPointItem.
542 * Substitute for the "assignment operator". It requires allocation
544 * Wap Access Point Uid is not copied.
548 IMPORT_C void CopyFromL( const CApAccessPointItem& aCopyFrom );
552 * Equality operator. Wap Access Point Uid is not counted.
556 IMPORT_C TBool operator==( const CApAccessPointItem& aitem ) const;
560 * Inequality operator. Wap Access Point Uid is not counted.
564 IMPORT_C TBool operator!=( const CApAccessPointItem& aitem ) const;
567 protected: // Constructors
570 * C++ default constructor.
574 IMPORT_C CApAccessPointItem();
577 * Second-phase constructor.
581 IMPORT_C void ConstructL();
586 public: // New functions
590 * This function reads up an 8-bit text value from the specified column.
591 * @param aColumn Enum value indicating the column to read.
592 * @param aValue Reference to an 8-bit descriptor to hold the value
593 * @return no return value
597 IMPORT_C void ReadTextL( const TApMember aColumn, TDes8& aValue );
600 * This function reads up a 16-bit text value from the specified column.
601 * @param aColumn Enum value indicating the column to read.
602 * @param aValue Reference to a 16-bit descriptor to hold the value
603 * @return no return value
607 IMPORT_C void ReadTextL( const TApMember aColumn, TDes16& aValue );
610 * NOTE: This function is deprecated. Use ReadConstLongTextL!
611 * This function reads up a long text value from the specified column.
612 * The ownership is not passed to the caller. It means that the caller
613 * should not delete the received value.
614 * If the caller must take the ownership for any reason, must make a
615 * copy and use that and delete the copy when no longer needed.
616 * @param aColumn Enum value indicating the column to read.
617 * @return A HBufC* to the value.
621 IMPORT_C HBufC* ReadLongTextL( const TApMember aColumn );
625 * This function reads up a long text value from the specified column.
626 * The ownership is not passed to the caller. It means that the caller
627 * should not delete the received value.
628 * If the caller must take the ownership for any reason, must make a
629 * copy and use that and delete the copy when no longer needed.
630 * @param aColumn Enum value indicating the column to read.
631 * @return A const HBufC* to the value.
635 IMPORT_C const HBufC* ReadConstLongTextL( const TApMember aColumn );
640 * This function reads the length of the text in the specified column.
641 * @param aColumn Enum value indicating the column to read.
642 * @return The length of the text in that column.
646 IMPORT_C TUint32 ReadTextLengthL( const TApMember aColumn );
650 * This function reads up a TUint32 value from the specified column.
651 * In case the given value was not written to the database,
652 * it will return KErrValueUnspecified.
653 * If the specified column does not exist (that is, not part of the
654 * database structure), it will Panic in debug builds and it will
655 * return KErrInvalidColumn in release builds without Panicking.
656 * Panic is used in debug builds because it indicates a programming
657 * error. In release, it 'notifies' the caller about the error through
658 * the return value but enables system to continue operation.
659 * @param aColumn Enum value indicating the column to read.
660 * @param aValue A reference to a TUint32 to hold the value
661 * @return Error code.
665 IMPORT_C TInt ReadUint( const TApMember aColumn, TUint32& aValue );
668 * This function reads up a boolean value from the specified column.
669 * If the specified column does not exist (that is, not part of the
670 * database structure), it will Panic in debug builds and it will
671 * return KErrInvalidColumn in release builds without Panicking.
672 * Panic is used in debug builds because it indicates a programming
673 * error. In release, it 'notifies' the caller about the error through
674 * the return value but enables system to continue operation.
675 * @param aColumn Enum value indicating the column to read.
676 * @param aValue A reference to a boolean to hold the value
677 * @return Error code.
681 IMPORT_C TInt ReadBool( const TApMember aColumn, TBool& aValue );
686 * This function writes an 8-bit text value to the specified column.
687 * If the specified column does not exist (that is, not part of the
688 * database structure), it will Panic in debug builds and it will
689 * return KErrInvalidColumn in release builds without Panicking.
690 * Panic is used in debug builds because it indicates a programming
691 * error. In release, it 'notifies' the caller about the error through
692 * the return value but enables system to continue operation.
693 * This function can Leave if the copying of the text does not succeed.
694 * Possible leave codes are the system leave codes.
695 * @param aColumn Enum value indicating the column to write.
696 * @param aValue Reference to an 8-bit text descriptor to the value
697 * @return Error code.
701 IMPORT_C TInt WriteTextL( const TApMember aColumn,
702 const TDesC8& aValue );
705 * This function writes a 16-bit text value to the specified column.
706 * If the specified column does not exist (that is, not part of the
707 * database structure), it will Panic in debug builds and it will
708 * return KErrInvalidColumn in release builds without Panicking.
709 * Panic is used in debug builds because it indicates a programming
710 * error. In release, it 'notifies' the caller about the error through
711 * the return value but enables system to continue operation.
712 * This function can Leave if the copying of the text does not succeed.
713 * @param aColumn Enum value indicating the column to write.
714 * @param aValue Reference to a 16-bit text descriptor to the value
715 * @return Error code.
719 IMPORT_C TInt WriteTextL( const TApMember aColumn,
720 const TDesC16& aValue );
723 * This function writes a long text value to the specified column.
724 * If the specified column does not exist (that is, not part of the
725 * database structure), it will Panic in debug builds and it will
726 * return KErrInvalidColumn in release builds without Panicking.
727 * Panic is used in debug builds because it indicates a programming
728 * error. In release, it 'notifies' the caller about the error through
729 * the return value but enables system to continue operation.
730 * This function can Leave if the copying of the text does not succeed.
731 * @param aColumn Enum value indicating the column to write.
732 * @param aValue Reference to a 16-bit text descriptor to the value
733 * @return Error code.
737 IMPORT_C TInt WriteLongTextL( const TApMember aColumn,
738 const TDesC& aValue );
741 * This function writes a TUint32 value to the specified column.
742 * If the specified column does not exist (that is, not part of the
743 * database structure), it will Panic in debug builds and it will
744 * return KErrInvalidColumn in release builds without Panicking.
745 * Panic is used in debug builds because it indicates a programming
746 * error. In release, it 'notifies' the caller about the error through
747 * the return value but enables system to continue operation.
748 * @param aColumn Enum value indicating the column to write.
749 * @param aValue A const reference to a TUint32 value
750 * @return Error code.
754 IMPORT_C TInt WriteUint( const TApMember aColumn,
755 const TUint32& aValue );
758 * This function writes a boolean value to the specified column.
759 * If the specified column does not exist (that is, not part of the
760 * database structure), it will Panic in debug builds and it will
761 * return KErrInvalidColumn in release builds without Panicking.
762 * Panic is used in debug builds because it indicates a programming
763 * error. In release, it 'notifies' the caller about the error through
764 * the return value but enables system to continue operation.
765 * @param aColumn Enum value indicating the column to write.
766 * @param aValue A const reference to a boolean value
767 * @return Error code.
771 IMPORT_C TInt WriteBool( const TApMember aColumn,
772 const TBool& aValue );
778 * This function returns the ID of the access point
779 * @return The ID of this access point
783 IMPORT_C TUint32 WapUid() const;
787 * This function returns the name of the connection
788 * Ownership is not passed.
789 * @return The name of the connection
793 IMPORT_C const TDesC& ConnectionName() const;
798 * This function returns the current WAP bearer for the access point
799 * Ownership is not passed.
800 * @return The current WAP bearer for the access point
804 IMPORT_C const TDesC& WapBearer() const;
808 * This function returns the bearer type for the current access point
809 * @return The current bearer type for the access point
813 IMPORT_C TApBearerType BearerTypeL();
817 * This function sets the bearer type for the current access point
818 * @param aBearer TApBearerType enum indicating the desired bearer type.
819 * @return No return value.
823 IMPORT_C void SetBearerTypeL( TApBearerType aBearer );
827 * This function writes a 16-bit text value to the 'name' fields
828 * of the access point.
829 * This includes: WAP_ACCESS_POINT, IAP, Dial/in/out/Gprs In/Out
830 * table's COMM_DB_NAME fields.
831 * These fields are (by TApMember): EApWapAccessPointName, EApIapName,
833 * It is useful if we need to use same names.
834 * @param aValue A const reference to a 16-bit text descriptor to
836 * @return No return value.
840 IMPORT_C void SetNamesL( const TDesC16& aValue );
844 * This function checks the integrity of the CApAccessPointItem.
846 * IF WAP_IP_BEARER, WAP_ISP_TYPE conforms to IAP_SERVICE_TYPE
847 * @return Boolean indicating whether the sanity check has
848 * passed(ETrue) or not(EFalse)
852 IMPORT_C TBool SanityCheckOk();
856 * This function compares this and the passed CApAccessPointItem
857 * whether they have the same ISP and bearer
858 * Returns true if the APs have the same phone number
859 * @param aItem a CApAccessPointItem to compare with
860 * @return whether the APs have the same isp and bearer
864 IMPORT_C TBool HasSameIspAndBearerL( CApAccessPointItem& aItem );
867 * This function returns whether the access point is read-only or not.
868 * @return Whether the current access point is read-only or not.
872 IMPORT_C TBool IsReadOnly() const;
874 public: // public, not exported, available only inside the ApEngine dll
876 * Returnes whether the given access point is a VPN ap or not.
878 TBool IsVpnAp() const;
881 * Sets the current access point as VPN or as normal AP.
883 * @param aIsVpn a TBool specifiyng that the current AP is VPN or not.
885 void SetVpnAp( TBool aIsVpn );
889 * Returns whether a given member is specified (after reading it from
891 * @param aMember The member we would like to knopw if it is specified
893 * @return whether a given member is specified (after reading it from
896 TBool Specified( TApMember aMember );
899 * Sets a given member as specified or not
900 * @param aMember The member to set
901 * @param aOn The value to set
903 void Specify( TApMember aMember, TBool aOn );
906 * Sets all WAP member as specified or not
907 * @param aOn The value to set
909 void SpecifyWap( TBool aOn );
912 * Sets all IP bearer member as specified or not
913 * @param aOn The value to set
915 void SpecifyIpBearer( TBool aOn );
918 * Sets all IAP member as specified or not
919 * @param aOn The value to set
921 void SpecifyIAP( TBool aOn );
924 * Sets all ISP member as specified or not
925 * @param aOn The value to set
927 void SpecifyISP( TBool aOn );
930 * Sets all GPRS member as specified or not
931 * @param aOn The value to set
933 void SpecifyGPRS( TBool aOn );
936 * Sets all CDMA member as specified or not
937 * @param aOn The value to set
939 void SpecifyCDMA( TBool aOn );
942 * Sets all WLAN member as specified or not
943 * @param aOn The value to set
945 void SpecifyWLAN( TBool aOn );
948 * Sets all member as specified or not
949 * @param aOn The value to set
951 void SpecifyAll( TBool aOn );
954 * Sets iGetDNSIPFromServer according the currently valid iPrimaryDNS
955 * & iSecondaryDNS values. Called internally, after every setting of
956 * the above two values
958 void SetDnsIpFromServer();
961 * Sets iIspIPAddrFromServer according the currently valid iIspIPAddr
962 * value. Called internally, after every setting of iIspIPAddr values
964 void SetIpFromServer();
968 * Sets iExt->iIpv6GetDNSIPFromServer according the currently valid
969 * iExt->iIpv6PrimaryDNS & iExt->iIpv6SecondaryDNS values.
970 * Called internally, after every setting of the above two values
972 void SetDns6IpFromServer();
976 * Reallocates a passed 16-bit descriptor. Passed descriptor is deleted,
977 * new one is AllocL-ed
978 * Passed descriptor MUST NOT BE on the CleanupStack
979 * @param aDes The descriptor to hold the value
980 * @param aValue The value to pass to the aDes descriptor.
982 void ReAllocL(HBufC*& aDes, const TDesC16& aValue);
985 * Reallocates a passed 8-bit descriptor. Passed descriptor is deleted,
986 * new one is AllocL-ed
987 * Passed descriptor MUST NOT BE on the CleanupStack
988 * @param aDes The descriptor to hold the value
989 * @param aValue The value to pass to the aDes descriptor.
991 void ReAllocL(HBufC8*& aDes, const TDesC8& aValue);
995 * Compares THIS and the passed aItem.
996 * @param aItem The item to compare this to
997 * @return Whether the item is equal with this or not
999 TBool DoCompareApL( const CApAccessPointItem& aItem ) const;
1003 * Compares the WAP part of THIS and the passed aItem.
1004 * Does not compares IAP ID
1005 * @param aItem The item to compare this to
1006 * @return Whether the WAP part is equal with this or not
1008 TBool CompareWap( const CApAccessPointItem& aItem ) const;
1012 * Compares the IAP part of THIS and the passed aItem.
1013 * @param aItem The item to compare this to
1014 * @return Whether the IAP part is equal with this or not
1016 TBool CompareIap( const CApAccessPointItem& aItem ) const;
1020 * Compares the IsP part of THIS and the passed aItem.
1021 * @param aItem The item to compare this to
1022 * @return Whether the ISP part is equal with this or not
1024 TBool CompareIsp( const CApAccessPointItem& aItem ) const;
1028 * Compares the Gprs part of THIS and the passed aItem.
1029 * @param aItem The item to compare this to
1030 * @return Whether the GPRS part is equal with this or not
1032 TBool CompareGprs( const CApAccessPointItem& aItem ) const;
1036 * Compares the Cdma part of THIS and the passed aItem.
1037 * @param aItem The item to compare this to
1038 * @return Whether the CDMA part is equal with this or not
1040 TBool CompareCdma( const CApAccessPointItem& aItem ) const;
1044 * Compares the Wlan part of THIS and the passed aItem.
1045 * @param aItem The item to compare this to
1046 * @return Whether the WLAN part is equal with this or not
1048 TBool CompareWlan( const CApAccessPointItem& aItem ) const;
1052 * Removes leading 0s from the passed IP address.
1053 * @param aValue A descriptor holding the IP address to remove
1055 * @return A newly allocated HBufC holding the resulting string.
1057 HBufC* GetCleanIpAddressLC( const TDesC& aValue );
1062 * Removes invalid chars e.g. space, () from the passed phone number.
1063 * (valid are 0,1,2,..9,p,w,+,*,#)
1064 * Strips pre- and postfixes, prefix separator is#,
1065 * postfix separators are p, w or +
1066 * @param aValue A descriptor holding the phone number
1067 * @return A newly allocated HBufC holding the resulting string.
1069 HBufC* GetPlainPhoneNumberLC( const TDesC& aNumber );
1073 * Compares the 'default phone number' (ISP dial-in number) of this
1074 * and the passed CApAccessPointItem
1075 * @param aItem The item to compare this to
1076 * @return a TBool indicating whether the phone numbers are
1079 TBool IsSamePhoneNumberL( CApAccessPointItem& aItem );
1083 * Removes invalid chars from the passed phone number
1084 * @param aIntext Text to remove invalid characters from phone number
1085 * @return a HBufC holding the new text
1087 HBufC* RemoveInvalidPhoneCharsLC( const TDesC16& aInText );
1091 * Removes invalid chars from the passed text
1092 * Invalid chars are: TAB
1093 * @param aIntext Text to remove invalid characters from
1094 * @return a HBufC16 holding the new text
1096 HBufC* RemoveInvalidCharsLC( const TDesC16& aInText );
1100 * Removes invalid chars from the passed text
1101 * Invalid chars are: TAB
1102 * @param aIntext Text to remove invalid characters from
1103 * @return a HBufC8 holding the new text
1105 HBufC8* RemoveInvalidCharsLC( const TDesC8& aInText );
1109 * Compares the proxy data of this and the passed CApAccessPointItem.
1110 * @param aItem The item to compare this to
1111 * @return Whether the Proxy part is equal with this or not
1113 TBool CompareProxy( const CApAccessPointItem& aItem ) const;
1117 * Returns whether the Ap has proxy data or not.
1118 * @return Whether the Ap has proxy data or not.
1120 TBool HasProxy() const;
1124 * Sets the proxy flag.
1126 void SetProxyFlag();
1130 * Limits the speed after changing e.g. bearer type
1136 * Sets the IfNetworks value according to the bearer type and
1137 * the IPv6 support availability. The required values are:
1139 * GPRS/CDMA, pdptype ipv4 "ip",
1143 * GPRS/CDMA, pdptype ipv4 "ip",
1144 * GPRS/CDMA, pdptype ipv6 "ip6",
1149 void SetIfNetworksL();
1153 * Check if aColumn is supported.
1154 * @param aColumn Enum value indicating the column to check.
1155 * @return Whether the given member is supported or not
1157 TBool IsSupported( TApMember aColumn );
1161 * Leave with KErrNotSupported if aColumn is not supported.
1162 * @param aColumn Enum value indicating the column to check.
1164 void LeaveIfUnsupportedL( TApMember aColumn );
1168 * Returns whether this item has WLAN or not
1169 * @return Whether this item has WLAN or not
1175 * Limit the Ip6 DNS address
1176 * In case of CSD, HSCSD, only Well-known and User defined is supported,
1177 * so if the bearer is changed from something else to these bearer
1178 * types, the possible 'Dynamic' should be replaced with Well-known
1180 void LimitIp6DNSL();
1186 TUint32 iWapUid; ///< The unique identifier of the AP record.
1187 HBufC* iWapAccessPointName;
1192 HBufC* iStartingPage;
1194 // common for bearers
1195 HBufC* iWapGatewayAddress; ///< The WAP gateway address
1196 TBool iIsWTLSSecurityOn;
1197 TUint32 iIsConnectionTypeContinuous;
1200 TUint32 iChargeCard;
1202 TUint32 iWapIspType; // deprecated, not used but kept
1203 // to keep member positions
1209 TUint32 iIapServiceId;
1210 HBufC* iIapServiceType;
1212 TUint32 iIapChargeCardId;
1216 HBufC* iIspDescription;
1217 TCommsDbIspType iIspType;
1218 HBufC* iIspDefaultTelNumber;
1219 TBool iIspDialResolution;
1220 TBool iUseLoginScript;
1221 HBufC* iLoginScript;
1222 TBool iPromptPassword;
1225 TBool iDisplayTerminalWindow;
1227 HBufC* iIspIfParams;
1228 HBufC* iIspIfNetworks;
1229 TBool iIspIfPromptForAuth;
1230 HBufC* iIspIfAuthName;
1231 HBufC* iIspIfAuthPass;
1232 TUint32 iIspIfAuthRetries;
1234 TCallbackAction iCallBackTypeIsServerNum;
1235 HBufC8* iIspIfCallbackInfo;
1236 TUint32 iIspCallbackTimeOut;
1237 TBool iIspIPAddrFromServer;
1239 HBufC* iIspIPNetMask;
1241 TBool iGetDNSIPFromServer;
1243 HBufC* iSecondaryDNS;
1244 TBool iEnablePPPCompression;
1245 TBool iIspEnableLCPExtensions;
1246 TBool iIsPasswordAuthenticationSecure;
1247 TBool iIspEnableSwCompression;
1248 /*****************************************************
1249 * Series 60 Customer / ETel
1250 * Series 60 ETel API
1251 *****************************************************/
1252 TInt iIspBearerName; // RMobileCall::TMobileCallDataServiceCaps
1253 TApCallSpeed iMaxConnSpeed;
1254 TApCallType iBearerCallTypeIsdn; //RMobileCall::TMobileCallDataProtocol
1255 TInt iIspBearerCE; // RMobileCall::TMobileCallDataQoS
1256 HBufC8* iIspInitString;
1257 TUint32 iIspBearerType;
1258 TUint32 iIspChannelCoding;
1260 TUint32 iIspRequestedTimeSlots;
1261 TUint32 iIspMaximumTimeSlots;
1264 HBufC* iGprsAccessPointName;
1265 TUint32 iGprsPdpType;
1266 HBufC* iGprsPdpAddress;
1267 TUint32 iGprsReqPrecedence;
1268 TUint32 iGprsReqDelay;
1269 TUint32 iGprsReqReliability;
1270 TUint32 iGprsReqPeakThroughput;
1271 TUint32 iGprsReqMeanPeakThroughput;
1272 TUint32 iGprsMinPrecedence;
1274 TUint32 iGprsMinDelay;
1275 TUint32 iGprsMinReliability;
1276 TUint32 iGprsMinPeakThroughput;
1277 TUint32 iGprsMinMeanThroughput;
1278 TBool iGprsUseAnonymAccess;
1280 CArrayFixFlat<TBool> *iSpecified;
1283 HBufC* iApProxyProtocolName;
1284 HBufC* iApProxyServerAddress;
1285 TUint32 iApProxyPortNumber;
1286 TBool iApProxyUseProxy;
1287 HBufC* iApProxyExceptions;
1288 TBool iApHasProxySettings;
1291 TUint32 iWapProxyPort;
1292 HBufC* iNetworkName;
1293 HBufC* iWapProxyLoginName;
1294 HBufC* iWapProxyLoginPass;
1295 TUint32 iApIapBearerService; // RMobileCall::TMobileCallDataServiceCaps
1299 protected: // Friend classes
1300 friend class CApDataHandler;
1305 #endif // ACCESSPOINTITEM_H