creator/engine/inc/creator_accesspoint.h
branchRCL_3
changeset 21 b3cee849fa46
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
       
     1 /*
       
     2 * Copyright (c) 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 
       
    20 
       
    21 
       
    22 #ifndef __CREATORACCESSPOINTS_H__
       
    23 #define __CREATORACCESSPOINTS_H__
       
    24 
       
    25 #include "engine.h"
       
    26 #include "creator_modulebase.h"
       
    27 #include "creator_connectionmethodbase.h"
       
    28 
       
    29 #include <e32base.h>
       
    30 #include <commdb.h>
       
    31 //#include <ApSelect.h>
       
    32 //#include <ApDataHandler.h>
       
    33 //#include <ApAccessPointItem.h>
       
    34 //#include <ApUtils.h>
       
    35 //#include <ApEngineConsts.h>
       
    36 #include <msvapi.h>
       
    37 #include <mtclreg.h>
       
    38 #include <mmsclient.h>
       
    39 
       
    40 
       
    41 class CCreatorEngine;
       
    42 class CAccessPointsParameters;
       
    43 
       
    44 
       
    45 
       
    46 class CCreatorAccessPoints : public CCreatorConnectionSettingsBase, public MMsvSessionObserver
       
    47     {
       
    48 public: 
       
    49     static CCreatorAccessPoints* NewL(CCreatorEngine* aEngine);
       
    50     static CCreatorAccessPoints* NewLC(CCreatorEngine* aEngine);
       
    51     ~CCreatorAccessPoints();
       
    52 
       
    53 private:
       
    54     CCreatorAccessPoints();
       
    55     void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase
       
    56 
       
    57     void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); // from MMsvSessionObserver
       
    58 
       
    59 public:
       
    60     TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
       
    61     
       
    62     TInt CreateConnectionSettingsEntryL(CCreatorModuleBaseParameters *aParameters);    
       
    63     TUint32 AccessPointNameToIdL(const TDesC& aAPName, TBool aAnyIfNotFound = EFalse );
       
    64     
       
    65     void DeleteAllL();
       
    66     void DeleteAllCreatedByCreatorL();
       
    67 
       
    68 private:
       
    69     CCommsDatabase* iCommsDb;
       
    70     CApDataHandler* iApDataHandler;
       
    71     CApUtils* iApUtils;
       
    72     CAccessPointsParameters* iParameters;
       
    73     RArray<TUint32> iEntryIds; // TUint32 CApDataHandler::CreateFromDataL
       
    74 
       
    75 public:
       
    76     };
       
    77 
       
    78 
       
    79 class CAccessPointsParameters : public CCreatorModuleBaseParameters
       
    80     {
       
    81 public: 
       
    82     HBufC*          iConnectionName; // connection name
       
    83     TApBearerType   iBearerType; // bearer type
       
    84     HBufC*          iWapStartPage; // WAP start page
       
    85     TUint32         iWapWspOption; // connection type
       
    86     HBufC*          iGprsAcessPointName; // access point name
       
    87     HBufC*          iIspLoginName; // username
       
    88     TBool           iSecureAuthentication; // password authentication
       
    89     HBufC*          iIspLoginPass; // password
       
    90     TBool           iPromptPassword; // prompt password
       
    91     HBufC*          iWapGatewayAddress; // WAP gateway address
       
    92     HBufC*          iIspIPAddr; // phone IP
       
    93     HBufC*          iIspIPNameServer1;  // primary name server
       
    94     HBufC*          iIspIPNameServer2;  // secondary name server
       
    95     HBufC*          iIspDefaultTelNumber; // datacall number
       
    96     TUint32         iIspBearerCallTypeIsdn; // datacall type
       
    97     TUint32         iIspBearerSpeed;  // max connection speed
       
    98     HBufC*          iProxyServerAddress;  // proxy address
       
    99     TUint32         iProxyPortNumber; // proxy number
       
   100     
       
   101     void SetRandomCMNameL(CCreatorEngine& aEngine);
       
   102     void SetRandomLoginNameL(CCreatorEngine& aEngine);
       
   103     void SetRandomLoginPassL(CCreatorEngine& aEngine);
       
   104     void SetRandomSecureAuthenticationL(CCreatorEngine& aEngine);
       
   105     void SetRandomPromptPasswordL(CCreatorEngine& aEngine);
       
   106     void SetRandomProxyAddressL(CCreatorEngine& aEngine);
       
   107     void SetRandomProxyPortL(CCreatorEngine& aEngine);
       
   108     void SetRandomStartPageL(CCreatorEngine& aEngine);
       
   109     void SetRandomIPAddressL(CCreatorEngine& aEngine);
       
   110     void SetRandomIP4NameServer1L(CCreatorEngine& aEngine);
       
   111     void SetRandomIP4NameServer2L(CCreatorEngine& aEngine);
       
   112     void SetRandomTelephoneNumberL(CCreatorEngine& aEngine);
       
   113     void SetRandomBearerTypeIsdnL(CCreatorEngine& aEngine);
       
   114     void SetRandomBearerSpeedL(CCreatorEngine& aEngine);
       
   115     void SetRandomWapWspOptionL(CCreatorEngine& aEngine);
       
   116     void SetRandomGatewayAddressL(CCreatorEngine& aEngine);
       
   117     
       
   118 
       
   119 public:
       
   120     CAccessPointsParameters();
       
   121     ~CAccessPointsParameters();
       
   122     };
       
   123 
       
   124 
       
   125 
       
   126 #endif // __CREATORACCESSPOINTS_H__