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 // Deprecation warning
00026 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
00027 
00028  
00029 //  INCLUDES
00030 #include <etelmm.h>
00031 #include <cdbcols.h>
00032 #include <nifvar.h>
00033 #include <ApEngineVer.h>
00034 #include <ApEngineConsts.h>
00035 
00036 
00037 // DATA TYPES
00182 enum TApMember
00183     {
00184     // WAP Access Point Table
00185     EApWapAccessPointID,            
00186 
00187     EApWapAccessPointName,          
00188     EApWapCurrentBearer,            
00189 
00190     EApWapStartPage,                
00191 
00192     // WAP Common (present in both tables)
00193     EApWapGatewayAddress,           
00194     EApWapWspOption,                
00195 
00196 
00197 
00198     EApWapSecurity,                 
00199 
00200 
00201     // WAP IP Bearer Table
00202 //* DEPRECATED
00203     EApWapIsp,                      
00204 
00205 //* DEPRECATED
00206     EApWapChargecard,               
00207 
00208     EApWapIap,                      
00209 
00210 
00211 //* DEPRECATED
00212     EApWapIspType,                  
00213 
00214 
00215     // WAP SMS Bearer Table
00216     // EApSmsWapGatewayAddress is mapped to EApWapGatewayAddress,
00217     // different enum needed only for being able to
00218     // distinguish when editing...
00219 
00220     // IAP Table
00221     EApIapName,                     
00222     EApIapServiceType,              
00223     EApIapServiceId,                
00224     EApIapChargecard,               
00225 
00226 
00227     // ISP table
00228     EApIspName,                     
00229     EApIspDescription,              
00230     EApIspIspType,                  
00231 
00232     EApIspDefaultTelNumber,         
00233     EApIspDialResolution,           
00234 
00235     EApIspUseLoginScript,           
00236     EApIspLoginScript,              
00237 
00238     EApIspPromptForLogin,           
00239     EApIspLoginName,                
00240     EApIspLoginPass,                
00241     EApIspDisplayPCT,               
00242 
00243     EApIspIfName,                   
00244     EApIspIfParams,                 
00245     EApIspIfNetworks,               
00246 
00247     EApIspIfPromptForAuth,          
00248 
00249     EApIspIfAuthName,               
00250     EApIspIfAuthPass,               
00251     EApIspAuthRetries,              
00252 
00253     EApIspIfCallbackEnabled,        
00254     EApIspIfCallbackType,           
00255 
00256 
00257     EApIspIfCallbackInfo,           
00258 
00259     EApIspCallBackTimeOut,          
00260 
00261     EApIspIPAddrFromServer,         
00262     EApIspIPAddr,                   
00263     EApIspIPNetMask,                
00264     EApIspIPGateway,                
00265     EApIspIPDnsAddrFromServer,      
00266     EApIspIPNameServer1,            
00267     EApIspIPNameServer2,            
00268     EApIspEnableIpHeaderComp,       
00269     EApIspEnableLCPExtensions,      
00270     EApIspDisablePlainTextAuth,     
00271     EApIspEnableSWCompression,      
00272     EApIspBearerName,               
00273 
00274 
00275     EApIspBearerSpeed,              
00276 
00277     EApIspBearerCallTypeIsdn,       
00278     EApIspBearerCE,                 
00279 
00280     EApIspInitString,               
00281 
00282 
00283 
00284 
00285     EApIspBearerType,               
00286 
00287     EApIspChannelCoding,            
00288 
00289     EApIspAIUR,                     
00290     EApIspRequestedTimeSlots,       
00291 
00292     EApIspMaximumTimeSlots,         
00293 
00294 
00295 
00296     EApGprsAccessPointName,         
00297     EApGprsPdpType,                 
00298     EApGprsPdpAddress,              
00299     EApGprsReqPrecedence,           
00300 
00301     EApGprsReqDelay,                
00302 
00303     EApGprsReqReliability,          
00304 
00305     EApGprsReqPeakThroughput,       
00306 
00307     EApGprsReqMeanPeakThroughput,   
00308 
00309     EApGprsMinPrecedence,           
00310 
00311     EApGprsMinDelay,                
00312 
00313     EApGprsMinReliability,          
00314 
00315     EApGprsMinPeakThroughput,       
00316 
00317     EApGprsMinMeanThroughput,       
00318 
00319     EApGprsUseAnonymAccess,         
00320 
00321     // followings are mapped to ISP... fields
00322     EApGprsDataCompression,         
00323     EApGprsHeaderCompression,       
00324     EApGprsIfName,                  
00325     EApGprsIfParams,                
00326     EApGprsIfNetworks,              
00327 
00328     EApGprsIfPromptForAuth,         
00329 
00330     EApGprsIfAuthName,              
00331     EApGprsIfAuthPassword,          
00332     EApGprsIfAuthRetries,           
00333 
00334     EApGprsIpNetMask,               
00335     EApGprsIpGateway,               
00336     EApGprsIpAddrFromServer,        
00337 
00338     EApGprsIpAddr,                  
00339     EApGprsIpDnsAddrFromServer,     
00340     EApGprsIPNameServer1,           
00341     EApGprsIPNameServer2,           
00342     EApGprsEnableLCPExtensions,     
00343     EApGprsDisablePlainTextAuth,    
00344     EApIsReadOnly                   
00345 
00346 
00347 // expanding this enum is safe and will not cause any trouble as all public 
00348 // part of this module uses it as a const parameter and NEVER as 
00349 // a return value, therefore non-aware clients will NEVER meet with the new
00350 // ones, thus it can not cause any problems that they do not expect them...
00351     ,
00352     EApProxyServerAddress,          
00353     EApProxyProtocolName,           
00354     EApProxyPortNumber,             
00355     EApProxyUseProxy,               
00356     EApProxyExceptions,             
00357 
00358 
00359     EApHasProxySettings,            
00360     EApNetworkID,                   
00361     EApNetworkName,                 
00362 
00363     EApWapProxyPort,                
00364     EApProxyLoginName,              
00365     EApProxyLoginPass,              
00366     EApIapBearerService,            
00367 
00368     EApIP6DNSAddrFromServer,        
00369     EApIP6NameServer1,              
00370     EApIP6NameServer2,              
00371 
00372     // CDMA2000
00373     EApCdmaIwfName,                 
00374     EApCdmaServiceOption,           
00375     EApCdmaPdpType,                 
00376     EApCdmaPdpAddress,              
00377     EApCdmaReqFwdPriority,          
00378     EApCdmaReqRevPriority,          
00379     EApCdmaReqFwdBitrate,           
00380     EApCdmaReqRevBitrate,           
00381     EApCdmaReqFwdLoss,              
00382     EApCdmaReqRevLoss,              
00383     EApCdmaReqFwdMaxDelay,          
00384     EApCdmaReqRevMaxDelay,          
00385     EApCdmaMinFwdBitrate,           
00386     EApCdmaMinRevBitrate,           
00387     EApCdmaAccptFwdLoss,            
00388     EApCdmaAccptRevLoss,            
00389     EApCdmaAccptFwdMaxDelay,        
00390     EApCdmaAccptRevMaxDelay,        
00391 
00392     // CDMA2000, mapped to ISP... fields
00393     EApCdmaDataCompression,         
00394     EApCdmaHeaderCompression,       
00395     EApCdmaAnonymousAccess,         
00396     EApCdmaIfName,                  
00397     EApCdmaIfParams,                
00398     EApCdmaIfNetworks,              
00399 
00400     EApCdmaIfPromptForAuth,         
00401 
00402     EApCdmaIfAuthName,              
00403     EApCdmaIfAuthPassword,          
00404     EApCdmaIfAuthRetries,           
00405 
00406     EApCdmaIpNetMask,               
00407     EApCdmaIpGateway,               
00408     EApCdmaIpAddrFromServer,        
00409 
00410     EApCdmaIpAddr,                  
00411     EApCdmaIpDnsAddrFromServer,     
00412     EApCdmaIPNameServer1,           
00413     EApCdmaIPNameServer2,           
00414     EApCdmaEnableLCPExtensions,     
00415     EApCdmaDisablePlainTextAuth,    
00416 
00417     // CDMA2000
00418     EApCdmaApType,                  
00419     EApCdmaQosWarningTimeout,       
00420 
00421 
00422     EApCdmaRlpMode,                 
00423 
00424     // CDMA2000 deprecated Mobile IP fields
00425     EApCdmaMip,                     
00426     EApCdmaHomeAgentAddress,        
00427     EApCdmaMipTimeout,              
00428 
00429 
00430 
00431 
00432     // CDMA2000 specific CDMA parameters provisioned through OTA and defined
00433     // in TIA-683B section 3.5.8
00434     // These fields replace the old Mobile IP fields (above).
00435     EApCdmaNaiType,                 
00436     EApCdmaSimpleIpAuthAlgorithm,   
00437     EApCdmaSimpleIpPapSsHandle,     
00438 
00439     EApCdmaSimpleIpChapSsHandle,    
00440 
00441     EApCdmaMipTBit,                 
00442     EApCdmaMipHomeAddress,          
00443     EApCdmaMipPrimaryHomeAgent,     
00444 
00445     EApCdmaMipSecondaryHomeAgent,   
00446 
00447     EApCdmaMipMnAaaAuthAlgorithm,   
00448     EApCdmaMipMnAaaSpi,             
00449     EApCdmaMipMnAaaSsHandle,        
00450     EApCdmaMipMnHaAuthAlgorithm,    
00451     EApCdmaMipMnHaSpi,              
00452     EApCdmaMipMnHaSsHandle,         
00453     
00454 
00455     // WLAN specific fields
00456     EApWlanNetworkName,             
00457     EApWlanNetworkMode,             
00458     EApWlanSecurityMode,            
00459 
00460     // WLAN, mapped to ISP... fields
00461     EApWlanIfNetworks,              
00462 
00463     EApWlanIfPromptForAuth,         
00464 
00465     EApWlanIfAuthName,              
00466     EApWlanIfAuthPassword,          
00467     EApWlanIfAuthRetries,           
00468 
00469     EApWlanIpNetMask,               
00470     EApWlanIpGateway,               
00471     EApWlanIpAddrFromServer,        
00472 
00473     EApWlanIpAddr,                  
00474     EApWlanIpDnsAddrFromServer,     
00475     EApWlanIPNameServer1,           
00476     EApWlanIPNameServer2,           
00477     EApWlanSettingsId,              
00478 
00479     EApWlanScanSSID,                
00480     EApWlanChannelId,               
00481 
00482     EApLanBearerName,               
00483     EApIapBearerID,                 
00484     EApIapBearerType,               
00485 
00486     // some defines for UI ONLY, NOT TO BE USED BY ANYONE ELSE!!!
00487     EApIpv4Settings = 0x00010000,
00488     EApIpv6Settings,
00489     EApWlanSecuritySettings         
00490     };
00491 
00492 
00493 
00494 // CONSTANTS
00495 // D E P R E C A T E D,  please do not use it!!!!!!!!!!
00496 // can not remove as it was part of the public API...
00497 const TInt KApMemberNum = EApGprsDisablePlainTextAuth+1;
00498 
00499 // FORWARD
00500 class CApItemExtra;
00501 
00502 // CLASS DECLARATION
00503 
00504 
00516 class CApAccessPointItem :public CBase
00517     {
00518 
00519     public:  // Constructors and destructor
00529         IMPORT_C static CApAccessPointItem* NewLC();
00530 
00531 
00537         IMPORT_C virtual ~CApAccessPointItem();
00538 
00539 
00548         IMPORT_C void CopyFromL( const CApAccessPointItem& aCopyFrom  );
00549 
00550 
00556         IMPORT_C TBool operator==( const CApAccessPointItem& aitem ) const;
00557 
00558 
00564         IMPORT_C TBool operator!=( const CApAccessPointItem& aitem ) const;
00565 
00566 
00567     protected:      // Constructors
00568 
00574         IMPORT_C CApAccessPointItem();
00575 
00581         IMPORT_C void ConstructL();
00582 
00583 
00584 
00585 
00586     public: // New functions
00587 
00588 
00597         IMPORT_C void ReadTextL( const TApMember aColumn, TDes8& aValue );
00598 
00607         IMPORT_C void ReadTextL( const TApMember aColumn, TDes16& aValue );
00608 
00621         IMPORT_C HBufC* ReadLongTextL( const TApMember aColumn );
00622 
00623 
00635         IMPORT_C const HBufC* ReadConstLongTextL( const TApMember aColumn );
00636 
00637 
00638 
00646         IMPORT_C TUint32 ReadTextLengthL( const TApMember aColumn );
00647 
00648 
00665         IMPORT_C TInt ReadUint( const TApMember aColumn, TUint32& aValue );
00666 
00681         IMPORT_C TInt ReadBool( const TApMember aColumn, TBool& aValue );
00682 
00683 
00684         // Update
00701         IMPORT_C TInt WriteTextL( const TApMember aColumn,
00702                                 const TDesC8& aValue );
00703 
00719         IMPORT_C TInt WriteTextL( const TApMember aColumn,
00720                                 const TDesC16& aValue );
00721 
00737         IMPORT_C TInt WriteLongTextL( const TApMember aColumn,
00738                                     const TDesC& aValue );
00739 
00754         IMPORT_C TInt WriteUint( const TApMember aColumn,
00755                                 const TUint32& aValue );
00756 
00771         IMPORT_C TInt WriteBool( const TApMember aColumn,
00772                                 const TBool& aValue );
00773 
00774 
00775         // Query
00776         // COMMON
00783         IMPORT_C TUint32 WapUid() const;
00784 
00785 
00793         IMPORT_C const TDesC& ConnectionName() const;
00794 
00795 
00796         // WAP-spec.
00804         IMPORT_C const TDesC& WapBearer() const;
00805 
00806 
00813         IMPORT_C TApBearerType BearerTypeL();
00814 
00815 
00823         IMPORT_C void SetBearerTypeL( TApBearerType aBearer );
00824 
00825 
00840         IMPORT_C void SetNamesL( const TDesC16& aValue );
00841 
00842 
00852         IMPORT_C TBool SanityCheckOk();
00853 
00854 
00864         IMPORT_C TBool HasSameIspAndBearerL( CApAccessPointItem& aItem );
00865 
00872         IMPORT_C TBool IsReadOnly() const;
00873 
00874     public: // public, not exported, available only inside the ApEngine dll
00878         TBool IsVpnAp() const;
00879 
00885         void SetVpnAp( TBool aIsVpn );
00886 
00887     private:
00896         TBool Specified( TApMember aMember );
00897 
00903         void Specify( TApMember aMember, TBool aOn );
00904 
00909         void SpecifyWap( TBool aOn );
00910 
00915         void SpecifyIpBearer( TBool aOn );
00916 
00921         void SpecifyIAP( TBool aOn );
00922 
00927         void SpecifyISP( TBool aOn );
00928 
00933         void SpecifyGPRS( TBool aOn );
00934 
00939         void SpecifyCDMA( TBool aOn );
00940 
00945         void SpecifyWLAN( TBool aOn );
00946 
00951         void SpecifyAll( TBool aOn );
00952 
00958         void SetDnsIpFromServer();
00959 
00964         void SetIpFromServer();
00965 
00966 
00972         void SetDns6IpFromServer();
00973 
00974 
00982         void ReAllocL(HBufC*& aDes, const TDesC16& aValue);
00983 
00991         void ReAllocL(HBufC8*& aDes, const TDesC8& aValue);
00992 
00993 
00999         TBool DoCompareApL( const CApAccessPointItem& aItem ) const;
01000 
01001 
01008         TBool CompareWap( const CApAccessPointItem& aItem ) const;
01009 
01010 
01016         TBool CompareIap( const CApAccessPointItem& aItem ) const;
01017 
01018 
01024         TBool CompareIsp( const CApAccessPointItem& aItem ) const;
01025 
01026 
01032         TBool CompareGprs( const CApAccessPointItem& aItem ) const;
01033 
01034 
01040         TBool CompareCdma( const CApAccessPointItem& aItem ) const;
01041 
01042 
01048         TBool CompareWlan( const CApAccessPointItem& aItem ) const;
01049 
01050 
01057         HBufC* GetCleanIpAddressLC( const TDesC& aValue );
01058 
01059 
01060 
01069         HBufC* GetPlainPhoneNumberLC( const TDesC& aNumber );
01070 
01071 
01079         TBool IsSamePhoneNumberL( CApAccessPointItem& aItem );
01080 
01081 
01087         HBufC* RemoveInvalidPhoneCharsLC( const TDesC16& aInText );
01088 
01089 
01096         HBufC* RemoveInvalidCharsLC( const TDesC16& aInText );
01097 
01098 
01105         HBufC8* RemoveInvalidCharsLC( const TDesC8& aInText );
01106 
01107 
01113         TBool CompareProxy( const CApAccessPointItem& aItem ) const;
01114 
01115 
01120         TBool HasProxy() const;
01121 
01122 
01126         void SetProxyFlag();
01127 
01128 
01132         void LimitSpeedL();
01133 
01134 
01149         void SetIfNetworksL();
01150 
01151 
01157         TBool IsSupported( TApMember aColumn );
01158 
01159 
01164         void LeaveIfUnsupportedL( TApMember aColumn );
01165 
01166 
01171         TBool IsWlan();
01172 
01173 
01180         void LimitIp6DNSL();
01181 
01182 private:    // Data
01183 
01184         // member data
01185         // COMMON
01186         TUint32 iWapUid;        
01187         HBufC* iWapAccessPointName;
01188 
01189 
01190         // WAP-spec.
01191         HBufC* iWapBearer;
01192         HBufC* iStartingPage;
01193 
01194         // common for bearers
01195         HBufC* iWapGatewayAddress;  
01196         TBool iIsWTLSSecurityOn;
01197         TUint32 iIsConnectionTypeContinuous;
01198 
01199         CApItemExtra*   iExt;
01200         TUint32         iChargeCard;
01201         TUint32         iWapIap;
01202         TUint32         iWapIspType;    // deprecated, not used but kept 
01203                                         // to keep member positions
01204 
01205 
01206         // IAP-part
01207         HBufC* iIapName;
01208 
01209         TUint32 iIapServiceId;
01210         HBufC* iIapServiceType;
01211 
01212         TUint32 iIapChargeCardId;
01213 
01214         // ISP-part
01215         HBufC* iIspName;
01216         HBufC* iIspDescription;
01217         TCommsDbIspType  iIspType;
01218         HBufC* iIspDefaultTelNumber;
01219         TBool iIspDialResolution;
01220         TBool iUseLoginScript;
01221         HBufC* iLoginScript;
01222         TBool iPromptPassword;
01223         HBufC* iUserName;
01224         HBufC* iPassword;
01225         TBool iDisplayTerminalWindow;
01226         HBufC* iIspIfName;
01227         HBufC* iIspIfParams;
01228         HBufC* iIspIfNetworks;
01229         TBool iIspIfPromptForAuth;
01230         HBufC* iIspIfAuthName;
01231         HBufC* iIspIfAuthPass;
01232         TUint32 iIspIfAuthRetries;
01233         TBool iUseCallBack;
01234         TCallbackAction iCallBackTypeIsServerNum;
01235         HBufC8* iIspIfCallbackInfo;
01236         TUint32 iIspCallbackTimeOut;
01237         TBool iIspIPAddrFromServer;
01238         HBufC* iIspIPAddr;
01239         HBufC* iIspIPNetMask;
01240         HBufC* iIspGateway;
01241         TBool iGetDNSIPFromServer;
01242         HBufC* iPrimaryDNS;
01243         HBufC* iSecondaryDNS;
01244         TBool iEnablePPPCompression;
01245         TBool iIspEnableLCPExtensions;
01246         TBool iIsPasswordAuthenticationSecure;
01247         TBool iIspEnableSwCompression;
01248         /*****************************************************
01249         *   Series 60 Customer / ETel
01250         *   Series 60   ETel API
01251         *****************************************************/
01252         TInt    iIspBearerName; // RMobileCall::TMobileCallDataServiceCaps  
01253         TApCallSpeed iMaxConnSpeed;
01254         TApCallType iBearerCallTypeIsdn; //RMobileCall::TMobileCallDataProtocol
01255         TInt    iIspBearerCE; // RMobileCall::TMobileCallDataQoS 
01256         HBufC8* iIspInitString;
01257         TUint32 iIspBearerType;
01258         TUint32 iIspChannelCoding;
01259         TUint32 iIspAIUR;
01260         TUint32 iIspRequestedTimeSlots;
01261         TUint32 iIspMaximumTimeSlots;
01262 
01263         // GPRS part
01264         HBufC*  iGprsAccessPointName;
01265         TUint32 iGprsPdpType;
01266         HBufC*  iGprsPdpAddress;
01267         TUint32 iGprsReqPrecedence;
01268         TUint32 iGprsReqDelay;
01269         TUint32 iGprsReqReliability;
01270         TUint32 iGprsReqPeakThroughput;
01271         TUint32 iGprsReqMeanPeakThroughput;
01272         TUint32 iGprsMinPrecedence;
01273 
01274         TUint32 iGprsMinDelay;
01275         TUint32 iGprsMinReliability;
01276         TUint32 iGprsMinPeakThroughput;
01277         TUint32 iGprsMinMeanThroughput;
01278         TBool   iGprsUseAnonymAccess;
01279 
01280         CArrayFixFlat<TBool>    *iSpecified;
01281         TBool iIsReadOnly;
01282 
01283         HBufC*  iApProxyProtocolName;
01284         HBufC*  iApProxyServerAddress;
01285         TUint32 iApProxyPortNumber;
01286         TBool   iApProxyUseProxy;
01287         HBufC*  iApProxyExceptions;
01288         TBool   iApHasProxySettings;
01289 
01290         TUint32 iNetworkId;
01291         TUint32 iWapProxyPort;
01292         HBufC*  iNetworkName;
01293         HBufC*  iWapProxyLoginName;
01294         HBufC*  iWapProxyLoginPass;
01295         TUint32 iApIapBearerService; // RMobileCall::TMobileCallDataServiceCaps
01296 
01297 
01298 
01299     protected:  // Friend classes
01300         friend class CApDataHandler;
01301 
01302 
01303     };
01304 
01305 // ACCESSPOINTITEM_H
01306 #endif
01307 
01308 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top