epoc32/include/mw/apdatahandler.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Declaration of class CApDataHandler
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef APDATAHANDLER_H
williamr@2
    20
#define APDATAHANDLER_H
williamr@2
    21
williamr@2
    22
// Deprecation warning
williamr@2
    23
#warning This header file has been deprecated. Will be removed in one of the next SDK releases.
williamr@2
    24
 
williamr@2
    25
 
williamr@2
    26
//  INCLUDES
williamr@2
    27
#include <commdb.h>
williamr@2
    28
#include <etelmm.h>
williamr@2
    29
#include <ApEngineVer.h>
williamr@2
    30
#include <ApEngineConsts.h>
williamr@2
    31
williamr@2
    32
williamr@2
    33
// FORWARD DECLARATIONS
williamr@2
    34
class CApAccessPointItem;
williamr@2
    35
class CApNetworkItem;
williamr@2
    36
williamr@2
    37
// extra data holder.
williamr@2
    38
typedef struct
williamr@2
    39
    {
williamr@2
    40
        TInt    iIsIpv6Supported;            // Is Ipv6 Supported?
williamr@2
    41
        TBool   iIsFeatureManagerInitialised;// Is FeatureManager Initialised?
williamr@2
    42
williamr@2
    43
        /**
williamr@2
    44
        * Indicates if HSCSD Access point is supported or not.
williamr@2
    45
        */
williamr@2
    46
        TBool   iIsAppHscsdSupport;              
williamr@2
    47
williamr@2
    48
        TInt    iVariant;               /// Local variant value
williamr@2
    49
williamr@2
    50
williamr@2
    51
    }THandlerExtra;
williamr@2
    52
williamr@2
    53
// CLASS DECLARATION
williamr@2
    54
williamr@2
    55
/**
williamr@2
    56
*  Representation of the access point handler.
williamr@2
    57
*  Encapsulates a session with the CommsDB
williamr@2
    58
*  Provides a way to access the database and manipulate its data.
williamr@2
    59
*/
williamr@2
    60
class CApDataHandler :public CBase
williamr@2
    61
    {
williamr@2
    62
    public:  // Constructors and destructor
williamr@2
    63
        
williamr@2
    64
        /**
williamr@2
    65
        * Two-phased constructor. Leaves on failure, places instance
williamr@2
    66
        * on cleanup stack.
williamr@2
    67
        * @param aDb a reference to a CCommsDataBase object.
williamr@2
    68
        * @return The constructed CApDataHandler.
williamr@2
    69
        *
williamr@2
    70
        * @deprecated
williamr@2
    71
        */
williamr@2
    72
        IMPORT_C static CApDataHandler* NewLC( CCommsDatabase& aDb );
williamr@2
    73
williamr@2
    74
williamr@2
    75
        /**
williamr@2
    76
        * Destructor.
williamr@2
    77
        *
williamr@2
    78
        * @deprecated
williamr@2
    79
        */
williamr@2
    80
        IMPORT_C virtual ~CApDataHandler();
williamr@2
    81
williamr@2
    82
williamr@2
    83
protected:      // Constructors
williamr@2
    84
williamr@2
    85
        /**
williamr@2
    86
        * C++ default constructor.
williamr@2
    87
        *
williamr@2
    88
        * @deprecated
williamr@2
    89
        */
williamr@2
    90
        IMPORT_C CApDataHandler();
williamr@2
    91
williamr@2
    92
        /**
williamr@2
    93
        * Second-phase constructor.
williamr@2
    94
        *
williamr@2
    95
        * @deprecated
williamr@2
    96
        */
williamr@2
    97
        IMPORT_C void ConstructL( CCommsDatabase& aDb );
williamr@2
    98
williamr@2
    99
williamr@2
   100
    private:
williamr@2
   101
williamr@2
   102
williamr@2
   103
    public: // New functions
williamr@2
   104
        // query
williamr@2
   105
        /**
williamr@2
   106
        * Reads up one access point's data from the database.
williamr@2
   107
        * Expects that CApDataHandler has been created and the database had
williamr@2
   108
        * been opened.
williamr@2
   109
        * In case of error, function leaves with error code.
williamr@2
   110
        * <br>Error conditions:
williamr@2
   111
        *   - Insufficient memory,
williamr@2
   112
        *   - AP does not exists,
williamr@2
   113
        *   - Server connection failure.
williamr@2
   114
        *
williamr@2
   115
        * @param aUid The Uid of the access point to be read
williamr@2
   116
        * @param aApItem A reference to a CApAccessPointItem to hold the data.
williamr@2
   117
        * @return no return value.
williamr@2
   118
        *
williamr@2
   119
        * @deprecated
williamr@2
   120
        */
williamr@2
   121
        IMPORT_C void AccessPointDataL( TUint32 aUid,
williamr@2
   122
                                      CApAccessPointItem& aApItem );
williamr@2
   123
williamr@2
   124
williamr@2
   125
        // update
williamr@2
   126
        /**
williamr@2
   127
        * Updates data stored in an existing access point.
williamr@2
   128
        * Expects that CApDataHandler has been created and the database had
williamr@2
   129
        * been opened.
williamr@2
   130
        * In case of error, no data is stored.
williamr@2
   131
        * <br>Error conditions:
williamr@2
   132
        *   - Insufficient memory
williamr@2
   133
        *   - Server connection failure
williamr@2
   134
        *   - Lock already present by other task
williamr@2
   135
        *   - Uid does not exists.
williamr@2
   136
        *   - Attempting to update read-only records will result
williamr@2
   137
        *     in KErrAccessDenied
williamr@2
   138
        *
williamr@2
   139
        * @param aApItem A reference to a CApAccessPointItem holding the data
williamr@2
   140
        * @param aNameChanged a reference to a TBool that will indicate
williamr@2
   141
        * whether the name has changed or not.
williamr@2
   142
        * @return No return value.
williamr@2
   143
        *
williamr@2
   144
        * @deprecated
williamr@2
   145
        */
williamr@2
   146
        IMPORT_C void UpdateAccessPointDataL( CApAccessPointItem& aApItem,
williamr@2
   147
                                              TBool& aNameChanged );
williamr@2
   148
williamr@2
   149
williamr@2
   150
        // Creating new AP
williamr@2
   151
        /**
williamr@2
   152
        * Creates a copy of a previously existing access point.
williamr@2
   153
        * Expects that CApDataHandler has been created and the database had
williamr@2
   154
        * been opened.
williamr@2
   155
        * In case of error, no access point will be created.
williamr@2
   156
        * <br>Error conditions:
williamr@2
   157
        *   - Insufficient memory
williamr@2
   158
        *   - Server connection failure.
williamr@2
   159
        *   - Lock already present by other task.
williamr@2
   160
        *   - Access point does not exist.
williamr@2
   161
        *   - Attempting to create new in protected tables will results
williamr@2
   162
        *     in KErrAccessDenied
williamr@2
   163
        *
williamr@2
   164
        * @param aBaseId The UID of the existing access point to copy from.
williamr@2
   165
        * @return The Uid of the newly constructed and saved access point.
williamr@2
   166
        *
williamr@2
   167
        * @deprecated
williamr@2
   168
        */
williamr@2
   169
        IMPORT_C TUint32 CreateCopyFromL( TUint32 aBaseId );
williamr@2
   170
williamr@2
   171
williamr@2
   172
        /**
williamr@2
   173
        * Create a new access point from supplied data
williamr@2
   174
        * Expects that CApDataHandler has been created and the database had
williamr@2
   175
        * been opened.
williamr@2
   176
        * The name of the AP will be corrected to be unique if necessary and
williamr@2
   177
        * returned in the passed aApItem.
williamr@2
   178
        * In case of error, no access point will be created and the passed
williamr@2
   179
        * one will remain intact.
williamr@2
   180
        * <br>Error conditions:
williamr@2
   181
        *   - Insufficient memory
williamr@2
   182
        *   - Server connection failure.
williamr@2
   183
        *   - Lock already present by other task.
williamr@2
   184
        *   - Attempting to create new in protected tables will result
williamr@2
   185
        * in KErrAccessDenied
williamr@2
   186
        *
williamr@2
   187
        * @param aApItem Reference to a CApAccessPointItem holding the data
williamr@2
   188
        * @return The UID of the newly created and saved access point.
williamr@2
   189
        *
williamr@2
   190
        * @deprecated
williamr@2
   191
        */
williamr@2
   192
        IMPORT_C TUint32 CreateFromDataL( CApAccessPointItem& aApItem );
williamr@2
   193
williamr@2
   194
williamr@2
   195
        // Remove
williamr@2
   196
        /**
williamr@2
   197
        * Removes the given access point from the database.
williamr@2
   198
        * Expects that CApDataHandler has been created and the database had
williamr@2
   199
        * been opened.
williamr@2
   200
        * In case of error, access point will not be removed.
williamr@2
   201
        * <br>Error conditions:
williamr@2
   202
        *   - Insufficient memory,
williamr@2
   203
        *   - Server connection failure.
williamr@2
   204
        *   - Lock already present by other task.
williamr@2
   205
        *   - Access point does not exist.
williamr@2
   206
        *   - Attempting to remove read-only records will result
williamr@2
   207
        * in KErrAccessDenied
williamr@2
   208
        *
williamr@2
   209
        * @param aUid The UID of the access point to remove.
williamr@2
   210
        * @return no return value.
williamr@2
   211
        *
williamr@2
   212
        * @deprecated
williamr@2
   213
        */
williamr@2
   214
        IMPORT_C void RemoveAPL( TUint32 aUid );
williamr@2
   215
williamr@2
   216
williamr@2
   217
        // Getting default access point
williamr@2
   218
        /**
williamr@2
   219
        * Reads the UID of the default access point.
williamr@2
   220
        * Expects that CApDataHandler has been created and the database had
williamr@2
   221
        * been opened.
williamr@2
   222
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   223
        * <br>Error conditions:
williamr@2
   224
        *   - Insufficient memory;
williamr@2
   225
        *   - Server connection failure;
williamr@2
   226
        *   - Lock already present;
williamr@2
   227
        *   - Access point does not exists.
williamr@2
   228
        *
williamr@2
   229
        * @param aIsWAP A boolean indicating whether to read the default
williamr@2
   230
        * WAP or the default IAP/ISP (dep. on the database type) access point.
williamr@2
   231
        * @return The UID of the default access point.
williamr@2
   232
        *
williamr@2
   233
        * @deprecated
williamr@2
   234
        */
williamr@2
   235
        IMPORT_C TUint32 DefaultL( TBool aIsWap ) const;
williamr@2
   236
williamr@2
   237
williamr@2
   238
        // Setting as default
williamr@2
   239
        /**
williamr@2
   240
        * Sets the default access point.
williamr@2
   241
        * Expects that CApDataHandler has been created and the database had
williamr@2
   242
        * been opened.
williamr@2
   243
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   244
        * <br>Error conditions:
williamr@2
   245
        *   - Insufficient memory;
williamr@2
   246
        *   - Server connection failure;
williamr@2
   247
        *   - Lock already present;
williamr@2
   248
        *   - Access point does not exists.
williamr@2
   249
        *   - Given Access Point is not of the desired type.
williamr@2
   250
        *
williamr@2
   251
        * @param aUid The UID of the access point to be set as default.
williamr@2
   252
        * @param aIntendedType The default type ( IAP, WAP, Both).
williamr@2
   253
        *
williamr@2
   254
        * @deprecated
williamr@2
   255
        */
williamr@2
   256
        IMPORT_C void SetAsDefaultL(TUint32 aUid,
williamr@2
   257
                                    TCommsDbIspType aIntendedType );
williamr@2
   258
williamr@2
   259
williamr@2
   260
williamr@2
   261
        // Setting preferences
williamr@2
   262
        /**
williamr@2
   263
        * Sets the access point preference. Can be used only if the
williamr@2
   264
        * database type is IAP.
williamr@2
   265
        * Expects that CApDataHandler has been created and the database had
williamr@2
   266
        * been opened.
williamr@2
   267
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   268
        * <br>Error conditions:
williamr@2
   269
        *   - Insufficient memory;
williamr@2
   270
        *   - Server connection failure;
williamr@2
   271
        *   - Lock already present;
williamr@2
   272
        * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
williamr@2
   273
        * @param aRank The ranking of the connection preference.
williamr@2
   274
        * @param aDircetion Specifies the direction of this connection
williamr@2
   275
        * preference
williamr@2
   276
        * @param aBearers The bearer set being valid for this connection
williamr@2
   277
        * preference
williamr@2
   278
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   279
        * should be prompted or warned on connection
williamr@2
   280
        * @param aIAP The identifier of the preferred IAP for this connection.
williamr@2
   281
        * @param aOverwrite Boolean value indicating that if a same record
williamr@2
   282
        * present, overwrite it or not.
williamr@2
   283
        *
williamr@2
   284
        * @deprecated
williamr@2
   285
        */
williamr@2
   286
        IMPORT_C void SetPreferredIfDbIapTypeL
williamr@2
   287
                                    (
williamr@2
   288
                                    TUint32 aRank,
williamr@2
   289
                                    TCommDbConnectionDirection aDirection,
williamr@2
   290
                                    TUint32 aBearers,
williamr@2
   291
                                    TCommDbDialogPref aPrompt,
williamr@2
   292
                                    TUint32 aIAP,
williamr@2
   293
                                    TBool aOverwrite
williamr@2
   294
                                    );
williamr@2
   295
williamr@2
   296
        /**
williamr@2
   297
        * Sets the access point preference. Can be used only if the
williamr@2
   298
        * database type is ISP.
williamr@2
   299
        * Expects that CApDataHandler has been created and the database had
williamr@2
   300
        * been opened.
williamr@2
   301
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   302
        * <br>Error conditions:
williamr@2
   303
        *   - Insufficient memory;
williamr@2
   304
        *   - Server connection failure;
williamr@2
   305
        *   - Lock already present;
williamr@2
   306
        * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
williamr@2
   307
        * @param aRank The ranking of the connection preference.
williamr@2
   308
        * @param aDircetion Specifies the direction of this connection
williamr@2
   309
        * preference
williamr@2
   310
        * @param aBearers The bearer set beeing valid for this connection
williamr@2
   311
        * preference
williamr@2
   312
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   313
        * should be prompted or warned on connection
williamr@2
   314
        * @param aISP The identifier of the preferred ISP for this connection.
williamr@2
   315
        * @param aChargeCard Identifier of the preferred chargecard for
williamr@2
   316
        * this connection.
williamr@2
   317
        * @param aServiceType The type of the service.
williamr@2
   318
        * @param aOverwrite Boolean value indicating that if a same record is
williamr@2
   319
        * present, overwrite it or not.
williamr@2
   320
        *
williamr@2
   321
        * @deprecated
williamr@2
   322
        */
williamr@2
   323
        IMPORT_C void SetPreferredIfDbIspTypeL
williamr@2
   324
                                    (
williamr@2
   325
                                    TUint32 aRank,
williamr@2
   326
                                    TCommDbConnectionDirection aDirection,
williamr@2
   327
                                    TUint32 aBearers,
williamr@2
   328
                                    TCommDbDialogPref aPrompt,
williamr@2
   329
                                    TUint32 aISP,
williamr@2
   330
                                    TUint32 aChargeCard,
williamr@2
   331
                                    const TDesC& aServiceType,
williamr@2
   332
                                    TBool aOverwrite
williamr@2
   333
                                    );
williamr@2
   334
williamr@2
   335
williamr@2
   336
williamr@2
   337
        /**
williamr@2
   338
        * Gets the access point preference. Can be used only if the
williamr@2
   339
        * database type is IAP.
williamr@2
   340
        * Expects that CApDataHandler has been created and the database had
williamr@2
   341
        * been opened.
williamr@2
   342
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   343
        * <br>Error conditions:
williamr@2
   344
        *   - Insufficient memory;
williamr@2
   345
        *   - Server connection failure;
williamr@2
   346
        *   - Lock already present;
williamr@2
   347
        * @param aRank The ranking of the desired connection preference.
williamr@2
   348
        * @param aDircetion Specifies the direction of the desired connection
williamr@2
   349
        * preference
williamr@2
   350
        * @param aBearers The bearer set beeing valid for this connection
williamr@2
   351
        * preference
williamr@2
   352
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   353
        * should be prompted or warned on connection
williamr@2
   354
        * @param aIAP The identifier of the preferred IAP for this
williamr@2
   355
        * connection preference.
williamr@2
   356
        *
williamr@2
   357
        * @deprecated
williamr@2
   358
        */
williamr@2
   359
        IMPORT_C void GetPreferredIfDbIapTypeL
williamr@2
   360
                                    (
williamr@2
   361
                                    TUint32 aRank,
williamr@2
   362
                                    TCommDbConnectionDirection aDirection,
williamr@2
   363
                                    TUint32& aBearers,
williamr@2
   364
                                    TUint32& aPrompt,
williamr@2
   365
                                    TUint32& aIAP
williamr@2
   366
                                    );
williamr@2
   367
williamr@2
   368
        /**
williamr@2
   369
        * Gets the access point preference. Can be used only if the
williamr@2
   370
        * database type is ISP.
williamr@2
   371
        * Expects that CApDataHandler has been created and the database had
williamr@2
   372
        * been opened.
williamr@2
   373
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   374
        * <br>Error conditions:
williamr@2
   375
        *   - Insufficient memory;
williamr@2
   376
        *   - Server connection failure;
williamr@2
   377
        *   - Lock already present;
williamr@2
   378
        * @param aRank The ranking of the desired connection preference.
williamr@2
   379
        * @param aDircetion Specifies the direction of the desired connection
williamr@2
   380
        * preference
williamr@2
   381
        * @param aBearers The bearer set beeing valid for this connection
williamr@2
   382
        * preference
williamr@2
   383
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   384
        * should be prompted or warned on connection
williamr@2
   385
        * @param aISP The identifier of the preferred ISP for this
williamr@2
   386
        * connection preference.
williamr@2
   387
        * @param aChargeCard Identifier of the preferred chargecard for
williamr@2
   388
        * this connection preference.
williamr@2
   389
        * @return The type of the service.
williamr@2
   390
        *
williamr@2
   391
        * @deprecated
williamr@2
   392
        */
williamr@2
   393
        IMPORT_C const TDesC& GetPreferredIfDbIspTypeL
williamr@2
   394
                                    (
williamr@2
   395
                                    TUint32 aRank,
williamr@2
   396
                                    TCommDbConnectionDirection aDirection,
williamr@2
   397
                                    TUint32& aBearers,
williamr@2
   398
                                    TUint32& aPrompt,
williamr@2
   399
                                    TUint32& aISP,
williamr@2
   400
                                    TUint32& aChargeCard
williamr@2
   401
                                    );
williamr@2
   402
williamr@2
   403
williamr@2
   404
        // Getting default access point
williamr@2
   405
        /**
williamr@2
   406
        * Reads the UID of the default access point.
williamr@2
   407
        * Expects that CApDataHandler has been created and the database had
williamr@2
   408
        * been opened.
williamr@2
   409
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   410
        * <br>Error conditions:
williamr@2
   411
        *   - Insufficient memory;
williamr@2
   412
        *   - Server connection failure;
williamr@2
   413
        *   - Lock already present;
williamr@2
   414
        *   - Access point does not exists.
williamr@2
   415
        *
williamr@2
   416
        * @param aIsWAP A boolean indicating whether to read the default
williamr@2
   417
        * WAP or the default IAP/ISP (dep. on the database type) access point.
williamr@2
   418
        * @param aReadOnly A TBool passed by reference to hold whether the
williamr@2
   419
        * the default access point record is read-only or not.
williamr@2
   420
        * @return The UID of the default access point.
williamr@2
   421
        *
williamr@2
   422
        * @deprecated
williamr@2
   423
        */
williamr@2
   424
        IMPORT_C TUint32 DefaultL( TBool aIsWap, TBool& aReadOnly )const;
williamr@2
   425
williamr@2
   426
williamr@2
   427
williamr@2
   428
williamr@2
   429
        // Remove
williamr@2
   430
        /**
williamr@2
   431
        * Removes the given network group from the database.
williamr@2
   432
        * Expects that CApDataHandler has been created and the database had
williamr@2
   433
        * been opened.
williamr@2
   434
        * In case of error, network group will not be removed.
williamr@2
   435
        * <br>Error conditions:
williamr@2
   436
        *   - Insufficient memory,
williamr@2
   437
        *   - Server connection failure.
williamr@2
   438
        *   - Lock already present by other task.
williamr@2
   439
        *   - network group does not exist.
williamr@2
   440
        *   - Attempting to remove read-only records will result
williamr@2
   441
        * in KErrAccessDenied
williamr@2
   442
        *
williamr@2
   443
        * @param aUid The UID of the network group to remove.
williamr@2
   444
        * @return no return value.
williamr@2
   445
        *
williamr@2
   446
        * @deprecated
williamr@2
   447
        */
williamr@2
   448
        IMPORT_C void RemoveNetworkL( TUint32 aUid );
williamr@2
   449
williamr@2
   450
williamr@2
   451
        /**
williamr@2
   452
        * Creates a network group from the data.
williamr@2
   453
        * Expects that CApDataHandler has been created and the database had
williamr@2
   454
        * been opened.
williamr@2
   455
        * In case of error, network group will not be created.
williamr@2
   456
        * <br>Error conditions:
williamr@2
   457
        *   - Insufficient memory,
williamr@2
   458
        *   - Server connection failure.
williamr@2
   459
        *   - Lock already present by other task.
williamr@2
   460
        *   - network group does not exist.
williamr@2
   461
        *   - Attempting to remove read-only records will result
williamr@2
   462
        * in KErrAccessDenied
williamr@2
   463
        *
williamr@2
   464
        * @param aNetwork The network item to create/write into db.
williamr@2
   465
        * @return no return value.
williamr@2
   466
        *
williamr@2
   467
        * @deprecated
williamr@2
   468
        */
williamr@2
   469
        IMPORT_C void CreateNetworkL( CApNetworkItem& aNetwork );
williamr@2
   470
williamr@2
   471
williamr@2
   472
        /**
williamr@2
   473
        * Reads up a network part of the access point
williamr@2
   474
        * Network is identified by the iNetworkId of the passed access point
williamr@2
   475
        *
williamr@2
   476
        * @deprecated
williamr@2
   477
        */
williamr@2
   478
        IMPORT_C void ReadNetworkPartL( CApAccessPointItem& aItem );
williamr@2
   479
williamr@2
   480
williamr@2
   481
williamr@2
   482
        /**
williamr@2
   483
        * Reads up a network 
williamr@2
   484
        * Network is identified by passed uid
williamr@2
   485
        *
williamr@2
   486
        * @deprecated
williamr@2
   487
        */
williamr@2
   488
        IMPORT_C void ReadNetworkL( TUint32 aUid, CApNetworkItem& aNetwork );
williamr@2
   489
williamr@2
   490
williamr@2
   491
    protected:  // New functions
williamr@2
   492
        /**
williamr@2
   493
        * Reads the WAP part of the data from the database.
williamr@2
   494
        * In case of error, leaves with CommDb error codes.
williamr@2
   495
        * @param aWapId The UID of the Access Point to read the data from.
williamr@2
   496
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   497
        * @return No return value.
williamr@2
   498
        */
williamr@2
   499
        void ReadWapDataL( TUint32 aWapId, CApAccessPointItem& aApItem );
williamr@2
   500
williamr@2
   501
williamr@2
   502
        /**
williamr@2
   503
        * Reads the IAP part of the data from the database.
williamr@2
   504
        * In case of error, leaves with CommDb error codes.
williamr@2
   505
        * @param aIapId The UID of the record in the IAP table to read
williamr@2
   506
        * the data.
williamr@2
   507
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   508
        * @return No return value.
williamr@2
   509
        */
williamr@2
   510
        void ReadIapDataL( TUint32 aIapId, CApAccessPointItem& aApItem );
williamr@2
   511
williamr@2
   512
williamr@2
   513
        /**
williamr@2
   514
        * Reads the ISP part of the data from the database.
williamr@2
   515
        * In case of error, leaves with CommDb error codes.
williamr@2
   516
        * @param aIspId The UID of the record in the ISP table to
williamr@2
   517
        * read the data.
williamr@2
   518
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   519
        * @return No return value.
williamr@2
   520
        */
williamr@2
   521
        void ReadIspDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
williamr@2
   522
williamr@2
   523
williamr@2
   524
        /**
williamr@2
   525
        * Reads the GPRS data from the database.
williamr@2
   526
        * In case of error, leaves with CommDb error codes.
williamr@2
   527
        * @param aIspId The UID of the record in the GPRS table to
williamr@2
   528
        * read the data from.
williamr@2
   529
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   530
        * @return No return value.
williamr@2
   531
        */
williamr@2
   532
        void ReadGprsDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
williamr@2
   533
williamr@2
   534
williamr@2
   535
        /**
williamr@2
   536
        * Reads the LAN data from the database.
williamr@2
   537
        * In case of error, leaves with CommDb error codes.
williamr@2
   538
        * @param aIspId The UID of the record in the LAN table to
williamr@2
   539
        * read the data from.
williamr@2
   540
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   541
        * @return No return value.
williamr@2
   542
        */
williamr@2
   543
        void ReadLanDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
williamr@2
   544
williamr@2
   545
williamr@2
   546
        /**
williamr@2
   547
        * Reads the DialIn/Out ISP data from the database.
williamr@2
   548
        * In case of error, leaves with CommDb error codes.
williamr@2
   549
        * @param aIspId The UID of the record in the Dialup table to
williamr@2
   550
        * read the data from.
williamr@2
   551
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   552
        * @return No return value.
williamr@2
   553
        */
williamr@2
   554
        void ReadDialInOutDataL( TUint32 aIspId, CApAccessPointItem& aApItem );
williamr@2
   555
williamr@2
   556
        
williamr@2
   557
        /**
williamr@2
   558
        * Reads up the VPN bearer type info in case of a VPN access point
williamr@2
   559
        * In case of error, leaves with CommDb error codes.
williamr@2
   560
        * @param aIspId The UID of the record in the VPN table to
williamr@2
   561
        * read the data from.
williamr@2
   562
        * @param aApItem A reference to a CApAccessPointItem to hold the data
williamr@2
   563
        * @return No return value.
williamr@2
   564
        */
williamr@2
   565
        void ReadVpnInfoL( TUint32 aIspId, CApAccessPointItem& aApItem);
williamr@2
   566
williamr@2
   567
williamr@2
   568
        /**
williamr@2
   569
        * Writes the WAP bearer part of the data to the database.
williamr@2
   570
        * In case of error, leaves with CommDb error codes.
williamr@2
   571
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   572
        * is an update operation.
williamr@2
   573
        * @param aWapId The UID of the WAP Access Point record to update.
williamr@2
   574
        * Used only if aIsNew EFalse.
williamr@2
   575
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   576
        * @return No return value.
williamr@2
   577
        */
williamr@2
   578
        void WriteWapBearerDataL
williamr@2
   579
                        (
williamr@2
   580
                        TBool aIsNew,
williamr@2
   581
                        TUint32 aWapId,
williamr@2
   582
                        CApAccessPointItem& aApItem
williamr@2
   583
                        );
williamr@2
   584
williamr@2
   585
williamr@2
   586
        /**
williamr@2
   587
        * Writes the WAP AP part of the data to the database.
williamr@2
   588
        * In case of error, leaves with CommDb error codes.
williamr@2
   589
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   590
        * is an update operation.
williamr@2
   591
        * @param aWapId The UID of the WAP Access Point record to update.
williamr@2
   592
        * Used only if aIsNew EFalse.
williamr@2
   593
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   594
        * @return No return value.
williamr@2
   595
        */
williamr@2
   596
        void WriteWapApDataL
williamr@2
   597
                        (
williamr@2
   598
                        TBool aIsNew,
williamr@2
   599
                        TUint32 aWapId,
williamr@2
   600
                        CApAccessPointItem& aApItem
williamr@2
   601
                        );
williamr@2
   602
williamr@2
   603
williamr@2
   604
williamr@2
   605
        /**
williamr@2
   606
        * Writes the IAP part of the data to the database.
williamr@2
   607
        * In case of error, leaves with CommDb error codes.
williamr@2
   608
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   609
        * is an update operation.
williamr@2
   610
        * @param aIapId The UID of the IAP Access Point record to update.
williamr@2
   611
        * Used only if aIsNew EFalse.
williamr@2
   612
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   613
        * @return No return value.
williamr@2
   614
        */
williamr@2
   615
        void WriteIapDataL
williamr@2
   616
                        (
williamr@2
   617
                        TBool aIsNew,
williamr@2
   618
                        TUint32 aIapId,
williamr@2
   619
                        CApAccessPointItem& aApItem
williamr@2
   620
                        );
williamr@2
   621
williamr@2
   622
        /**
williamr@2
   623
        * Writes the ISP part of the data to the database.
williamr@2
   624
        * In case of error, leaves with CommDb error codes.
williamr@2
   625
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   626
        * is an update operation.
williamr@2
   627
        * @param aIspId The UID of the ISP Access Point record to update.
williamr@2
   628
        * Used only if aIsNew EFalse.
williamr@2
   629
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   630
        * @return No return value.
williamr@2
   631
        */
williamr@2
   632
        void WriteIspDataL( TBool aIsNew, TUint32 aIspId,
williamr@2
   633
                            CApAccessPointItem& aApItem );
williamr@2
   634
williamr@2
   635
        /**
williamr@2
   636
        * Writes the Gprs data to the database.
williamr@2
   637
        * In case of error, leaves with CommDb error codes.
williamr@2
   638
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   639
        * is an update operation.
williamr@2
   640
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   641
        * @return No return value.
williamr@2
   642
        */
williamr@2
   643
        void WriteGprsDataL( TBool aIsNew,
williamr@2
   644
                            CApAccessPointItem& aApItem );
williamr@2
   645
williamr@2
   646
        /**
williamr@2
   647
        * Writes the LAN data to the database.
williamr@2
   648
        * In case of error, leaves with CommDb error codes.
williamr@2
   649
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   650
        * is an update operation.
williamr@2
   651
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   652
        * @return No return value.
williamr@2
   653
        */
williamr@2
   654
        void WriteLanDataL( TBool aIsNew,
williamr@2
   655
                            CApAccessPointItem& aApItem );
williamr@2
   656
williamr@2
   657
williamr@2
   658
        /**
williamr@2
   659
        * Writes the data to the database.
williamr@2
   660
        * In case of error, leaves with CommDb error codes.
williamr@2
   661
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
   662
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
   663
        * is an update operation.
williamr@2
   664
        * @return No return value.
williamr@2
   665
        */
williamr@2
   666
        TUint32 DoUpdateAccessPointDataL( CApAccessPointItem& aApItem,
williamr@2
   667
                                       TBool aIsNew, TBool& aNameChanged );
williamr@2
   668
williamr@2
   669
williamr@2
   670
        /**
williamr@2
   671
        * Sets the default IAP & ISP records in Global Settings.
williamr@2
   672
        * In case of error, leaves with CommDb error codes.
williamr@2
   673
        * @param aApItem A UID to the WAP Access Point record to
williamr@2
   674
        * be used as a default.
williamr@2
   675
        * @return No return value.
williamr@2
   676
        */
williamr@2
   677
        void SetDefaultIapIspL( TUint32 aUid );
williamr@2
   678
williamr@2
   679
        // Remove
williamr@2
   680
        /**
williamr@2
   681
        * Removes the WAP_BEARER table part of the access point from
williamr@2
   682
        * the database.
williamr@2
   683
        * Expects that CApDataHandler has been created and the database had
williamr@2
   684
        * been opened.
williamr@2
   685
        * In case of error, access point will not be removed.
williamr@2
   686
        * @param aUid The UID of the access point to remove.
williamr@2
   687
        * @return No return value.
williamr@2
   688
        */
williamr@2
   689
        void RemoveWapBearerApL( TUint32 aUid );
williamr@2
   690
williamr@2
   691
williamr@2
   692
        /**
williamr@2
   693
        * Removes the WAP_ACCESS_POINT table part of the access point from
williamr@2
   694
        * the database.
williamr@2
   695
        * Expects that CApDataHandler has been created and the database had
williamr@2
   696
        * been opened.
williamr@2
   697
        * In case of error, access point will not be removed.
williamr@2
   698
        * @param aUid The UID of the access point to remove.
williamr@2
   699
        * @return No return value.
williamr@2
   700
        */
williamr@2
   701
        void RemoveWapApL( TUint32 aUid );
williamr@2
   702
williamr@2
   703
williamr@2
   704
        /**
williamr@2
   705
        * Removes the IAP part of the access point from the database.
williamr@2
   706
        * Expects that CApDataHandler has been created and the database had
williamr@2
   707
        * been opened.
williamr@2
   708
        * In case of error, access point will not be removed.
williamr@2
   709
        * @param aUid The UID of the IAP part of the access point to remove.
williamr@2
   710
        * @return No return value.
williamr@2
   711
        */
williamr@2
   712
        void RemoveIapL( TUint32 aUid );
williamr@2
   713
williamr@2
   714
williamr@2
   715
        /**
williamr@2
   716
        * Removes the ISP part of the access point from the database.
williamr@2
   717
        * Expects that CApDataHandler has been created and the database had
williamr@2
   718
        * been opened.
williamr@2
   719
        * In case of error, access point will not be removed.
williamr@2
   720
        * @param aUid The UID of the ISP part of the access point to remove.
williamr@2
   721
        * @param aOut TBool indicating whether Dial out or dial in ISP.
williamr@2
   722
        * @return No return value.
williamr@2
   723
        */
williamr@2
   724
        void RemoveIspL( TUint32 aUid, TBool aOut );
williamr@2
   725
williamr@2
   726
williamr@2
   727
        /**
williamr@2
   728
        * Removes the GPRS part of the access point from the database.
williamr@2
   729
        * Expects that CApDataHandler has been created and the database had
williamr@2
   730
        * been opened.
williamr@2
   731
        * In case of error, access point will not be removed.
williamr@2
   732
        * @param aUid The UID of the GPRS part of the access point to remove.
williamr@2
   733
        * @return No return value.
williamr@2
   734
        */
williamr@2
   735
        void RemoveGprsL( TUint32 aUid, TBool aOut );
williamr@2
   736
williamr@2
   737
williamr@2
   738
        /**
williamr@2
   739
        * Removes the LAN part of the access point from the database.
williamr@2
   740
        * Expects that CApDataHandler has been created and the database had
williamr@2
   741
        * been opened.
williamr@2
   742
        * In case of error, access point will not be removed.
williamr@2
   743
        * @param aUid The UID of the LAN part of the access point to remove.
williamr@2
   744
        * @return No return value.
williamr@2
   745
        */
williamr@2
   746
        void RemoveLanL( TUint32 aUid );
williamr@2
   747
williamr@2
   748
williamr@2
   749
        /**
williamr@2
   750
        * Removes the WLAN part of the access point from the database.
williamr@2
   751
        * Expects that CApDataHandler has been created and the database had
williamr@2
   752
        * been opened.
williamr@2
   753
        * In case of error, access point will not be removed.
williamr@2
   754
        * @param aUid The UID of the LAN part of the access point to remove.
williamr@2
   755
        * @return No return value.
williamr@2
   756
        */
williamr@2
   757
        void RemoveWlanL( TUint32 aUid );
williamr@2
   758
        
williamr@2
   759
        
williamr@2
   760
        /**
williamr@2
   761
        * Handles the bearer change related things (deleting old links,
williamr@2
   762
        * inserting new ones if needed in the database).
williamr@2
   763
        * Expects that CApDataHandler has been created and the database had
williamr@2
   764
        * been opened.
williamr@2
   765
        * In case of error, access point data will not be changed.
williamr@2
   766
        * @param aApItem A reference to a CApAccessPointItem holding the
williamr@2
   767
        * CHANGED data.
williamr@2
   768
        * @return Boolean indicating whether bearer has changed or not.
williamr@2
   769
        */
williamr@2
   770
        TBool HandleBearerChangeIfNeededL( CApAccessPointItem& aApItem );
williamr@2
   771
williamr@2
   772
williamr@2
   773
williamr@2
   774
        /**
williamr@2
   775
        * Reads up one access point's data from the database.
williamr@2
   776
        * Expects that CApDataHandler has been created and the database had
williamr@2
   777
        * been opened.
williamr@2
   778
        * In case of error, function leaves with error code.
williamr@2
   779
        * <br>Error conditions:
williamr@2
   780
        *   - Insufficient memory,
williamr@2
   781
        *   - AP does not exists,
williamr@2
   782
        *   - Server connection failure.
williamr@2
   783
        *
williamr@2
   784
        * @param aUid The Uid of the access point to be read
williamr@2
   785
        * @param aApItem A reference to a CApAccessPointItem to hold the data.
williamr@2
   786
        * @return no return value.
williamr@2
   787
        */
williamr@2
   788
        void DoAccessPointDataL( TUint32 aUid, CApAccessPointItem& aApItem );
williamr@2
   789
williamr@2
   790
williamr@2
   791
        /**
williamr@2
   792
        * Removes the given access point from the database.
williamr@2
   793
        * Expects that CApDataHandler has been created and the database had
williamr@2
   794
        * been opened.
williamr@2
   795
        * In case of error, access point will not be removed.
williamr@2
   796
        * <br>Error conditions:
williamr@2
   797
        *   - Insufficient memory,
williamr@2
   798
        *   - Server connection failure.
williamr@2
   799
        *   - Lock already present by other task.
williamr@2
   800
        *   - Access point does not exist.
williamr@2
   801
        *   - Attempting to remove read-only records will result
williamr@2
   802
        * in KErrAccessDenied
williamr@2
   803
        *
williamr@2
   804
        * @param aUid The UID of the access point to remove.
williamr@2
   805
        * @return no return value.
williamr@2
   806
        */
williamr@2
   807
        void DoRemoveAPL( TUint32 aUid );
williamr@2
   808
williamr@2
   809
williamr@2
   810
        /**
williamr@2
   811
        * Sets the default access point.
williamr@2
   812
        * Expects that CApDataHandler has been created and the database had
williamr@2
   813
        * been opened.
williamr@2
   814
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   815
        * <br>Error conditions:
williamr@2
   816
        *   - Insufficient memory;
williamr@2
   817
        *   - Server connection failure;
williamr@2
   818
        *   - Lock already present;
williamr@2
   819
        *   - Access point does not exists.
williamr@2
   820
        *   - Given Access Point is not of the desired type.
williamr@2
   821
        *
williamr@2
   822
        * @param aUid The UID of the access point to be set as default.
williamr@2
   823
        * @param aIntendedType The default type ( IAP, WAP, Both).
williamr@2
   824
        */
williamr@2
   825
        void DoSetAsDefaultL(TUint32 aUid, TCommsDbIspType aIntendedType );
williamr@2
   826
williamr@2
   827
williamr@2
   828
        /**
williamr@2
   829
        * Sets the access point preference. Can be used only if the
williamr@2
   830
        * database type is IAP.
williamr@2
   831
        * Expects that CApDataHandler has been created and the database had
williamr@2
   832
        * been opened.
williamr@2
   833
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   834
        * <br>Error conditions:
williamr@2
   835
        *   - Insufficient memory;
williamr@2
   836
        *   - Server connection failure;
williamr@2
   837
        *   - Lock already present;
williamr@2
   838
        * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
williamr@2
   839
        * @param aRank The ranking of the connection preference.
williamr@2
   840
        * @param aDircetion Specifies the direction of this connection
williamr@2
   841
        * preference
williamr@2
   842
        * @param aBearers The bearer set beeing valid for this connection
williamr@2
   843
        * preference
williamr@2
   844
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   845
        * should be prompted or warned on connection
williamr@2
   846
        * @param aIAP The identifier of the preferred IAP for this connection.
williamr@2
   847
        * @param aOverwrite Boolean value indicating that if a same record
williamr@2
   848
        * present, overwrite it or not.
williamr@2
   849
        */
williamr@2
   850
        void DoSetPreferredIfDbIapTypeL
williamr@2
   851
                                    (
williamr@2
   852
                                    TUint32 aRank,
williamr@2
   853
                                    TCommDbConnectionDirection aDirection,
williamr@2
   854
                                    TUint32 aBearers,
williamr@2
   855
                                    TCommDbDialogPref aPrompt,
williamr@2
   856
                                    TUint32 aIAP,
williamr@2
   857
                                    TBool aOverwrite
williamr@2
   858
                                    );
williamr@2
   859
williamr@2
   860
williamr@2
   861
        /**
williamr@2
   862
        * Sets the access point preference. Can be used only if the
williamr@2
   863
        * database type is ISP.
williamr@2
   864
        * Expects that CApDataHandler has been created and the database had
williamr@2
   865
        * been opened.
williamr@2
   866
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   867
        * <br>Error conditions:
williamr@2
   868
        *   - Insufficient memory;
williamr@2
   869
        *   - Server connection failure;
williamr@2
   870
        *   - Lock already present;
williamr@2
   871
        * Can also leave with KErrAlreadyExists (if aOverWrite is EFalse ).
williamr@2
   872
        * @param aRank The ranking of the connection preference.
williamr@2
   873
        * @param aDircetion Specifies the direction of this connection
williamr@2
   874
        * preference
williamr@2
   875
        * @param aBearers The bearer set beeing valid for this connection
williamr@2
   876
        * preference
williamr@2
   877
        * @param aPrompt Enum value indicating whether or not the user
williamr@2
   878
        * should be prompted or warned on connection
williamr@2
   879
        * @param aISP The identifier of the preferred ISP for this connection.
williamr@2
   880
        * @param aChargeCard Identifier of the preferred chargecard for
williamr@2
   881
        * this connection.
williamr@2
   882
        * @param aServiceType The type of the service.
williamr@2
   883
        * @param aOverwrite Boolean value indicating that if a same record
williamr@2
   884
        * present, overwrite it or not.
williamr@2
   885
        */
williamr@2
   886
        void DoSetPreferredIfDbIspTypeL
williamr@2
   887
                                    (
williamr@2
   888
                                    TUint32 aRank,
williamr@2
   889
                                    TCommDbConnectionDirection aDirection,
williamr@2
   890
                                    TUint32 aBearers,
williamr@2
   891
                                    TCommDbDialogPref aPrompt,
williamr@2
   892
                                    TUint32 aISP,
williamr@2
   893
                                    TUint32 aChargeCard,
williamr@2
   894
                                    const TDesC& aServiceType,
williamr@2
   895
                                    TBool aOverwrite
williamr@2
   896
                                    );
williamr@2
   897
williamr@2
   898
williamr@2
   899
        /**
williamr@2
   900
        * Converts setted AP speed from TApCallSpeed to commsdb values
williamr@2
   901
        * @param The access point item whose speed needs to be converted
williamr@2
   902
        * @return no return value
williamr@2
   903
        */
williamr@2
   904
        /*****************************************************
williamr@2
   905
        *   Series 60 Customer / ETel
williamr@2
   906
        *   Series 60  ETel API
williamr@2
   907
        *****************************************************/
williamr@2
   908
        void ApSpeed2EtelL( CApAccessPointItem* aItem );
williamr@2
   909
williamr@2
   910
williamr@2
   911
        /**
williamr@2
   912
        * Converts commsdb speed values to TApCallSpeed 
williamr@2
   913
        * @param The access point item whose speed needs to be converted
williamr@2
   914
        * @return no return value
williamr@2
   915
        */
williamr@2
   916
        /*****************************************************
williamr@2
   917
        *   Series 60 Customer / ETel
williamr@2
   918
        *   Series 60  ETel API
williamr@2
   919
        *****************************************************/
williamr@2
   920
        void EtelSpeed2ApL(  CApAccessPointItem& aItem );
williamr@2
   921
williamr@2
   922
williamr@2
   923
        // Getting default access point
williamr@2
   924
        /**
williamr@2
   925
        * Reads the UID of the default access point.
williamr@2
   926
        * Expects that CApDataHandler has been created and the database had
williamr@2
   927
        * been opened.
williamr@2
   928
        * In case of error, leaves with CommsDb or system error codes.
williamr@2
   929
        * <br>Error conditions:
williamr@2
   930
        *   - Insufficient memory;
williamr@2
   931
        *   - Server connection failure;
williamr@2
   932
        *   - Lock already present;
williamr@2
   933
        *   - Access point does not exists.
williamr@2
   934
        *
williamr@2
   935
        * @param aIsWAP A boolean indicating whether to read the default
williamr@2
   936
        * WAP or the default IAP/ISP (dep. on the database type) access point.
williamr@2
   937
        * @param TBool*: if not NULL, a holder for the read-only flag of
williamr@2
   938
        * the default access point. Prepared for future products but also used
williamr@2
   939
        * here through passing NULL ptr.
williamr@2
   940
        * @return The UID of the default access point.
williamr@2
   941
        */
williamr@2
   942
        TUint32 DoGetDefaultL( TBool aIsWap, TBool* aReadOnly ) const;
williamr@2
   943
williamr@2
   944
williamr@2
   945
        /**
williamr@2
   946
        * Writes the proxy data of an access point
williamr@2
   947
        * @param aIsNew Boolean stating whether the access point is new
williamr@2
   948
        * @param aApItem A CApAccessPointItem passed by reference 
williamr@2
   949
        * holding the current access point data. It's record ID's will be 
williamr@2
   950
        * updated if needed (in case it is a new item )
williamr@2
   951
        */
williamr@2
   952
        void WriteProxyDataL( TBool aIsNew, 
williamr@2
   953
                              const CApAccessPointItem& aApItem );
williamr@2
   954
williamr@2
   955
williamr@2
   956
        /**
williamr@2
   957
        * Reads up the proxy data of an access point
williamr@2
   958
        * @param aApItem A CApAccessPointItem passed by reference 
williamr@2
   959
        * holding the current access point data. 
williamr@2
   960
        */
williamr@2
   961
        void ReadProxyDataL( CApAccessPointItem& aApItem );
williamr@2
   962
williamr@2
   963
williamr@2
   964
        /**
williamr@2
   965
        * Removes a proxy data
williamr@2
   966
        * @param aServiceType   The service type to remove for
williamr@2
   967
        * @param aIspId         The service record ID
williamr@2
   968
        */
williamr@2
   969
        void RemoveProxyDataL( HBufC* aServiceType, TUint32 aIspId );
williamr@2
   970
williamr@2
   971
williamr@2
   972
        /**
williamr@2
   973
        * Writes the network data of an access point
williamr@2
   974
        * @param aIsNew Boolean stating whether the access point is new
williamr@2
   975
        * @param aApItem A CApAccessPointItem passed by reference 
williamr@2
   976
        * holding the current access point data. It's record ID's will be 
williamr@2
   977
        * updated if needed (in case it is a new item )
williamr@2
   978
        */
williamr@2
   979
        void WriteNetworkDataL( TBool aIsNew, CApAccessPointItem& aApItem );
williamr@2
   980
williamr@2
   981
williamr@2
   982
        /**
williamr@2
   983
        * Reads up the network data of an access point
williamr@2
   984
        * @param aApItem A CApAccessPointItem passed by reference 
williamr@2
   985
        * holding the current access point data. 
williamr@2
   986
        */
williamr@2
   987
        void ReadNetworkDataL( CApAccessPointItem& aApItem );
williamr@2
   988
williamr@2
   989
williamr@2
   990
        /**
williamr@2
   991
        * Removes the network data
williamr@2
   992
        * @param aIspId The record ID to remove
williamr@2
   993
        */
williamr@2
   994
        void RemoveNetworkDataL( TUint32 aIspId );
williamr@2
   995
williamr@2
   996
williamr@2
   997
        /**
williamr@2
   998
        * Gets the location record ID
williamr@2
   999
        * @return The UID of the location.
williamr@2
  1000
        */
williamr@2
  1001
        TUint32 GetLocationIdL();
williamr@2
  1002
williamr@2
  1003
williamr@2
  1004
        /**
williamr@2
  1005
        * Gets the modem record ID
williamr@2
  1006
        * @return The UID of the modem record.
williamr@2
  1007
        */
williamr@2
  1008
        TUint32 GetModemBearerIDL( CApAccessPointItem& aApItem );
williamr@2
  1009
williamr@2
  1010
williamr@2
  1011
        /**
williamr@2
  1012
        * Returns the protocol for the passed item
williamr@2
  1013
        * @param aApItem An access point item 
williamr@2
  1014
        * @return The protocol of the passed item.
williamr@2
  1015
        */
williamr@2
  1016
        TUint32 ProtocolL( CApAccessPointItem& aApItem );
williamr@2
  1017
williamr@2
  1018
        /**
williamr@2
  1019
        * Returns the commsdb speed for the passed item
williamr@2
  1020
        * @param aApItem An access point item 
williamr@2
  1021
        * @return The speed of the passed item.
williamr@2
  1022
        */
williamr@2
  1023
        TUint32 CommsDbSpeedL( CApAccessPointItem& aApItem );
williamr@2
  1024
williamr@2
  1025
williamr@2
  1026
        /**
williamr@2
  1027
        * Reads up common IP & PPP SERVICE data parts of an access point.
williamr@2
  1028
        * Leaves if it is not persent in the database
williamr@2
  1029
        * @param The table to read from
williamr@2
  1030
        * @param The CApAccessPointItem to store into
williamr@2
  1031
        */
williamr@2
  1032
        void ReadServiceL( CCommsDbTableView& ispt, 
williamr@2
  1033
                           CApAccessPointItem& aApItem );
williamr@2
  1034
williamr@2
  1035
williamr@2
  1036
        /**
williamr@2
  1037
        * Reads up CSD/GPRS IPv6 parts of an access point.
williamr@2
  1038
        * Leaves if it is not persent in the database
williamr@2
  1039
        * @param The table to read from
williamr@2
  1040
        * @param The CApAccessPointItem to store into
williamr@2
  1041
        */
williamr@2
  1042
        void ReadServiceIp6L( CCommsDbTableView& ispt,
williamr@2
  1043
                              CApAccessPointItem& aApItem );
williamr@2
  1044
williamr@2
  1045
williamr@2
  1046
        /**
williamr@2
  1047
        * Writes common IP & PPP SERVICE data parts of an access point.
williamr@2
  1048
        * Leaves if it is not persent in the database
williamr@2
  1049
        * @param The table to write into 
williamr@2
  1050
        * @param The CApAccessPointItem holding the data to store 
williamr@2
  1051
        */
williamr@2
  1052
        void WriteServiceL( CCommsDbTableView& aTable,
williamr@2
  1053
                            CApAccessPointItem& aApItem );
williamr@2
  1054
williamr@2
  1055
williamr@2
  1056
        /**
williamr@2
  1057
        * Writes the IPv6 parts of an access point.
williamr@2
  1058
        * Leaves if it is not persent in the database
williamr@2
  1059
        * @param The table to write to 
williamr@2
  1060
        * @param The CApAccessPointItem to read the data from
williamr@2
  1061
        */
williamr@2
  1062
        void WriteServiceIp6L( CCommsDbTableView& ispt,
williamr@2
  1063
                               CApAccessPointItem& aApItem );
williamr@2
  1064
williamr@2
  1065
williamr@2
  1066
        /**
williamr@2
  1067
        * Writes the CSD isp data to the database.
williamr@2
  1068
        * In case of error, leaves with CommDb error codes.
williamr@2
  1069
        * Leaves with KErrNotSupported if (HS)CSD bearer type is not supported.
williamr@2
  1070
        * @param aIsNew A Boolean indicating whether it is a new record or it
williamr@2
  1071
        * is an update operation.
williamr@2
  1072
        * @param aApItem Reference to a CApAccessPointItem which holds the data
williamr@2
  1073
        * @return No return value.
williamr@2
  1074
        */
williamr@2
  1075
        void WriteCsdDataL( TBool aIsNew, CApAccessPointItem& aApItem );
williamr@2
  1076
williamr@2
  1077
williamr@2
  1078
        /**
williamr@2
  1079
        * Gets the local variant value 
williamr@2
  1080
        * @return A TInt stating the variant
williamr@2
  1081
        */
williamr@2
  1082
//        TInt GetVariantL();
williamr@2
  1083
williamr@2
  1084
williamr@2
  1085
        /**
williamr@2
  1086
        * Reads up WLAN data parts of an access point.
williamr@2
  1087
        * Leaves if it is not persent in the database
williamr@2
  1088
        * @param The table to read from
williamr@2
  1089
        * @param The CApAccessPointItem to store into
williamr@2
  1090
        */
williamr@2
  1091
        void ReadWlanL( CCommsDbTableView& lant,
williamr@2
  1092
                        CApAccessPointItem& aApItem );
williamr@2
  1093
williamr@2
  1094
williamr@2
  1095
        /**
williamr@2
  1096
        * Writes the WLAN parts of an access point.
williamr@2
  1097
        * Leaves if it is not persent in the database
williamr@2
  1098
        * @param The table to write to 
williamr@2
  1099
        * @param The CApAccessPointItem to read the data from
williamr@2
  1100
        */
williamr@2
  1101
        void WriteWlanL( CCommsDbTableView& aTable,
williamr@2
  1102
                         CApAccessPointItem& aApItem );
williamr@2
  1103
williamr@2
  1104
        /**
williamr@2
  1105
        * Creates a new record in the LANBearer table if there is none for WLAN
williamr@2
  1106
        * @return The UID of the LANBEarer record.
williamr@2
  1107
        */
williamr@2
  1108
        TUint32 CreateLanBearerIfNeededL();
williamr@2
  1109
williamr@2
  1110
williamr@2
  1111
williamr@2
  1112
        /**
williamr@2
  1113
        * Reads up the name of the LAN/Modem bearer record
williamr@2
  1114
        */
williamr@2
  1115
        void ReadModemBearerNameL( CApAccessPointItem& aApItem );
williamr@2
  1116
        
williamr@2
  1117
williamr@2
  1118
    private:    // Data
williamr@2
  1119
        CCommsDatabase* iDb;
williamr@2
  1120
//        TCommDbDatabaseType iDbType;  // deprecated and not used but kept 
williamr@2
  1121
                                        // to maintain class size for BC
williamr@2
  1122
        // no change in size as deprecated removed, 
williamr@2
  1123
        // new added, with the same size...
williamr@2
  1124
        THandlerExtra*  iExt;
williamr@2
  1125
williamr@2
  1126
williamr@2
  1127
    };
williamr@2
  1128
williamr@2
  1129
#endif      // APDATAHANDLER_H
williamr@2
  1130
williamr@2
  1131
// End of File