S60 3rd Edition API Reference: apaccesspointitem.h Source File

apaccesspointitem.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : ApAccessPointItem.h
00004 *  Part of  : Access Point Engine
00005 *
00006 *  Description: Declaration of the class CApAccessPointItem
00007 *  Version:
00008 *
00009 *  Copyright (C) 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 *
00019 * ============================================================================
00020 */
00021 
00022 #ifndef ACCESSPOINTITEM_H
00023 #define ACCESSPOINTITEM_H
00024 
00025 //  INCLUDES
00026 #include <etelmm.h>
00027 #include <cdbcols.h>
00028 #include <nifvar.h>
00029 #include <ApEngineVer.h>
00030 #include <ApEngineConsts.h>
00031 
00032 
00033 // DATA TYPES
00178 enum TApMember
00179     {
00180     // WAP Access Point Table
00181     EApWapAccessPointID,            
00182 
00183     EApWapAccessPointName,          
00184     EApWapCurrentBearer,            
00185 
00186     EApWapStartPage,                
00187 
00188     // WAP Common (present in both tables)
00189     EApWapGatewayAddress,           
00190     EApWapWspOption,                
00191 
00192 
00193 
00194     EApWapSecurity,                 
00195 
00196 
00197     // WAP IP Bearer Table
00198 //* DEPRECATED
00199     EApWapIsp,                      
00200 
00201 //* DEPRECATED
00202     EApWapChargecard,               
00203 
00204     EApWapIap,                      
00205 
00206 
00207 //* DEPRECATED
00208     EApWapIspType,                  
00209 
00210 
00211     // WAP SMS Bearer Table
00212     // EApSmsWapGatewayAddress is mapped to EApWapGatewayAddress,
00213     // different enum needed only for being able to
00214     // distinguish when editing...
00215 
00216     // IAP Table
00217     EApIapName,                     
00218     EApIapServiceType,              
00219     EApIapServiceId,                
00220     EApIapChargecard,               
00221 
00222 
00223     // ISP table
00224     EApIspName,                     
00225     EApIspDescription,              
00226     EApIspIspType,                  
00227 
00228     EApIspDefaultTelNumber,         
00229     EApIspDialResolution,           
00230 
00231     EApIspUseLoginScript,           
00232     EApIspLoginScript,              
00233 
00234     EApIspPromptForLogin,           
00235     EApIspLoginName,                
00236     EApIspLoginPass,                
00237     EApIspDisplayPCT,               
00238 
00239     EApIspIfName,                   
00240     EApIspIfParams,                 
00241     EApIspIfNetworks,               
00242 
00243     EApIspIfPromptForAuth,          
00244 
00245     EApIspIfAuthName,               
00246     EApIspIfAuthPass,               
00247     EApIspAuthRetries,              
00248 
00249     EApIspIfCallbackEnabled,        
00250     EApIspIfCallbackType,           
00251 
00252 
00253     EApIspIfCallbackInfo,           
00254 
00255     EApIspCallBackTimeOut,          
00256 
00257     EApIspIPAddrFromServer,         
00258     EApIspIPAddr,                   
00259     EApIspIPNetMask,                
00260     EApIspIPGateway,                
00261     EApIspIPDnsAddrFromServer,      
00262     EApIspIPNameServer1,            
00263     EApIspIPNameServer2,            
00264     EApIspEnableIpHeaderComp,       
00265     EApIspEnableLCPExtensions,      
00266     EApIspDisablePlainTextAuth,     
00267     EApIspEnableSWCompression,      
00268     EApIspBearerName,               
00269 
00270 
00271     EApIspBearerSpeed,              
00272 
00273     EApIspBearerCallTypeIsdn,       
00274     EApIspBearerCE,                 
00275 
00276     EApIspInitString,               
00277 
00278 
00279 
00280 
00281     EApIspBearerType,               
00282 
00283     EApIspChannelCoding,            
00284 
00285     EApIspAIUR,                     
00286     EApIspRequestedTimeSlots,       
00287 
00288     EApIspMaximumTimeSlots,         
00289 
00290 
00291 
00292     EApGprsAccessPointName,         
00293     EApGprsPdpType,                 
00294     EApGprsPdpAddress,              
00295     EApGprsReqPrecedence,           
00296 
00297     EApGprsReqDelay,                
00298 
00299     EApGprsReqReliability,          
00300 
00301     EApGprsReqPeakThroughput,       
00302 
00303     EApGprsReqMeanPeakThroughput,   
00304 
00305     EApGprsMinPrecedence,           
00306 
00307     EApGprsMinDelay,                
00308 
00309     EApGprsMinReliability,          
00310 
00311     EApGprsMinPeakThroughput,       
00312 
00313     EApGprsMinMeanThroughput,       
00314 
00315     EApGprsUseAnonymAccess,         
00316 
00317     // followings are mapped to ISP... fields
00318     EApGprsDataCompression,         
00319     EApGprsHeaderCompression,       
00320     EApGprsIfName,                  
00321     EApGprsIfParams,                
00322     EApGprsIfNetworks,              
00323 
00324     EApGprsIfPromptForAuth,         
00325 
00326     EApGprsIfAuthName,              
00327     EApGprsIfAuthPassword,          
00328     EApGprsIfAuthRetries,           
00329 
00330     EApGprsIpNetMask,               
00331     EApGprsIpGateway,               
00332     EApGprsIpAddrFromServer,        
00333 
00334     EApGprsIpAddr,                  
00335     EApGprsIpDnsAddrFromServer,     
00336     EApGprsIPNameServer1,           
00337     EApGprsIPNameServer2,           
00338     EApGprsEnableLCPExtensions,     
00339     EApGprsDisablePlainTextAuth,    
00340     EApIsReadOnly                   
00341 
00342 
00343 // expanding this enum is safe and will not cause any trouble as all public 
00344 // part of this module uses it as a const parameter and NEVER as 
00345 // a return value, therefore non-aware clients will NEVER meet with the new
00346 // ones, thus it can not cause any problems that they do not expect them...
00347     ,
00348     EApProxyServerAddress,          
00349     EApProxyProtocolName,           
00350     EApProxyPortNumber,             
00351     EApProxyUseProxy,               
00352     EApProxyExceptions,             
00353 
00354 
00355     EApHasProxySettings,            
00356     EApNetworkID,                   
00357     EApNetworkName,                 
00358 
00359     EApWapProxyPort,                
00360     EApProxyLoginName,              
00361     EApProxyLoginPass,              
00362     EApIapBearerService,            
00363 
00364     EApIP6DNSAddrFromServer,        
00365     EApIP6NameServer1,              
00366     EApIP6NameServer2,              
00367 
00368     // CDMA2000
00369     EApCdmaIwfName,                 
00370     EApCdmaServiceOption,           
00371     EApCdmaPdpType,                 
00372     EApCdmaPdpAddress,              
00373     EApCdmaReqFwdPriority,          
00374     EApCdmaReqRevPriority,          
00375     EApCdmaReqFwdBitrate,           
00376     EApCdmaReqRevBitrate,           
00377     EApCdmaReqFwdLoss,              
00378     EApCdmaReqRevLoss,              
00379     EApCdmaReqFwdMaxDelay,          
00380     EApCdmaReqRevMaxDelay,          
00381     EApCdmaMinFwdBitrate,           
00382     EApCdmaMinRevBitrate,           
00383     EApCdmaAccptFwdLoss,            
00384     EApCdmaAccptRevLoss,            
00385     EApCdmaAccptFwdMaxDelay,        
00386     EApCdmaAccptRevMaxDelay,        
00387 
00388     // CDMA2000, mapped to ISP... fields
00389     EApCdmaDataCompression,         
00390     EApCdmaHeaderCompression,       
00391     EApCdmaAnonymousAccess,         
00392     EApCdmaIfName,                  
00393     EApCdmaIfParams,                
00394     EApCdmaIfNetworks,              
00395 
00396     EApCdmaIfPromptForAuth,         
00397 
00398     EApCdmaIfAuthName,              
00399     EApCdmaIfAuthPassword,          
00400     EApCdmaIfAuthRetries,           
00401 
00402     EApCdmaIpNetMask,               
00403     EApCdmaIpGateway,               
00404     EApCdmaIpAddrFromServer,        
00405 
00406     EApCdmaIpAddr,                  
00407     EApCdmaIpDnsAddrFromServer,     
00408     EApCdmaIPNameServer1,           
00409     EApCdmaIPNameServer2,           
00410     EApCdmaEnableLCPExtensions,     
00411     EApCdmaDisablePlainTextAuth,    
00412 
00413     // CDMA2000
00414     EApCdmaApType,                  
00415     EApCdmaQosWarningTimeout,       
00416 
00417 
00418     EApCdmaRlpMode,                 
00419 
00420     // CDMA2000 deprecated Mobile IP fields
00421     EApCdmaMip,                     
00422     EApCdmaHomeAgentAddress,        
00423     EApCdmaMipTimeout,              
00424 
00425 
00426 
00427 
00428     // CDMA2000 specific CDMA parameters provisioned through OTA and defined
00429     // in TIA-683B section 3.5.8
00430     // These fields replace the old Mobile IP fields (above).
00431     EApCdmaNaiType,                 
00432     EApCdmaSimpleIpAuthAlgorithm,   
00433     EApCdmaSimpleIpPapSsHandle,     
00434 
00435     EApCdmaSimpleIpChapSsHandle,    
00436 
00437     EApCdmaMipTBit,                 
00438     EApCdmaMipHomeAddress,          
00439     EApCdmaMipPrimaryHomeAgent,     
00440 
00441     EApCdmaMipSecondaryHomeAgent,   
00442 
00443     EApCdmaMipMnAaaAuthAlgorithm,   
00444     EApCdmaMipMnAaaSpi,             
00445     EApCdmaMipMnAaaSsHandle,        
00446     EApCdmaMipMnHaAuthAlgorithm,    
00447     EApCdmaMipMnHaSpi,              
00448     EApCdmaMipMnHaSsHandle,         
00449     
00450 
00451     // WLAN specific fields
00452     EApWlanNetworkName,             
00453     EApWlanNetworkMode,             
00454     EApWlanSecurityMode,            
00455 
00456     // WLAN, mapped to ISP... fields
00457     EApWlanIfNetworks,              
00458 
00459     EApWlanIfPromptForAuth,         
00460 
00461     EApWlanIfAuthName,              
00462     EApWlanIfAuthPassword,          
00463     EApWlanIfAuthRetries,           
00464 
00465     EApWlanIpNetMask,               
00466     EApWlanIpGateway,               
00467     EApWlanIpAddrFromServer,        
00468 
00469     EApWlanIpAddr,                  
00470     EApWlanIpDnsAddrFromServer,     
00471     EApWlanIPNameServer1,           
00472     EApWlanIPNameServer2,           
00473     EApWlanSettingsId,              
00474 
00475     EApWlanScanSSID,                
00476     EApWlanChannelId,               
00477 
00478     EApLanBearerName,               
00479     EApIapBearerID,                 
00480     EApIapBearerType,               
00481 
00482     // some defines for UI ONLY, NOT TO BE USED BY ANYONE ELSE!!!
00483     EApIpv4Settings = 0x00010000,
00484     EApIpv6Settings,
00485     EApWlanSecuritySettings         
00486     };
00487 
00488 
00489 
00490 // CONSTANTS
00491 // D E P R E C A T E D,  please do not use it!!!!!!!!!!
00492 // can not remove as it was part of the public API...
00493 const TInt KApMemberNum = EApGprsDisablePlainTextAuth+1;
00494 
00495 // FORWARD
00496 class CApItemExtra;
00497 
00498 // CLASS DECLARATION
00499 
00500 
00512 class CApAccessPointItem :public CBase
00513     {
00514 
00515     public:  // Constructors and destructor
00524         IMPORT_C static CApAccessPointItem* NewLC();
00525 
00526 
00531         IMPORT_C virtual ~CApAccessPointItem();
00532 
00533 
00541         IMPORT_C void CopyFromL( const CApAccessPointItem& aCopyFrom  );
00542 
00543 
00548         IMPORT_C TBool operator==( const CApAccessPointItem& aitem ) const;
00549 
00550 
00555         IMPORT_C TBool operator!=( const CApAccessPointItem& aitem ) const;
00556 
00557 
00558     protected:      // Constructors
00559 
00564         IMPORT_C CApAccessPointItem();
00565 
00570         IMPORT_C void ConstructL();
00571 
00572 
00573 
00574 
00575     public: // New functions
00576 
00577 
00585         IMPORT_C void ReadTextL( const TApMember aColumn, TDes8& aValue );
00586 
00594         IMPORT_C void ReadTextL( const TApMember aColumn, TDes16& aValue );
00595 
00607         IMPORT_C HBufC* ReadLongTextL( const TApMember aColumn );
00608 
00609 
00620         IMPORT_C const HBufC* ReadConstLongTextL( const TApMember aColumn );
00621 
00622 
00623 
00630         IMPORT_C TUint32 ReadTextLengthL( const TApMember aColumn );
00631 
00632 
00648         IMPORT_C TInt ReadUint( const TApMember aColumn, TUint32& aValue );
00649 
00663         IMPORT_C TInt ReadBool( const TApMember aColumn, TBool& aValue );
00664 
00665 
00666         // Update
00682         IMPORT_C TInt WriteTextL( const TApMember aColumn,
00683                                 const TDesC8& aValue );
00684 
00699         IMPORT_C TInt WriteTextL( const TApMember aColumn,
00700                                 const TDesC16& aValue );
00701 
00716         IMPORT_C TInt WriteLongTextL( const TApMember aColumn,
00717                                     const TDesC& aValue );
00718 
00732         IMPORT_C TInt WriteUint( const TApMember aColumn,
00733                                 const TUint32& aValue );
00734 
00748         IMPORT_C TInt WriteBool( const TApMember aColumn,
00749                                 const TBool& aValue );
00750 
00751 
00752         // Query
00753         // COMMON
00759         IMPORT_C TUint32 WapUid() const;
00760 
00761 
00768         IMPORT_C const TDesC& ConnectionName() const;
00769 
00770 
00771         // WAP-spec.
00778         IMPORT_C const TDesC& WapBearer() const;
00779 
00780 
00786         IMPORT_C TApBearerType BearerTypeL();
00787 
00788 
00795         IMPORT_C void SetBearerTypeL( TApBearerType aBearer );
00796 
00797 
00811         IMPORT_C void SetNamesL( const TDesC16& aValue );
00812 
00813 
00822         IMPORT_C TBool SanityCheckOk();
00823 
00824 
00833         IMPORT_C TBool HasSameIspAndBearerL( CApAccessPointItem& aItem );
00834 
00840         IMPORT_C TBool IsReadOnly() const;
00841 
00842     public: // public, not exported, available only inside the ApEngine dll
00846         TBool IsVpnAp() const;
00847 
00853         void SetVpnAp( TBool aIsVpn );
00854 
00855     private:
00864         TBool Specified( TApMember aMember );
00865 
00871         void Specify( TApMember aMember, TBool aOn );
00872 
00877         void SpecifyWap( TBool aOn );
00878 
00883         void SpecifyIpBearer( TBool aOn );
00884 
00889         void SpecifyIAP( TBool aOn );
00890 
00895         void SpecifyISP( TBool aOn );
00896 
00901         void SpecifyGPRS( TBool aOn );
00902 
00907         void SpecifyCDMA( TBool aOn );
00908 
00913         void SpecifyWLAN( TBool aOn );
00914 
00919         void SpecifyAll( TBool aOn );
00920 
00926         void SetDnsIpFromServer();
00927 
00932         void SetIpFromServer();
00933 
00934 
00940         void SetDns6IpFromServer();
00941 
00942 
00950         void ReAllocL(HBufC*& aDes, const TDesC16& aValue);
00951 
00959         void ReAllocL(HBufC8*& aDes, const TDesC8& aValue);
00960 
00961 
00967         TBool DoCompareApL( const CApAccessPointItem& aItem ) const;
00968 
00969 
00976         TBool CompareWap( const CApAccessPointItem& aItem ) const;
00977 
00978 
00984         TBool CompareIap( const CApAccessPointItem& aItem ) const;
00985 
00986 
00992         TBool CompareIsp( const CApAccessPointItem& aItem ) const;
00993 
00994 
01000         TBool CompareGprs( const CApAccessPointItem& aItem ) const;
01001 
01002 
01008         TBool CompareCdma( const CApAccessPointItem& aItem ) const;
01009 
01010 
01016         TBool CompareWlan( const CApAccessPointItem& aItem ) const;
01017 
01018 
01025         HBufC* GetCleanIpAddressLC( const TDesC& aValue );
01026 
01027 
01028 
01037         HBufC* GetPlainPhoneNumberLC( const TDesC& aNumber );
01038 
01039 
01047         TBool IsSamePhoneNumberL( CApAccessPointItem& aItem );
01048 
01049 
01055         HBufC* RemoveInvalidPhoneCharsLC( const TDesC16& aInText );
01056 
01057 
01064         HBufC* RemoveInvalidCharsLC( const TDesC16& aInText );
01065 
01066 
01073         HBufC8* RemoveInvalidCharsLC( const TDesC8& aInText );
01074 
01075 
01081         TBool CompareProxy( const CApAccessPointItem& aItem ) const;
01082 
01083 
01088         TBool HasProxy() const;
01089 
01090 
01094         void SetProxyFlag();
01095 
01096 
01100         void LimitSpeedL();
01101 
01102 
01117         void SetIfNetworksL();
01118 
01119 
01125         TBool IsSupported( TApMember aColumn );
01126 
01127 
01132         void LeaveIfUnsupportedL( TApMember aColumn );
01133 
01134 
01139         TBool IsWlan();
01140 
01141 
01148         void LimitIp6DNSL();
01149 
01150 private:    // Data
01151 
01152         // member data
01153         // COMMON
01154         TUint32 iWapUid;        
01155         HBufC* iWapAccessPointName;
01156 
01157 
01158         // WAP-spec.
01159         HBufC* iWapBearer;
01160         HBufC* iStartingPage;
01161 
01162         // common for bearers
01163         HBufC* iWapGatewayAddress;  
01164         TBool iIsWTLSSecurityOn;
01165         TUint32 iIsConnectionTypeContinuous;
01166 
01167         CApItemExtra*   iExt;
01168         TUint32         iChargeCard;
01169         TUint32         iWapIap;
01170         TUint32         iWapIspType;    // deprecated, not used but kept 
01171                                         // to keep member positions
01172 
01173 
01174         // IAP-part
01175         HBufC* iIapName;
01176 
01177         TUint32 iIapServiceId;
01178         HBufC* iIapServiceType;
01179 
01180         TUint32 iIapChargeCardId;
01181 
01182         // ISP-part
01183         HBufC* iIspName;
01184         HBufC* iIspDescription;
01185         TCommsDbIspType  iIspType;
01186         HBufC* iIspDefaultTelNumber;
01187         TBool iIspDialResolution;
01188         TBool iUseLoginScript;
01189         HBufC* iLoginScript;
01190         TBool iPromptPassword;
01191         HBufC* iUserName;
01192         HBufC* iPassword;
01193         TBool iDisplayTerminalWindow;
01194         HBufC* iIspIfName;
01195         HBufC* iIspIfParams;
01196         HBufC* iIspIfNetworks;
01197         TBool iIspIfPromptForAuth;
01198         HBufC* iIspIfAuthName;
01199         HBufC* iIspIfAuthPass;
01200         TUint32 iIspIfAuthRetries;
01201         TBool iUseCallBack;
01202         TCallbackAction iCallBackTypeIsServerNum;
01203         HBufC8* iIspIfCallbackInfo;
01204         TUint32 iIspCallbackTimeOut;
01205         TBool iIspIPAddrFromServer;
01206         HBufC* iIspIPAddr;
01207         HBufC* iIspIPNetMask;
01208         HBufC* iIspGateway;
01209         TBool iGetDNSIPFromServer;
01210         HBufC* iPrimaryDNS;
01211         HBufC* iSecondaryDNS;
01212         TBool iEnablePPPCompression;
01213         TBool iIspEnableLCPExtensions;
01214         TBool iIsPasswordAuthenticationSecure;
01215         TBool iIspEnableSwCompression;
01216         /*****************************************************
01217         *   Series 60 Customer / ETel
01218         *   Series 60   ETel API
01219         *****************************************************/
01220         TInt    iIspBearerName; // RMobileCall::TMobileCallDataServiceCaps  
01221         TApCallSpeed iMaxConnSpeed;
01222         TApCallType iBearerCallTypeIsdn; //RMobileCall::TMobileCallDataProtocol
01223         TInt    iIspBearerCE; // RMobileCall::TMobileCallDataQoS 
01224         HBufC8* iIspInitString;
01225         TUint32 iIspBearerType;
01226         TUint32 iIspChannelCoding;
01227         TUint32 iIspAIUR;
01228         TUint32 iIspRequestedTimeSlots;
01229         TUint32 iIspMaximumTimeSlots;
01230 
01231         // GPRS part
01232         HBufC*  iGprsAccessPointName;
01233         TUint32 iGprsPdpType;
01234         HBufC*  iGprsPdpAddress;
01235         TUint32 iGprsReqPrecedence;
01236         TUint32 iGprsReqDelay;
01237         TUint32 iGprsReqReliability;
01238         TUint32 iGprsReqPeakThroughput;
01239         TUint32 iGprsReqMeanPeakThroughput;
01240         TUint32 iGprsMinPrecedence;
01241 
01242         TUint32 iGprsMinDelay;
01243         TUint32 iGprsMinReliability;
01244         TUint32 iGprsMinPeakThroughput;
01245         TUint32 iGprsMinMeanThroughput;
01246         TBool   iGprsUseAnonymAccess;
01247 
01248         CArrayFixFlat<TBool>    *iSpecified;
01249         TBool iIsReadOnly;
01250 
01251         HBufC*  iApProxyProtocolName;
01252         HBufC*  iApProxyServerAddress;
01253         TUint32 iApProxyPortNumber;
01254         TBool   iApProxyUseProxy;
01255         HBufC*  iApProxyExceptions;
01256         TBool   iApHasProxySettings;
01257 
01258         TUint32 iNetworkId;
01259         TUint32 iWapProxyPort;
01260         HBufC*  iNetworkName;
01261         HBufC*  iWapProxyLoginName;
01262         HBufC*  iWapProxyLoginPass;
01263         TUint32 iApIapBearerService; // RMobileCall::TMobileCallDataServiceCaps
01264 
01265 
01266 
01267     protected:  // Friend classes
01268         friend class CApDataHandler;
01269 
01270 
01271     };
01272 
01273 // ACCESSPOINTITEM_H
01274 #endif
01275 
01276 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top