omadmadapters/globalwlansettings/src/globalwlanadapter.cpp
author hgs
Tue, 13 Jul 2010 03:48:30 +0530
changeset 45 0f9fc722d255
parent 44 deviceupdatesui/omadmadapters/globalwlansettings/src/globalwlanadapter.cpp@137912d1a556
permissions -rw-r--r--
201021_01
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:   Global WLAN settings Adapter
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
#include "globalwlanadapter.h"
hgs
parents:
diff changeset
    21
#include "nsmldebug.h"
hgs
parents:
diff changeset
    22
#include <implementationproxy.h> // For TImplementationProxy definition
hgs
parents:
diff changeset
    23
#include <commdb.h>
hgs
parents:
diff changeset
    24
#include <WlanCdbCols.h>
hgs
parents:
diff changeset
    25
#include <utf.h>
hgs
parents:
diff changeset
    26
#include <cdbstore.h>
hgs
parents:
diff changeset
    27
#include <cdbcols.h>
hgs
parents:
diff changeset
    28
#include <f32file.h>
hgs
parents:
diff changeset
    29
#include <e32const.h>
hgs
parents:
diff changeset
    30
#include <s32strm.h>
hgs
parents:
diff changeset
    31
#include <e32base.h>
hgs
parents:
diff changeset
    32
#include <sysutil.h>
hgs
parents:
diff changeset
    33
#include <e32cmn.h>
hgs
parents:
diff changeset
    34
#include <featmgr.h>
hgs
parents:
diff changeset
    35
hgs
parents:
diff changeset
    36
#include <centralrepository.h>
hgs
parents:
diff changeset
    37
#include <commsdattypesv1_1.h>
hgs
parents:
diff changeset
    38
hgs
parents:
diff changeset
    39
hgs
parents:
diff changeset
    40
#ifndef __WINS__
hgs
parents:
diff changeset
    41
// This lowers the unnecessary compiler warning (armv5) to remark.
hgs
parents:
diff changeset
    42
// "Warning:  #174-D: expression has no effect..." is caused by 
hgs
parents:
diff changeset
    43
// DBG_ARGS8 macro in no-debug builds.
hgs
parents:
diff changeset
    44
#pragma diag_remark 174
hgs
parents:
diff changeset
    45
#endif
hgs
parents:
diff changeset
    46
hgs
parents:
diff changeset
    47
hgs
parents:
diff changeset
    48
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
    49
//
hgs
parents:
diff changeset
    50
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
    51
const TImplementationProxy ImplementationTable[] = 
hgs
parents:
diff changeset
    52
    {
hgs
parents:
diff changeset
    53
    IMPLEMENTATION_PROXY_ENTRY(0x1315DBE, CGlobalWLANAdapter::NewL)
hgs
parents:
diff changeset
    54
    };
hgs
parents:
diff changeset
    55
hgs
parents:
diff changeset
    56
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
    57
// TImplementationProxy* ImplementationGroupProxy()
hgs
parents:
diff changeset
    58
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
    59
EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
hgs
parents:
diff changeset
    60
    {
hgs
parents:
diff changeset
    61
    _DBG_FILE("ImplementationGroupProxy() for CGlobalWLANAdapter: begin");
hgs
parents:
diff changeset
    62
hgs
parents:
diff changeset
    63
    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
    _DBG_FILE("ImplementationGroupProxy() for CGlobalWLANAdapter: end");
hgs
parents:
diff changeset
    66
    return ImplementationTable;
hgs
parents:
diff changeset
    67
    }
hgs
parents:
diff changeset
    68
hgs
parents:
diff changeset
    69
hgs
parents:
diff changeset
    70
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
    71
// CGlobalWLANAdapter* CGlobalWLANAdapter::NewL( )
hgs
parents:
diff changeset
    72
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
    73
CGlobalWLANAdapter* CGlobalWLANAdapter::NewL( MSmlDmCallback* aDmCallback )
hgs
parents:
diff changeset
    74
    {
hgs
parents:
diff changeset
    75
    _DBG_FILE("CGlobalWLANAdapter::NewL(): begin");
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
    CGlobalWLANAdapter* self = NewLC( aDmCallback );
hgs
parents:
diff changeset
    78
    CleanupStack::Pop( self );
hgs
parents:
diff changeset
    79
hgs
parents:
diff changeset
    80
    _DBG_FILE("CGlobalWLANAdapter::NewL(): end");
hgs
parents:
diff changeset
    81
    return self;
hgs
parents:
diff changeset
    82
    }
hgs
parents:
diff changeset
    83
hgs
parents:
diff changeset
    84
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
    85
// CGlobalWLANAdapter* CGlobalWLANAdapter::NewLC( )
hgs
parents:
diff changeset
    86
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
    87
CGlobalWLANAdapter* CGlobalWLANAdapter::NewLC( MSmlDmCallback* aDmCallback )
hgs
parents:
diff changeset
    88
    {
hgs
parents:
diff changeset
    89
    _DBG_FILE("CGlobalWLANAdapter::NewLC(): begin");
hgs
parents:
diff changeset
    90
    
hgs
parents:
diff changeset
    91
    CGlobalWLANAdapter* self = new(ELeave) CGlobalWLANAdapter(aDmCallback);
hgs
parents:
diff changeset
    92
    CleanupStack::PushL( self );
hgs
parents:
diff changeset
    93
hgs
parents:
diff changeset
    94
    self->iCallBack = aDmCallback;
hgs
parents:
diff changeset
    95
    _DBG_FILE("CGlobalWLANAdapter::NewLC(): call constructL");
hgs
parents:
diff changeset
    96
    self->ConstructL( );
hgs
parents:
diff changeset
    97
hgs
parents:
diff changeset
    98
    _DBG_FILE("CGlobalWLANAdapter::NewLC(): end");
hgs
parents:
diff changeset
    99
    return self;
hgs
parents:
diff changeset
   100
    }
hgs
parents:
diff changeset
   101
hgs
parents:
diff changeset
   102
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   103
// void CGlobalWLAdapter::ConstructL( )
hgs
parents:
diff changeset
   104
// Second phase constructor
hgs
parents:
diff changeset
   105
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   106
void CGlobalWLANAdapter::ConstructL(  )
hgs
parents:
diff changeset
   107
	{
hgs
parents:
diff changeset
   108
    _DBG_FILE("CGlobalWLANAdapter::ConstructL(): begin");
hgs
parents:
diff changeset
   109
    
hgs
parents:
diff changeset
   110
    // checks if Wlan feature is supported
hgs
parents:
diff changeset
   111
    FeatureManager::InitializeLibL();
hgs
parents:
diff changeset
   112
    iWlanSupported = FeatureManager::FeatureSupported( KFeatureIdProtocolWlan );
hgs
parents:
diff changeset
   113
    FeatureManager::UnInitializeLib();
hgs
parents:
diff changeset
   114
    
hgs
parents:
diff changeset
   115
    iWriteSettings = new(ELeave) TGlobalSettings;
hgs
parents:
diff changeset
   116
    iReadSettings = new(ELeave) TGlobalSettings;
hgs
parents:
diff changeset
   117
    iReadStatuses = new(ELeave) TStatusResult;
hgs
parents:
diff changeset
   118
    iWriteStatuses = new(ELeave) TStatusResult;
hgs
parents:
diff changeset
   119
    
hgs
parents:
diff changeset
   120
    // set "present" variables to false, since symbian inits thems as true
hgs
parents:
diff changeset
   121
    InitMemberVariables();
hgs
parents:
diff changeset
   122
     
hgs
parents:
diff changeset
   123
    _DBG_FILE("CGlobalWLANAdapter::ConstructL(): end");
hgs
parents:
diff changeset
   124
    }
hgs
parents:
diff changeset
   125
hgs
parents:
diff changeset
   126
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   127
// CGlobalWLANAdapter::CGlobalWLANAdapter( )
hgs
parents:
diff changeset
   128
// Constructor
hgs
parents:
diff changeset
   129
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   130
CGlobalWLANAdapter::CGlobalWLANAdapter( TAny* aEcomArguments )
hgs
parents:
diff changeset
   131
    : CSmlDmAdapter(aEcomArguments)
hgs
parents:
diff changeset
   132
    {
hgs
parents:
diff changeset
   133
    _DBG_FILE("CGlobalWLANAdapter::CGlobalWLANAdapter(): begin");
hgs
parents:
diff changeset
   134
    _DBG_FILE("CGlobalWLANAdapter::CGlobalWLANAdapter(): end");
hgs
parents:
diff changeset
   135
    }
hgs
parents:
diff changeset
   136
hgs
parents:
diff changeset
   137
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   138
// CGlobalWLANAdapter::~CGlobalWLANAdapter( )
hgs
parents:
diff changeset
   139
// Destructor
hgs
parents:
diff changeset
   140
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   141
CGlobalWLANAdapter::~CGlobalWLANAdapter( )
hgs
parents:
diff changeset
   142
    {
hgs
parents:
diff changeset
   143
    _DBG_FILE("CGlobalWLANAdapter::~CGlobalWLANAdapter(): begin");
hgs
parents:
diff changeset
   144
    
hgs
parents:
diff changeset
   145
    delete iWriteSettings;
hgs
parents:
diff changeset
   146
    delete iReadSettings;
hgs
parents:
diff changeset
   147
    delete iReadStatuses;
hgs
parents:
diff changeset
   148
    delete iWriteStatuses;
hgs
parents:
diff changeset
   149
    
hgs
parents:
diff changeset
   150
    _DBG_FILE("CGlobalWLANAdapter::~CGlobalWLANAdapter(): end");
hgs
parents:
diff changeset
   151
    }
hgs
parents:
diff changeset
   152
hgs
parents:
diff changeset
   153
hgs
parents:
diff changeset
   154
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   155
// CGlobalWLANAdapter* CGlobalWLANAdapter::DDFVersionL( CBufBase& aDDFVersion )
hgs
parents:
diff changeset
   156
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   157
void CGlobalWLANAdapter::DDFVersionL( CBufBase& aDDFVersion )
hgs
parents:
diff changeset
   158
    {
hgs
parents:
diff changeset
   159
    _DBG_FILE("CGlobalWLANAdapter::DDFVersionL(): begin");
hgs
parents:
diff changeset
   160
    
hgs
parents:
diff changeset
   161
    aDDFVersion.InsertL( 0, KNSmGlobalWlanAdapterDDFversion );
hgs
parents:
diff changeset
   162
    
hgs
parents:
diff changeset
   163
    _DBG_FILE("CGlobalWLANAdapter::DDFVersionL(): end");
hgs
parents:
diff changeset
   164
    }
hgs
parents:
diff changeset
   165
hgs
parents:
diff changeset
   166
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   167
// CGlobalWLANAdapter* CGlobalWLANAdapter::DDFStructureL( MSmlDmDDFObject& aDDF )
hgs
parents:
diff changeset
   168
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   169
void CGlobalWLANAdapter::DDFStructureL( MSmlDmDDFObject& aDDF )
hgs
parents:
diff changeset
   170
    {
hgs
parents:
diff changeset
   171
    _DBG_FILE("CGlobalWLANAdapter::DDFStructureL(): begin");
hgs
parents:
diff changeset
   172
    if( !iWlanSupported )
hgs
parents:
diff changeset
   173
        {
hgs
parents:
diff changeset
   174
        _DBG_FILE("CGlobalWLANAdapter::DDFStructureL(): WLAN not supported.");
hgs
parents:
diff changeset
   175
        return;
hgs
parents:
diff changeset
   176
        }  
hgs
parents:
diff changeset
   177
//
hgs
parents:
diff changeset
   178
// Set Get, add and replace as acceptable operations
hgs
parents:
diff changeset
   179
//
hgs
parents:
diff changeset
   180
hgs
parents:
diff changeset
   181
    TSmlDmAccessTypes accessTypesGetAddReplace;     
hgs
parents:
diff changeset
   182
    accessTypesGetAddReplace.SetAdd();
hgs
parents:
diff changeset
   183
    accessTypesGetAddReplace.SetGet();
hgs
parents:
diff changeset
   184
    accessTypesGetAddReplace.SetReplace();
hgs
parents:
diff changeset
   185
    
hgs
parents:
diff changeset
   186
    //WLAN
hgs
parents:
diff changeset
   187
    MSmlDmDDFObject& rootWLan = aDDF.AddChildObjectL( KNSmlWLan );
hgs
parents:
diff changeset
   188
    FillNodeInfoL( rootWLan,
hgs
parents:
diff changeset
   189
               	accessTypesGetAddReplace,
hgs
parents:
diff changeset
   190
               	MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   191
               	MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   192
               	MSmlDmDDFObject::ENode,
hgs
parents:
diff changeset
   193
               	KNSmlEmpty );
hgs
parents:
diff changeset
   194
hgs
parents:
diff changeset
   195
    //WLAN/InternetConnectivityTest
hgs
parents:
diff changeset
   196
    MSmlDmDDFObject& internetConnectivityTest = rootWLan.AddChildObjectL( KNSmlWLanInternetConnectivityTest );
hgs
parents:
diff changeset
   197
    FillNodeInfoL( internetConnectivityTest,
hgs
parents:
diff changeset
   198
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   199
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   200
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   201
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   202
    			KNSmlEmpty );
hgs
parents:
diff changeset
   203
    
hgs
parents:
diff changeset
   204
    //WLAN/UseDefaultSettings
hgs
parents:
diff changeset
   205
    MSmlDmDDFObject& useDefaultSettings = rootWLan.AddChildObjectL( KNSmlWLanUseDefaultSettings );
hgs
parents:
diff changeset
   206
    FillNodeInfoL( useDefaultSettings,
hgs
parents:
diff changeset
   207
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   208
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   209
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   210
    			MSmlDmDDFObject::EBool,
hgs
parents:
diff changeset
   211
    			KNSmlEmpty );
hgs
parents:
diff changeset
   212
hgs
parents:
diff changeset
   213
     //WLAN/LongRetryLimit
hgs
parents:
diff changeset
   214
    MSmlDmDDFObject& longRetryLimit = rootWLan.AddChildObjectL( KNSmlWLanLongRetryLimit );
hgs
parents:
diff changeset
   215
    FillNodeInfoL( longRetryLimit,
hgs
parents:
diff changeset
   216
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   217
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   218
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   219
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   220
    			KNSmlEmpty );
hgs
parents:
diff changeset
   221
    			
hgs
parents:
diff changeset
   222
    //WLAN/ShortRetryLimit
hgs
parents:
diff changeset
   223
    MSmlDmDDFObject& shortRetryLimit = rootWLan.AddChildObjectL( KNSmlWLanShortRetryLimit );
hgs
parents:
diff changeset
   224
    FillNodeInfoL( shortRetryLimit,
hgs
parents:
diff changeset
   225
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   226
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   227
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   228
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   229
    			KNSmlEmpty );
hgs
parents:
diff changeset
   230
    			
hgs
parents:
diff changeset
   231
    			
hgs
parents:
diff changeset
   232
    //WLAN/RTSThreshold
hgs
parents:
diff changeset
   233
    MSmlDmDDFObject& RTSThreshold = rootWLan.AddChildObjectL( KNSmlWLanRTSThreshold );
hgs
parents:
diff changeset
   234
    FillNodeInfoL( RTSThreshold,
hgs
parents:
diff changeset
   235
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   236
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   237
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   238
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   239
    			KNSmlEmpty );
hgs
parents:
diff changeset
   240
    			
hgs
parents:
diff changeset
   241
    //WLAN/TXPowerLevel
hgs
parents:
diff changeset
   242
    MSmlDmDDFObject& TXPowerLevel = rootWLan.AddChildObjectL( KNSmlWLanTXPowerLevel );
hgs
parents:
diff changeset
   243
    FillNodeInfoL( TXPowerLevel,
hgs
parents:
diff changeset
   244
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   245
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   246
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   247
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   248
    			KNSmlEmpty );
hgs
parents:
diff changeset
   249
    			
hgs
parents:
diff changeset
   250
    //WLAN/PowerSaving
hgs
parents:
diff changeset
   251
    MSmlDmDDFObject& powerSaving = rootWLan.AddChildObjectL( KNSmlWLanPowerSaving );
hgs
parents:
diff changeset
   252
    FillNodeInfoL( powerSaving,
hgs
parents:
diff changeset
   253
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   254
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   255
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   256
    			MSmlDmDDFObject::EBool,
hgs
parents:
diff changeset
   257
    			KNSmlEmpty );
hgs
parents:
diff changeset
   258
    			
hgs
parents:
diff changeset
   259
    //WLAN/BackgroundScanInterval
hgs
parents:
diff changeset
   260
    MSmlDmDDFObject& backgroundScanInterval = rootWLan.AddChildObjectL( KNSmlWLanBackgroundScanInterval );
hgs
parents:
diff changeset
   261
    FillNodeInfoL( backgroundScanInterval,
hgs
parents:
diff changeset
   262
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   263
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   264
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   265
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   266
    			KNSmlEmpty );
hgs
parents:
diff changeset
   267
    			
hgs
parents:
diff changeset
   268
    //WLAN/ScanRate
hgs
parents:
diff changeset
   269
    MSmlDmDDFObject& scanRate = rootWLan.AddChildObjectL( KNSmlWLanScanRate );
hgs
parents:
diff changeset
   270
    FillNodeInfoL( scanRate,
hgs
parents:
diff changeset
   271
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   272
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   273
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   274
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   275
    			KNSmlEmpty );
hgs
parents:
diff changeset
   276
hgs
parents:
diff changeset
   277
    //WLAN/RCPITrigger
hgs
parents:
diff changeset
   278
    MSmlDmDDFObject& RCPITrigger = rootWLan.AddChildObjectL( KNSmlWLanRCPITrigger );
hgs
parents:
diff changeset
   279
    FillNodeInfoL( RCPITrigger,
hgs
parents:
diff changeset
   280
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   281
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   282
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   283
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   284
    			KNSmlEmpty );
hgs
parents:
diff changeset
   285
hgs
parents:
diff changeset
   286
    //WLAN/MinActiveChannelTime
hgs
parents:
diff changeset
   287
    MSmlDmDDFObject& minActiveChannelTime = rootWLan.AddChildObjectL( KNSmlWLanMinActiveChannelTime );
hgs
parents:
diff changeset
   288
    FillNodeInfoL( minActiveChannelTime,
hgs
parents:
diff changeset
   289
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   290
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   291
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   292
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   293
    			KNSmlEmpty );
hgs
parents:
diff changeset
   294
    			
hgs
parents:
diff changeset
   295
     //WLAN/MaxActiveChannelTime
hgs
parents:
diff changeset
   296
    MSmlDmDDFObject& maxActiveChannelTime = rootWLan.AddChildObjectL( KNSmlWLanMaxActiveChannelTime );
hgs
parents:
diff changeset
   297
    FillNodeInfoL( maxActiveChannelTime,
hgs
parents:
diff changeset
   298
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   299
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   300
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   301
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   302
    			KNSmlEmpty );
hgs
parents:
diff changeset
   303
    			
hgs
parents:
diff changeset
   304
     //WLAN/MaxTxMSDULifeTime
hgs
parents:
diff changeset
   305
    MSmlDmDDFObject& maxTxMSDULifeTime = rootWLan.AddChildObjectL( KNSmlWLanMaxTxMSDULifeTime );
hgs
parents:
diff changeset
   306
    FillNodeInfoL( maxTxMSDULifeTime,
hgs
parents:
diff changeset
   307
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   308
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   309
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   310
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   311
    			KNSmlEmpty );
hgs
parents:
diff changeset
   312
    			
hgs
parents:
diff changeset
   313
    //WLAN/ScanExpirationTimer
hgs
parents:
diff changeset
   314
    MSmlDmDDFObject& scanExpirationTimer = rootWLan.AddChildObjectL( KNSmlWLanScanExpirationTimer );
hgs
parents:
diff changeset
   315
    FillNodeInfoL( scanExpirationTimer,
hgs
parents:
diff changeset
   316
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   317
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   318
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   319
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   320
    			KNSmlEmpty );
hgs
parents:
diff changeset
   321
hgs
parents:
diff changeset
   322
    //WLAN/UnloadDriverTimer
hgs
parents:
diff changeset
   323
    MSmlDmDDFObject& unloadDriverTimer = rootWLan.AddChildObjectL( KNSmlWLanUnloadDriverTimer );
hgs
parents:
diff changeset
   324
    FillNodeInfoL( unloadDriverTimer,
hgs
parents:
diff changeset
   325
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   326
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   327
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   328
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   329
    			KNSmlEmpty );
hgs
parents:
diff changeset
   330
    			
hgs
parents:
diff changeset
   331
    //WLAN/RoamTimer
hgs
parents:
diff changeset
   332
    MSmlDmDDFObject& roamTimer = rootWLan.AddChildObjectL( KNSmlWLanRoamTimer );
hgs
parents:
diff changeset
   333
    FillNodeInfoL( roamTimer,
hgs
parents:
diff changeset
   334
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   335
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   336
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   337
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   338
    			KNSmlEmpty );
hgs
parents:
diff changeset
   339
    			
hgs
parents:
diff changeset
   340
    //WLAN/KNSmlWLanRCPIDifference
hgs
parents:
diff changeset
   341
    MSmlDmDDFObject& RCPIDifference = rootWLan.AddChildObjectL( KNSmlWLanRCPIDifference );
hgs
parents:
diff changeset
   342
    FillNodeInfoL( RCPIDifference,
hgs
parents:
diff changeset
   343
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   344
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   345
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   346
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   347
    			KNSmlEmpty );
hgs
parents:
diff changeset
   348
hgs
parents:
diff changeset
   349
    //WLAN/ConnRegainTimer
hgs
parents:
diff changeset
   350
    MSmlDmDDFObject& connRegainTimer = rootWLan.AddChildObjectL( KNSmlWLanConnRegainTimer );
hgs
parents:
diff changeset
   351
    FillNodeInfoL( connRegainTimer,
hgs
parents:
diff changeset
   352
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   353
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   354
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   355
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   356
    			KNSmlEmpty );
hgs
parents:
diff changeset
   357
hgs
parents:
diff changeset
   358
    //WLAN/MaxTriesToFindNw
hgs
parents:
diff changeset
   359
    MSmlDmDDFObject& maxTriesToFindNw = rootWLan.AddChildObjectL( KNSmlWLanMaxTriesToFindNw );
hgs
parents:
diff changeset
   360
    FillNodeInfoL( maxTriesToFindNw,
hgs
parents:
diff changeset
   361
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   362
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   363
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   364
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   365
    			KNSmlEmpty );
hgs
parents:
diff changeset
   366
hgs
parents:
diff changeset
   367
    //WLAN/DelayBetweenFindNw
hgs
parents:
diff changeset
   368
    MSmlDmDDFObject& delayBetweenFindNw = rootWLan.AddChildObjectL( KNSmlWLanDelayBetweenFindNw );
hgs
parents:
diff changeset
   369
    FillNodeInfoL( delayBetweenFindNw,
hgs
parents:
diff changeset
   370
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   371
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   372
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   373
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   374
    			KNSmlEmpty );
hgs
parents:
diff changeset
   375
hgs
parents:
diff changeset
   376
    //WLAN/AllowRadioMeasurements
hgs
parents:
diff changeset
   377
    MSmlDmDDFObject& allowRadioMeasurements = rootWLan.AddChildObjectL( KNSmlWLanAllowRadioMeasurements );
hgs
parents:
diff changeset
   378
    FillNodeInfoL( allowRadioMeasurements,
hgs
parents:
diff changeset
   379
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   380
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   381
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   382
    			MSmlDmDDFObject::EBool,
hgs
parents:
diff changeset
   383
    			KNSmlEmpty );
hgs
parents:
diff changeset
   384
hgs
parents:
diff changeset
   385
    //WLAN/MinPassiveChannelTime
hgs
parents:
diff changeset
   386
    MSmlDmDDFObject& minPassiveChannelTime = rootWLan.AddChildObjectL( KNSmlWLanMinPassiveChannelTime );
hgs
parents:
diff changeset
   387
    FillNodeInfoL( minPassiveChannelTime,
hgs
parents:
diff changeset
   388
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   389
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   390
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   391
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   392
    			KNSmlEmpty );
hgs
parents:
diff changeset
   393
    			
hgs
parents:
diff changeset
   394
    //WLAN/MaxPassiveChannelTime
hgs
parents:
diff changeset
   395
    MSmlDmDDFObject& maxPassiveChannelTime = rootWLan.AddChildObjectL( KNSmlWLanMaxPassiveChannelTime );
hgs
parents:
diff changeset
   396
    FillNodeInfoL( maxPassiveChannelTime,
hgs
parents:
diff changeset
   397
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   398
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   399
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   400
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   401
    			KNSmlEmpty );
hgs
parents:
diff changeset
   402
    			
hgs
parents:
diff changeset
   403
    //WLAN/MaxApFailureCount
hgs
parents:
diff changeset
   404
    MSmlDmDDFObject& maxApFailureCount = rootWLan.AddChildObjectL( KNSmlWLanMaxApFailureCount );
hgs
parents:
diff changeset
   405
    FillNodeInfoL( maxApFailureCount,
hgs
parents:
diff changeset
   406
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   407
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   408
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   409
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   410
    			KNSmlEmpty );
hgs
parents:
diff changeset
   411
hgs
parents:
diff changeset
   412
    //WLAN/LongBeaconFindCount
hgs
parents:
diff changeset
   413
    MSmlDmDDFObject& longBeaconFindCount = rootWLan.AddChildObjectL( KNSmlWLanLongBeaconFindCount );
hgs
parents:
diff changeset
   414
    FillNodeInfoL( longBeaconFindCount,
hgs
parents:
diff changeset
   415
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   416
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   417
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   418
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   419
    			KNSmlEmpty );
hgs
parents:
diff changeset
   420
    			
hgs
parents:
diff changeset
   421
    //WLAN/QosNullFrameInterval
hgs
parents:
diff changeset
   422
    MSmlDmDDFObject& qosNullFrameInterval = rootWLan.AddChildObjectL( KNSmlWLanQosNullFrameInterval );
hgs
parents:
diff changeset
   423
    FillNodeInfoL( qosNullFrameInterval,
hgs
parents:
diff changeset
   424
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   425
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   426
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   427
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   428
    			KNSmlEmpty );
hgs
parents:
diff changeset
   429
hgs
parents:
diff changeset
   430
    //WLAN/QosNullFrameTimeout
hgs
parents:
diff changeset
   431
    MSmlDmDDFObject& qosNullFrameTimeout = rootWLan.AddChildObjectL( KNSmlWLanQosNullFrameTimeout );
hgs
parents:
diff changeset
   432
    FillNodeInfoL( qosNullFrameTimeout,
hgs
parents:
diff changeset
   433
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   434
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   435
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   436
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   437
    			KNSmlEmpty );
hgs
parents:
diff changeset
   438
hgs
parents:
diff changeset
   439
    //WLAN/MTU
hgs
parents:
diff changeset
   440
    MSmlDmDDFObject& MTU = rootWLan.AddChildObjectL( KNSmlWLanMTU );
hgs
parents:
diff changeset
   441
    FillNodeInfoL( MTU,
hgs
parents:
diff changeset
   442
    			accessTypesGetAddReplace,
hgs
parents:
diff changeset
   443
    			MSmlDmDDFObject::EZeroOrOne,
hgs
parents:
diff changeset
   444
    			MSmlDmDDFObject::EDynamic,
hgs
parents:
diff changeset
   445
    			MSmlDmDDFObject::EInt,
hgs
parents:
diff changeset
   446
    			KNSmlEmpty );
hgs
parents:
diff changeset
   447
hgs
parents:
diff changeset
   448
hgs
parents:
diff changeset
   449
    _DBG_FILE("CGlobalWLANAdapter::DDFStructureL(): end");
hgs
parents:
diff changeset
   450
    }
hgs
parents:
diff changeset
   451
    
hgs
parents:
diff changeset
   452
      
hgs
parents:
diff changeset
   453
hgs
parents:
diff changeset
   454
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   455
// CGlobalWLANAdapter* CGlobalWLANAdapter::AddLeafObjectL( const TDesC& aURI,const 
hgs
parents:
diff changeset
   456
// TDesC& aParentLUID, const TDesC8& aObject, const TDesC& aType, 
hgs
parents:
diff changeset
   457
// const TInt aStatusRef )
hgs
parents:
diff changeset
   458
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
   459
void CGlobalWLANAdapter::AddLeafObjectL( const TDesC8& aURI,
hgs
parents:
diff changeset
   460
                                       const TDesC8& aParentLUID, 
hgs
parents:
diff changeset
   461
                                       const TDesC8& aObject, 
hgs
parents:
diff changeset
   462
                                       const TDesC8& /*aType*/, 
hgs
parents:
diff changeset
   463
                                       const TInt aStatusRef )
hgs
parents:
diff changeset
   464
    {
hgs
parents:
diff changeset
   465
    DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL - <%S> <%S>"), &aURI, &aParentLUID );
hgs
parents:
diff changeset
   466
hgs
parents:
diff changeset
   467
    // Get the last uri segment and the number of uri items in the input
hgs
parents:
diff changeset
   468
    TInt uriSegs = NumOfUriSegs( aURI );
hgs
parents:
diff changeset
   469
    TInt err(KErrNone);
hgs
parents:
diff changeset
   470
    TPtrC8 lastUriSeg = GetLastUriSeg( aURI );
hgs
parents:
diff changeset
   471
    
hgs
parents:
diff changeset
   472
    //**************************************************************************
hgs
parents:
diff changeset
   473
    // Check which leaf is in question
hgs
parents:
diff changeset
   474
    //**************************************************************************
hgs
parents:
diff changeset
   475
    if( aURI.Match( _L8("WLAN/*" ) ) != KErrNotFound && uriSegs==2 )
hgs
parents:
diff changeset
   476
    	{  
hgs
parents:
diff changeset
   477
      	// *****************************************************************
hgs
parents:
diff changeset
   478
      	if( lastUriSeg.Match( KNSmlWLanInternetConnectivityTest ) != KErrNotFound )
hgs
parents:
diff changeset
   479
      		{
hgs
parents:
diff changeset
   480
      		// check whether input is of legal size
hgs
parents:
diff changeset
   481
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   482
      			{
hgs
parents:
diff changeset
   483
      	    	//store the parameter
hgs
parents:
diff changeset
   484
      	    	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   485
      	    	
hgs
parents:
diff changeset
   486
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   487
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   488
      	    		{
hgs
parents:
diff changeset
   489
      	    		iWriteSettings->internetConnectivityTest = err;
hgs
parents:
diff changeset
   490
      	    		iWriteSettings->internetConnectivityTestPresent = ETrue;
hgs
parents:
diff changeset
   491
      	    		iWriteStatuses->internetConnectivityTestStatus = aStatusRef;
hgs
parents:
diff changeset
   492
      	    		err = KErrNone;
hgs
parents:
diff changeset
   493
      	    		}
hgs
parents:
diff changeset
   494
      			}
hgs
parents:
diff changeset
   495
      		else
hgs
parents:
diff changeset
   496
      			{
hgs
parents:
diff changeset
   497
      			err = KErrTooBig;
hgs
parents:
diff changeset
   498
      			}
hgs
parents:
diff changeset
   499
      		}
hgs
parents:
diff changeset
   500
      	
hgs
parents:
diff changeset
   501
      	// *****************************************************************
hgs
parents:
diff changeset
   502
      	else if( lastUriSeg.Match( KNSmlWLanUseDefaultSettings ) != KErrNotFound )
hgs
parents:
diff changeset
   503
      		{
hgs
parents:
diff changeset
   504
      		// check whether input is of legal size
hgs
parents:
diff changeset
   505
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   506
      			{
hgs
parents:
diff changeset
   507
      		    //store the parameter 
hgs
parents:
diff changeset
   508
      		    if( aObject.MatchF( _L8("True")) != KErrNotFound ||
hgs
parents:
diff changeset
   509
      		    	aObject.MatchF( _L8("true")) != KErrNotFound )
hgs
parents:
diff changeset
   510
                	{
hgs
parents:
diff changeset
   511
                	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   512
                	iWriteSettings->useDefaultSettings = ETrue;
hgs
parents:
diff changeset
   513
                	iWriteSettings->useDefaultSettingsPresent = ETrue;
hgs
parents:
diff changeset
   514
                	iWriteStatuses->useDefaultSettingsStatus = aStatusRef;
hgs
parents:
diff changeset
   515
                	}
hgs
parents:
diff changeset
   516
            	else if ( aObject.MatchF( _L8("False")) != KErrNotFound ||
hgs
parents:
diff changeset
   517
            			  aObject.MatchF( _L8("false")) != KErrNotFound )
hgs
parents:
diff changeset
   518
                	{
hgs
parents:
diff changeset
   519
                	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   520
                	iWriteSettings->useDefaultSettings = EFalse;
hgs
parents:
diff changeset
   521
                	iWriteSettings->useDefaultSettingsPresent = ETrue;
hgs
parents:
diff changeset
   522
                	iWriteStatuses->useDefaultSettingsStatus = aStatusRef;
hgs
parents:
diff changeset
   523
                	}
hgs
parents:
diff changeset
   524
              	else 
hgs
parents:
diff changeset
   525
              		{
hgs
parents:
diff changeset
   526
              		err = KErrArgument;
hgs
parents:
diff changeset
   527
              		}
hgs
parents:
diff changeset
   528
            	}
hgs
parents:
diff changeset
   529
      		else
hgs
parents:
diff changeset
   530
      			{
hgs
parents:
diff changeset
   531
      			err = KErrTooBig;
hgs
parents:
diff changeset
   532
      			}
hgs
parents:
diff changeset
   533
      		}	
hgs
parents:
diff changeset
   534
      	// *****************************************************************
hgs
parents:
diff changeset
   535
      	else if( lastUriSeg.Match( KNSmlWLanLongRetryLimit ) != KErrNotFound )
hgs
parents:
diff changeset
   536
      		{
hgs
parents:
diff changeset
   537
      		// check whether input is of legal size
hgs
parents:
diff changeset
   538
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   539
      			{
hgs
parents:
diff changeset
   540
      	    	//store the parameter
hgs
parents:
diff changeset
   541
      	    	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   542
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   543
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   544
      	    		{
hgs
parents:
diff changeset
   545
      	    		iWriteSettings->longRetryLimit = err;
hgs
parents:
diff changeset
   546
      	    		iWriteSettings->longRetryLimitPresent = ETrue;
hgs
parents:
diff changeset
   547
      	    		iWriteStatuses->longRetryLimitStatus = aStatusRef;
hgs
parents:
diff changeset
   548
      	    		err = KErrNone;
hgs
parents:
diff changeset
   549
      	    		}
hgs
parents:
diff changeset
   550
      			}
hgs
parents:
diff changeset
   551
      		else
hgs
parents:
diff changeset
   552
      			{
hgs
parents:
diff changeset
   553
      			err = KErrTooBig;
hgs
parents:
diff changeset
   554
      			}
hgs
parents:
diff changeset
   555
      		}
hgs
parents:
diff changeset
   556
      	// *****************************************************************
hgs
parents:
diff changeset
   557
      	else if( lastUriSeg.Match( KNSmlWLanShortRetryLimit ) != KErrNotFound )
hgs
parents:
diff changeset
   558
      		{
hgs
parents:
diff changeset
   559
      		// check whether input is of legal size
hgs
parents:
diff changeset
   560
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   561
      			{
hgs
parents:
diff changeset
   562
				//store the parameter
hgs
parents:
diff changeset
   563
				DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   564
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   565
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   566
      	    		{
hgs
parents:
diff changeset
   567
      	    		iWriteSettings->shortRetryLimit = err;
hgs
parents:
diff changeset
   568
      	    		iWriteSettings->shortRetryLimitPresent = ETrue;
hgs
parents:
diff changeset
   569
      	    		iWriteStatuses->shortRetryLimitStatus = aStatusRef;
hgs
parents:
diff changeset
   570
      	    		err = KErrNone;
hgs
parents:
diff changeset
   571
      	    		}
hgs
parents:
diff changeset
   572
      			}
hgs
parents:
diff changeset
   573
      		else
hgs
parents:
diff changeset
   574
      			{
hgs
parents:
diff changeset
   575
      			err = KErrTooBig;
hgs
parents:
diff changeset
   576
      			}
hgs
parents:
diff changeset
   577
      		}	
hgs
parents:
diff changeset
   578
      	// *****************************************************************
hgs
parents:
diff changeset
   579
      	else if( lastUriSeg.Match( KNSmlWLanRTSThreshold ) != KErrNotFound )
hgs
parents:
diff changeset
   580
      		{
hgs
parents:
diff changeset
   581
      		// check whether input is of legal size
hgs
parents:
diff changeset
   582
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   583
      			{
hgs
parents:
diff changeset
   584
      			DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   585
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   586
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   587
      	    		{
hgs
parents:
diff changeset
   588
      	    		iWriteSettings->RTSThreshold = err;
hgs
parents:
diff changeset
   589
      	    		iWriteSettings->RTSThresholdPresent = ETrue;
hgs
parents:
diff changeset
   590
      	    		iWriteStatuses->RTSThresholdStatus = aStatusRef;
hgs
parents:
diff changeset
   591
      	    		err = KErrNone;
hgs
parents:
diff changeset
   592
      	    		}
hgs
parents:
diff changeset
   593
      			}
hgs
parents:
diff changeset
   594
      		else
hgs
parents:
diff changeset
   595
      			{
hgs
parents:
diff changeset
   596
      			err = KErrTooBig;
hgs
parents:
diff changeset
   597
      			}
hgs
parents:
diff changeset
   598
      		}
hgs
parents:
diff changeset
   599
      	// *****************************************************************
hgs
parents:
diff changeset
   600
      	else if( lastUriSeg.Match( KNSmlWLanTXPowerLevel ) != KErrNotFound )
hgs
parents:
diff changeset
   601
      		{
hgs
parents:
diff changeset
   602
      		// check whether input is of legal size
hgs
parents:
diff changeset
   603
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   604
      			{
hgs
parents:
diff changeset
   605
      			DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   606
      		  	//store the parameter
hgs
parents:
diff changeset
   607
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   608
      	    	if ( err >= 0)
hgs
parents:
diff changeset
   609
      	    		{
hgs
parents:
diff changeset
   610
      	    		iWriteSettings->TXPowerLevel = err;
hgs
parents:
diff changeset
   611
      	    		iWriteSettings->TXPowerLevelPresent = ETrue;
hgs
parents:
diff changeset
   612
      	    		iWriteStatuses->TXPowerLevelStatus = aStatusRef;
hgs
parents:
diff changeset
   613
      	    		err = KErrNone;
hgs
parents:
diff changeset
   614
      	    		}
hgs
parents:
diff changeset
   615
      			}
hgs
parents:
diff changeset
   616
      		else
hgs
parents:
diff changeset
   617
      			{
hgs
parents:
diff changeset
   618
      			err = KErrTooBig;
hgs
parents:
diff changeset
   619
      			}
hgs
parents:
diff changeset
   620
      		}
hgs
parents:
diff changeset
   621
       	// *****************************************************************
hgs
parents:
diff changeset
   622
      	else if( lastUriSeg.Match( KNSmlWLanPowerSaving ) != KErrNotFound )
hgs
parents:
diff changeset
   623
      		{
hgs
parents:
diff changeset
   624
      		// check whether input is of legal size
hgs
parents:
diff changeset
   625
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   626
      			{
hgs
parents:
diff changeset
   627
      		  	//store the parameter 
hgs
parents:
diff changeset
   628
      		  	if( aObject.MatchF( _L8("True")) != KErrNotFound ||
hgs
parents:
diff changeset
   629
      		  		aObject.MatchF( _L8("true")) != KErrNotFound )
hgs
parents:
diff changeset
   630
              		{
hgs
parents:
diff changeset
   631
              		DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   632
              		iWriteSettings->powerSaving = ETrue;
hgs
parents:
diff changeset
   633
              		iWriteSettings->powerSavingPresent = ETrue;
hgs
parents:
diff changeset
   634
              		iWriteStatuses->powerSavingStatus = aStatusRef;
hgs
parents:
diff changeset
   635
              		}
hgs
parents:
diff changeset
   636
           		else if ( aObject.MatchF( _L8("False")) != KErrNotFound ||
hgs
parents:
diff changeset
   637
           				  aObject.MatchF( _L8("false")) != KErrNotFound )
hgs
parents:
diff changeset
   638
              		{
hgs
parents:
diff changeset
   639
              		DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   640
              		iWriteSettings->powerSaving = EFalse;
hgs
parents:
diff changeset
   641
              		iWriteSettings->powerSavingPresent = ETrue;
hgs
parents:
diff changeset
   642
              		iWriteStatuses->powerSavingStatus = aStatusRef;
hgs
parents:
diff changeset
   643
              		}
hgs
parents:
diff changeset
   644
            	else
hgs
parents:
diff changeset
   645
            		{
hgs
parents:
diff changeset
   646
            		err = KErrArgument;
hgs
parents:
diff changeset
   647
            		}
hgs
parents:
diff changeset
   648
      			}
hgs
parents:
diff changeset
   649
      		else
hgs
parents:
diff changeset
   650
      			{
hgs
parents:
diff changeset
   651
      			err = KErrTooBig;
hgs
parents:
diff changeset
   652
      			}
hgs
parents:
diff changeset
   653
      		}	
hgs
parents:
diff changeset
   654
      	// *****************************************************************
hgs
parents:
diff changeset
   655
      	else if( lastUriSeg.Match( KNSmlWLanBackgroundScanInterval ) != KErrNotFound )
hgs
parents:
diff changeset
   656
      		{
hgs
parents:
diff changeset
   657
      		// check whether input is of legal size
hgs
parents:
diff changeset
   658
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   659
      			{
hgs
parents:
diff changeset
   660
				//store the parameter
hgs
parents:
diff changeset
   661
				DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   662
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   663
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   664
      	    		{
hgs
parents:
diff changeset
   665
      	    		iWriteSettings->backgroundScanInterval = err;
hgs
parents:
diff changeset
   666
      	    		iWriteSettings->backgroundScanIntervalPresent = ETrue;
hgs
parents:
diff changeset
   667
      	    		iWriteStatuses->backgroundScanIntervalStatus = aStatusRef;
hgs
parents:
diff changeset
   668
      	    		err = KErrNone;
hgs
parents:
diff changeset
   669
      	    		}
hgs
parents:
diff changeset
   670
      			}
hgs
parents:
diff changeset
   671
      		else
hgs
parents:
diff changeset
   672
      			{
hgs
parents:
diff changeset
   673
      			err = KErrTooBig;
hgs
parents:
diff changeset
   674
      			}
hgs
parents:
diff changeset
   675
      		}
hgs
parents:
diff changeset
   676
      	// *****************************************************************
hgs
parents:
diff changeset
   677
      	else if( lastUriSeg.Match( KNSmlWLanScanRate ) != KErrNotFound )
hgs
parents:
diff changeset
   678
      		{
hgs
parents:
diff changeset
   679
      		// check whether input is of legal size
hgs
parents:
diff changeset
   680
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   681
      			{
hgs
parents:
diff changeset
   682
      			//store the parameter
hgs
parents:
diff changeset
   683
      			DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   684
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   685
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   686
      	    		{
hgs
parents:
diff changeset
   687
      	    		iWriteSettings->scanRate = err;
hgs
parents:
diff changeset
   688
      	    		iWriteSettings->scanRatePresent = ETrue;
hgs
parents:
diff changeset
   689
      	    		iWriteStatuses->scanRateStatus = aStatusRef;
hgs
parents:
diff changeset
   690
      	    		err = KErrNone;
hgs
parents:
diff changeset
   691
      	    		}
hgs
parents:
diff changeset
   692
      			}
hgs
parents:
diff changeset
   693
      		else
hgs
parents:
diff changeset
   694
      			{
hgs
parents:
diff changeset
   695
      			err = KErrTooBig;
hgs
parents:
diff changeset
   696
      			}
hgs
parents:
diff changeset
   697
      		}	
hgs
parents:
diff changeset
   698
      	// *****************************************************************
hgs
parents:
diff changeset
   699
      	else if( lastUriSeg.Match( KNSmlWLanRCPITrigger ) != KErrNotFound )
hgs
parents:
diff changeset
   700
      		{
hgs
parents:
diff changeset
   701
      		// check whether input is of legal size
hgs
parents:
diff changeset
   702
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   703
      			{
hgs
parents:
diff changeset
   704
      		  	//store the parameter
hgs
parents:
diff changeset
   705
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   706
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   707
      	    	if ( err >= 0)
hgs
parents:
diff changeset
   708
      	    		{
hgs
parents:
diff changeset
   709
      	    		iWriteSettings->RCPITrigger = err;
hgs
parents:
diff changeset
   710
      	    		iWriteSettings->RCPITriggerPresent = ETrue;
hgs
parents:
diff changeset
   711
      	    		iWriteStatuses->RCPITriggerStatus = aStatusRef;
hgs
parents:
diff changeset
   712
      	    		err = KErrNone;
hgs
parents:
diff changeset
   713
      	    		}
hgs
parents:
diff changeset
   714
      			}
hgs
parents:
diff changeset
   715
      		else
hgs
parents:
diff changeset
   716
      			{
hgs
parents:
diff changeset
   717
      			err = KErrTooBig;
hgs
parents:
diff changeset
   718
      			}
hgs
parents:
diff changeset
   719
      		}	
hgs
parents:
diff changeset
   720
      	// *****************************************************************
hgs
parents:
diff changeset
   721
      	else if( lastUriSeg.Match( KNSmlWLanMinActiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
   722
      		{
hgs
parents:
diff changeset
   723
      		// check whether input is of legal size
hgs
parents:
diff changeset
   724
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   725
      			{
hgs
parents:
diff changeset
   726
      		  	//store the parameter
hgs
parents:
diff changeset
   727
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   728
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   729
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   730
      	    		{
hgs
parents:
diff changeset
   731
      	    		iWriteSettings->minActiveChannelTime = err;
hgs
parents:
diff changeset
   732
      	    		iWriteSettings->minActiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
   733
      	    		iWriteStatuses->minActiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
   734
      	    		err = KErrNone;
hgs
parents:
diff changeset
   735
      	    		}
hgs
parents:
diff changeset
   736
      			}
hgs
parents:
diff changeset
   737
      		else
hgs
parents:
diff changeset
   738
      			{
hgs
parents:
diff changeset
   739
      			err = KErrTooBig;
hgs
parents:
diff changeset
   740
      			}
hgs
parents:
diff changeset
   741
      		}
hgs
parents:
diff changeset
   742
      	// *****************************************************************
hgs
parents:
diff changeset
   743
      	else if( lastUriSeg.Match( KNSmlWLanMaxActiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
   744
      		{
hgs
parents:
diff changeset
   745
      		// check whether input is of legal size
hgs
parents:
diff changeset
   746
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   747
      			{
hgs
parents:
diff changeset
   748
      		  	//store the parameter
hgs
parents:
diff changeset
   749
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   750
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   751
      	    	if ( err >= 0)
hgs
parents:
diff changeset
   752
      	    		{
hgs
parents:
diff changeset
   753
      	    		iWriteSettings->maxActiveChannelTime = err;
hgs
parents:
diff changeset
   754
      	    		iWriteSettings->maxActiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
   755
      	    		iWriteStatuses->maxActiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
   756
      	    		err = KErrNone;
hgs
parents:
diff changeset
   757
      	    		}
hgs
parents:
diff changeset
   758
      			}
hgs
parents:
diff changeset
   759
      		else
hgs
parents:
diff changeset
   760
      			{
hgs
parents:
diff changeset
   761
      			err = KErrTooBig;
hgs
parents:
diff changeset
   762
      			}
hgs
parents:
diff changeset
   763
      		}
hgs
parents:
diff changeset
   764
      	// *****************************************************************
hgs
parents:
diff changeset
   765
      	else if( lastUriSeg.Match( KNSmlWLanMaxTxMSDULifeTime ) != KErrNotFound )
hgs
parents:
diff changeset
   766
      		{
hgs
parents:
diff changeset
   767
      		// check whether input is of legal size
hgs
parents:
diff changeset
   768
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   769
      			{
hgs
parents:
diff changeset
   770
      		  	//store the parameter
hgs
parents:
diff changeset
   771
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   772
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   773
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   774
      	    		{
hgs
parents:
diff changeset
   775
      	    		iWriteSettings->maxTxMSDULifeTime = err;
hgs
parents:
diff changeset
   776
      	    		iWriteSettings->maxTxMSDULifeTimePresent = ETrue;
hgs
parents:
diff changeset
   777
      	    		iWriteStatuses->maxTxMSDULifeTimeStatus = aStatusRef;
hgs
parents:
diff changeset
   778
      	    		err = KErrNone;
hgs
parents:
diff changeset
   779
      	    		}
hgs
parents:
diff changeset
   780
      			}
hgs
parents:
diff changeset
   781
      		else
hgs
parents:
diff changeset
   782
      			{
hgs
parents:
diff changeset
   783
      			err = KErrTooBig;
hgs
parents:
diff changeset
   784
      			}
hgs
parents:
diff changeset
   785
      		}
hgs
parents:
diff changeset
   786
      	// *****************************************************************
hgs
parents:
diff changeset
   787
      	else if( lastUriSeg.Match( KNSmlWLanScanExpirationTimer ) != KErrNotFound )
hgs
parents:
diff changeset
   788
      		{
hgs
parents:
diff changeset
   789
      		// check whether input is of legal size
hgs
parents:
diff changeset
   790
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   791
      			{
hgs
parents:
diff changeset
   792
      		  	//store the parameter
hgs
parents:
diff changeset
   793
      			DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   794
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   795
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   796
      	    		{
hgs
parents:
diff changeset
   797
      	    		iWriteSettings->scanExpirationTimer = err;
hgs
parents:
diff changeset
   798
      	    		iWriteSettings->scanExpirationTimerPresent = ETrue;
hgs
parents:
diff changeset
   799
      	    		iWriteStatuses->scanExpirationTimerStatus = aStatusRef;
hgs
parents:
diff changeset
   800
      	    		err = KErrNone;
hgs
parents:
diff changeset
   801
      	    		}
hgs
parents:
diff changeset
   802
      			}
hgs
parents:
diff changeset
   803
      		else
hgs
parents:
diff changeset
   804
      			{
hgs
parents:
diff changeset
   805
      			err = KErrTooBig;
hgs
parents:
diff changeset
   806
      			}
hgs
parents:
diff changeset
   807
      		}
hgs
parents:
diff changeset
   808
      	// *****************************************************************
hgs
parents:
diff changeset
   809
      	else if( lastUriSeg.Match( KNSmlWLanUnloadDriverTimer ) != KErrNotFound )
hgs
parents:
diff changeset
   810
      		{
hgs
parents:
diff changeset
   811
      		// check whether input is of legal size
hgs
parents:
diff changeset
   812
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   813
      			{
hgs
parents:
diff changeset
   814
      		  	//store the parameter
hgs
parents:
diff changeset
   815
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   816
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   817
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   818
      	    		{
hgs
parents:
diff changeset
   819
      	    		iWriteSettings->unloadDriverTimer = err;
hgs
parents:
diff changeset
   820
      	    		iWriteSettings->unloadDriverTimerPresent = ETrue;
hgs
parents:
diff changeset
   821
      	    		iWriteStatuses->unloadDriverTimerStatus = aStatusRef;
hgs
parents:
diff changeset
   822
      	    		err = KErrNone;
hgs
parents:
diff changeset
   823
      	    		}
hgs
parents:
diff changeset
   824
      			}
hgs
parents:
diff changeset
   825
      		else
hgs
parents:
diff changeset
   826
      			{
hgs
parents:
diff changeset
   827
      			err = KErrTooBig;
hgs
parents:
diff changeset
   828
      			}
hgs
parents:
diff changeset
   829
      		}
hgs
parents:
diff changeset
   830
      	// *****************************************************************
hgs
parents:
diff changeset
   831
      	else if( lastUriSeg.Match( KNSmlWLanRoamTimer ) != KErrNotFound )
hgs
parents:
diff changeset
   832
      		{
hgs
parents:
diff changeset
   833
      		// check whether input is of legal size
hgs
parents:
diff changeset
   834
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   835
      			{
hgs
parents:
diff changeset
   836
      		  	//store the parameter
hgs
parents:
diff changeset
   837
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   838
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   839
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   840
      	    		{
hgs
parents:
diff changeset
   841
      	    		iWriteSettings->roamTimer = err;
hgs
parents:
diff changeset
   842
      	    		iWriteSettings->roamTimerPresent = ETrue;
hgs
parents:
diff changeset
   843
      	    		iWriteStatuses->roamTimerStatus = aStatusRef;
hgs
parents:
diff changeset
   844
      	    		err = KErrNone;
hgs
parents:
diff changeset
   845
      	    		}
hgs
parents:
diff changeset
   846
      			}
hgs
parents:
diff changeset
   847
      		else
hgs
parents:
diff changeset
   848
      			{
hgs
parents:
diff changeset
   849
      			err = KErrTooBig;
hgs
parents:
diff changeset
   850
      			}
hgs
parents:
diff changeset
   851
      		}
hgs
parents:
diff changeset
   852
       	// *****************************************************************
hgs
parents:
diff changeset
   853
      	else if( lastUriSeg.Match( KNSmlWLanRCPIDifference ) != KErrNotFound )
hgs
parents:
diff changeset
   854
      		{
hgs
parents:
diff changeset
   855
      		// check whether input is of legal size
hgs
parents:
diff changeset
   856
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   857
      			{
hgs
parents:
diff changeset
   858
      		  	//store the parameter
hgs
parents:
diff changeset
   859
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   860
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   861
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   862
      	    		{
hgs
parents:
diff changeset
   863
      	    		iWriteSettings->RCPIDifference = err;
hgs
parents:
diff changeset
   864
      	    		iWriteSettings->RCPIDifferencePresent = ETrue;
hgs
parents:
diff changeset
   865
      	    		iWriteStatuses->RCPIDifferenceStatus = aStatusRef;
hgs
parents:
diff changeset
   866
      	    		err = KErrNone;
hgs
parents:
diff changeset
   867
      	    		}
hgs
parents:
diff changeset
   868
      			}
hgs
parents:
diff changeset
   869
      		else
hgs
parents:
diff changeset
   870
      			{
hgs
parents:
diff changeset
   871
      			err = KErrTooBig;
hgs
parents:
diff changeset
   872
      			}
hgs
parents:
diff changeset
   873
      		}
hgs
parents:
diff changeset
   874
      	// *****************************************************************
hgs
parents:
diff changeset
   875
      	else if( lastUriSeg.Match( KNSmlWLanConnRegainTimer ) != KErrNotFound )
hgs
parents:
diff changeset
   876
      		{
hgs
parents:
diff changeset
   877
      		// check whether input is of legal size
hgs
parents:
diff changeset
   878
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   879
      			{
hgs
parents:
diff changeset
   880
      		  	//store the parameter
hgs
parents:
diff changeset
   881
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   882
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   883
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   884
      	    		{
hgs
parents:
diff changeset
   885
      	    		iWriteSettings->connRegainTimer = err;
hgs
parents:
diff changeset
   886
      	    		iWriteSettings->connRegainTimerPresent = ETrue;
hgs
parents:
diff changeset
   887
      	    		iWriteStatuses->connRegainTimerStatus = aStatusRef;
hgs
parents:
diff changeset
   888
      	    		err = KErrNone;
hgs
parents:
diff changeset
   889
      	    		}
hgs
parents:
diff changeset
   890
      			}
hgs
parents:
diff changeset
   891
      		else
hgs
parents:
diff changeset
   892
      			{
hgs
parents:
diff changeset
   893
      			err = KErrTooBig;
hgs
parents:
diff changeset
   894
      			}
hgs
parents:
diff changeset
   895
      		}
hgs
parents:
diff changeset
   896
      	// *****************************************************************
hgs
parents:
diff changeset
   897
      	else if( lastUriSeg.Match( KNSmlWLanMaxTriesToFindNw ) != KErrNotFound )
hgs
parents:
diff changeset
   898
      		{
hgs
parents:
diff changeset
   899
      		// check whether input is of legal size
hgs
parents:
diff changeset
   900
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   901
      			{
hgs
parents:
diff changeset
   902
      		  	//store the parameter
hgs
parents:
diff changeset
   903
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   904
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   905
      	    	if ( err >= 0)
hgs
parents:
diff changeset
   906
      	    		{
hgs
parents:
diff changeset
   907
      	    		iWriteSettings->maxTriesToFindNw = err;
hgs
parents:
diff changeset
   908
      	    		iWriteSettings->maxTriesToFindNwPresent = ETrue;
hgs
parents:
diff changeset
   909
      	    		iWriteStatuses->maxTriesToFindNwStatus = aStatusRef;
hgs
parents:
diff changeset
   910
      	    		err = KErrNone;
hgs
parents:
diff changeset
   911
      	    		}
hgs
parents:
diff changeset
   912
      			}
hgs
parents:
diff changeset
   913
      		else
hgs
parents:
diff changeset
   914
      			{
hgs
parents:
diff changeset
   915
      			err = KErrTooBig;
hgs
parents:
diff changeset
   916
      			}
hgs
parents:
diff changeset
   917
      		}
hgs
parents:
diff changeset
   918
      	// *****************************************************************
hgs
parents:
diff changeset
   919
      	else if( lastUriSeg.Match( KNSmlWLanDelayBetweenFindNw ) != KErrNotFound )
hgs
parents:
diff changeset
   920
      		{
hgs
parents:
diff changeset
   921
      		// check whether input is of legal size
hgs
parents:
diff changeset
   922
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   923
      			{
hgs
parents:
diff changeset
   924
      		  	//store the parameter
hgs
parents:
diff changeset
   925
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   926
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   927
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   928
      	    		{
hgs
parents:
diff changeset
   929
      	    		iWriteSettings->delayBetweenFindNw = err;
hgs
parents:
diff changeset
   930
      	    		iWriteSettings->delayBetweenFindNwPresent = ETrue;
hgs
parents:
diff changeset
   931
      	    		iWriteStatuses->delayBetweenFindNwStatus = aStatusRef;
hgs
parents:
diff changeset
   932
      	    		err = KErrNone;
hgs
parents:
diff changeset
   933
      	    		}
hgs
parents:
diff changeset
   934
      			}
hgs
parents:
diff changeset
   935
      		else
hgs
parents:
diff changeset
   936
      			{
hgs
parents:
diff changeset
   937
      			err = KErrTooBig;
hgs
parents:
diff changeset
   938
      			}
hgs
parents:
diff changeset
   939
      		}
hgs
parents:
diff changeset
   940
      	// *****************************************************************
hgs
parents:
diff changeset
   941
      	else if( lastUriSeg.Match( KNSmlWLanAllowRadioMeasurements ) != KErrNotFound )
hgs
parents:
diff changeset
   942
      		{
hgs
parents:
diff changeset
   943
      		// check whether input is of legal size
hgs
parents:
diff changeset
   944
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   945
      			{
hgs
parents:
diff changeset
   946
      		  	if( aObject.MatchF( _L8("True")) != KErrNotFound ||
hgs
parents:
diff changeset
   947
      		  		aObject.MatchF( _L8("true")) != KErrNotFound )
hgs
parents:
diff changeset
   948
              		{
hgs
parents:
diff changeset
   949
              		DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   950
              		iWriteSettings->allowRadioMeasurements = ETrue;
hgs
parents:
diff changeset
   951
              		iWriteSettings->allowRadioMeasurementsPresent = ETrue;
hgs
parents:
diff changeset
   952
              		iWriteStatuses->allowRadioMeasurementsStatus = aStatusRef;
hgs
parents:
diff changeset
   953
              		}
hgs
parents:
diff changeset
   954
           		else if ( aObject.MatchF( _L8("False")) != KErrNotFound ||
hgs
parents:
diff changeset
   955
           			      aObject.MatchF( _L8("false")) != KErrNotFound )
hgs
parents:
diff changeset
   956
              		{
hgs
parents:
diff changeset
   957
              		DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   958
              		iWriteSettings->allowRadioMeasurements = EFalse;
hgs
parents:
diff changeset
   959
              		iWriteSettings->allowRadioMeasurementsPresent = ETrue;
hgs
parents:
diff changeset
   960
              		iWriteStatuses->allowRadioMeasurementsStatus = aStatusRef;
hgs
parents:
diff changeset
   961
              		}
hgs
parents:
diff changeset
   962
           		else
hgs
parents:
diff changeset
   963
           			{
hgs
parents:
diff changeset
   964
           			err = KErrArgument;
hgs
parents:
diff changeset
   965
      				}
hgs
parents:
diff changeset
   966
      			}
hgs
parents:
diff changeset
   967
      		else
hgs
parents:
diff changeset
   968
      			{
hgs
parents:
diff changeset
   969
      			err = KErrTooBig;
hgs
parents:
diff changeset
   970
      			}
hgs
parents:
diff changeset
   971
      		}
hgs
parents:
diff changeset
   972
      	// *****************************************************************
hgs
parents:
diff changeset
   973
      	else if( lastUriSeg.Match( KNSmlWLanMinPassiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
   974
      		{
hgs
parents:
diff changeset
   975
      		// check whether input is of legal size
hgs
parents:
diff changeset
   976
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   977
      			{
hgs
parents:
diff changeset
   978
      		  	//store the parameter
hgs
parents:
diff changeset
   979
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
   980
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
   981
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
   982
      	    		{
hgs
parents:
diff changeset
   983
      	    		iWriteSettings->minPassiveChannelTime = err;
hgs
parents:
diff changeset
   984
      	    		iWriteSettings->minPassiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
   985
      	    		iWriteStatuses->minPassiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
   986
      	    		err = KErrNone;
hgs
parents:
diff changeset
   987
      	    		}
hgs
parents:
diff changeset
   988
      			}
hgs
parents:
diff changeset
   989
      		else
hgs
parents:
diff changeset
   990
      			{
hgs
parents:
diff changeset
   991
      			err = KErrTooBig;
hgs
parents:
diff changeset
   992
      			}
hgs
parents:
diff changeset
   993
      		}
hgs
parents:
diff changeset
   994
      	// *****************************************************************
hgs
parents:
diff changeset
   995
      	else if( lastUriSeg.Match( KNSmlWLanMaxPassiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
   996
      		{
hgs
parents:
diff changeset
   997
      		// check whether input is of legal size
hgs
parents:
diff changeset
   998
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
   999
      			{
hgs
parents:
diff changeset
  1000
      		  	//store the parameter
hgs
parents:
diff changeset
  1001
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1002
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1003
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1004
      	    		{
hgs
parents:
diff changeset
  1005
      	    		iWriteSettings->maxPassiveChannelTime = err;
hgs
parents:
diff changeset
  1006
      	    		iWriteSettings->maxPassiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
  1007
      	    		iWriteStatuses->maxPassiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1008
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1009
      	    		}
hgs
parents:
diff changeset
  1010
      			}
hgs
parents:
diff changeset
  1011
      		else
hgs
parents:
diff changeset
  1012
      			{
hgs
parents:
diff changeset
  1013
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1014
      			}
hgs
parents:
diff changeset
  1015
      		}
hgs
parents:
diff changeset
  1016
      	// *****************************************************************
hgs
parents:
diff changeset
  1017
      	else if( lastUriSeg.Match( KNSmlWLanMaxApFailureCount ) != KErrNotFound )
hgs
parents:
diff changeset
  1018
      		{
hgs
parents:
diff changeset
  1019
      		// check whether input is of legal size
hgs
parents:
diff changeset
  1020
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
  1021
      			{
hgs
parents:
diff changeset
  1022
      		  	//store the parameter
hgs
parents:
diff changeset
  1023
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1024
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1025
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1026
      	    		{
hgs
parents:
diff changeset
  1027
      	    		iWriteSettings->maxApFailureCount = err;
hgs
parents:
diff changeset
  1028
      	    		iWriteSettings->maxApFailureCountPresent = ETrue;
hgs
parents:
diff changeset
  1029
      	    		iWriteStatuses->maxApFailureCountStatus = aStatusRef;
hgs
parents:
diff changeset
  1030
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1031
      	    		}
hgs
parents:
diff changeset
  1032
      			}
hgs
parents:
diff changeset
  1033
      		else
hgs
parents:
diff changeset
  1034
      			{
hgs
parents:
diff changeset
  1035
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1036
      			}
hgs
parents:
diff changeset
  1037
      		}
hgs
parents:
diff changeset
  1038
      	// *****************************************************************
hgs
parents:
diff changeset
  1039
      	else if( lastUriSeg.Match( KNSmlWLanLongBeaconFindCount ) != KErrNotFound )
hgs
parents:
diff changeset
  1040
      		{
hgs
parents:
diff changeset
  1041
      		// check whether input is of legal size
hgs
parents:
diff changeset
  1042
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
  1043
      			{
hgs
parents:
diff changeset
  1044
      		  	//store the parameter
hgs
parents:
diff changeset
  1045
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1046
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1047
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1048
      	    		{
hgs
parents:
diff changeset
  1049
      	    		iWriteSettings->longBeaconFindCount = err;
hgs
parents:
diff changeset
  1050
      	    		iWriteSettings->longBeaconFindCountPresent = ETrue;
hgs
parents:
diff changeset
  1051
      	    		iWriteStatuses->longBeaconFindCountStatus = aStatusRef;
hgs
parents:
diff changeset
  1052
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1053
      	    		}
hgs
parents:
diff changeset
  1054
      			}
hgs
parents:
diff changeset
  1055
      		else
hgs
parents:
diff changeset
  1056
      			{
hgs
parents:
diff changeset
  1057
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1058
      			}
hgs
parents:
diff changeset
  1059
      		}
hgs
parents:
diff changeset
  1060
      	// *****************************************************************
hgs
parents:
diff changeset
  1061
      	else if( lastUriSeg.Match( KNSmlWLanQosNullFrameInterval ) != KErrNotFound )
hgs
parents:
diff changeset
  1062
      		{
hgs
parents:
diff changeset
  1063
      		// check whether input is of legal size
hgs
parents:
diff changeset
  1064
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
  1065
      			{
hgs
parents:
diff changeset
  1066
      		  	//store the parameter
hgs
parents:
diff changeset
  1067
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1068
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1069
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1070
      	    		{
hgs
parents:
diff changeset
  1071
      	    		iWriteSettings->qosNullFrameInterval = err;
hgs
parents:
diff changeset
  1072
      	    		iWriteSettings->qosNullFrameIntervalPresent = ETrue;
hgs
parents:
diff changeset
  1073
      	    		iWriteStatuses->qosNullFrameIntervalStatus = aStatusRef;
hgs
parents:
diff changeset
  1074
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1075
      	    		}
hgs
parents:
diff changeset
  1076
      			}
hgs
parents:
diff changeset
  1077
      		else
hgs
parents:
diff changeset
  1078
      			{
hgs
parents:
diff changeset
  1079
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1080
      			}
hgs
parents:
diff changeset
  1081
      		}
hgs
parents:
diff changeset
  1082
      	// *****************************************************************
hgs
parents:
diff changeset
  1083
      	else if( lastUriSeg.Match( KNSmlWLanQosNullFrameTimeout ) != KErrNotFound )
hgs
parents:
diff changeset
  1084
      		{
hgs
parents:
diff changeset
  1085
      		// check whether input is of legal size
hgs
parents:
diff changeset
  1086
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
  1087
      			{
hgs
parents:
diff changeset
  1088
      		  	//store the parameter
hgs
parents:
diff changeset
  1089
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1090
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1091
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1092
      	    		{
hgs
parents:
diff changeset
  1093
      	    		iWriteSettings->qosNullFrameTimeout = err;
hgs
parents:
diff changeset
  1094
      	    		iWriteSettings->qosNullFrameTimeoutPresent = ETrue;
hgs
parents:
diff changeset
  1095
      	    		iWriteStatuses->qosNullFrameTimeoutStatus = aStatusRef;
hgs
parents:
diff changeset
  1096
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1097
      	    		}
hgs
parents:
diff changeset
  1098
      			}
hgs
parents:
diff changeset
  1099
      		else
hgs
parents:
diff changeset
  1100
      			{
hgs
parents:
diff changeset
  1101
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1102
      			}
hgs
parents:
diff changeset
  1103
      		}
hgs
parents:
diff changeset
  1104
      	// *****************************************************************
hgs
parents:
diff changeset
  1105
      	else if( lastUriSeg.Match( KNSmlWLanMTU ) != KErrNotFound )
hgs
parents:
diff changeset
  1106
      		{
hgs
parents:
diff changeset
  1107
      		// check whether input is of legal size
hgs
parents:
diff changeset
  1108
      		if ( aObject.Size() <= KInputMaxLength )
hgs
parents:
diff changeset
  1109
      			{
hgs
parents:
diff changeset
  1110
      		  	//store the parameter
hgs
parents:
diff changeset
  1111
      		  	DBG_ARGS8(_S8("CGlobalWLANAdapter::AddLeafObjectL, add leaf - <%S>"), &aURI );
hgs
parents:
diff changeset
  1112
      	    	err = DesToInt( aObject );
hgs
parents:
diff changeset
  1113
      	    	if ( err >= 0 )
hgs
parents:
diff changeset
  1114
      	    		{
hgs
parents:
diff changeset
  1115
      	    		iWriteSettings->MTU = err;
hgs
parents:
diff changeset
  1116
      	    		iWriteSettings->MTUPresent = ETrue;
hgs
parents:
diff changeset
  1117
      	    		iWriteStatuses->MTUStatus = aStatusRef;
hgs
parents:
diff changeset
  1118
      	    		err = KErrNone;
hgs
parents:
diff changeset
  1119
      	    		}
hgs
parents:
diff changeset
  1120
      			}
hgs
parents:
diff changeset
  1121
      		else
hgs
parents:
diff changeset
  1122
      			{
hgs
parents:
diff changeset
  1123
      			err = KErrTooBig;
hgs
parents:
diff changeset
  1124
      			}
hgs
parents:
diff changeset
  1125
      		}
hgs
parents:
diff changeset
  1126
      	// *****************************************************************
hgs
parents:
diff changeset
  1127
     	// The given leaf was not found
hgs
parents:
diff changeset
  1128
	  	else
hgs
parents:
diff changeset
  1129
  			{
hgs
parents:
diff changeset
  1130
			err = KErrNotFound;
hgs
parents:
diff changeset
  1131
  			}
hgs
parents:
diff changeset
  1132
    	}
hgs
parents:
diff changeset
  1133
	else
hgs
parents:
diff changeset
  1134
    	{
hgs
parents:
diff changeset
  1135
        // Something went wrong
hgs
parents:
diff changeset
  1136
    	_DBG_FILE("CGlobalWLANAdapter::AddLeafObjectL(): Leaf addition failed");
hgs
parents:
diff changeset
  1137
        err = KErrGeneral;
hgs
parents:
diff changeset
  1138
    	}   	
hgs
parents:
diff changeset
  1139
hgs
parents:
diff changeset
  1140
    // Update the possible failure to the status, success is updated when the 
hgs
parents:
diff changeset
  1141
    // actual writing to db is done
hgs
parents:
diff changeset
  1142
    switch ( err )
hgs
parents:
diff changeset
  1143
    	{
hgs
parents:
diff changeset
  1144
    	case KErrTooBig:
hgs
parents:
diff changeset
  1145
    		iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::ETooLargeObject );
hgs
parents:
diff changeset
  1146
    		break;	
hgs
parents:
diff changeset
  1147
    		
hgs
parents:
diff changeset
  1148
    	case KErrNotFound:
hgs
parents:
diff changeset
  1149
    		iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EInvalidObject );
hgs
parents:
diff changeset
  1150
    		break;
hgs
parents:
diff changeset
  1151
    		
hgs
parents:
diff changeset
  1152
    	case KErrGeneral:
hgs
parents:
diff changeset
  1153
    		iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EError );
hgs
parents:
diff changeset
  1154
    		break;
hgs
parents:
diff changeset
  1155
    		
hgs
parents:
diff changeset
  1156
    	case KErrArgument:
hgs
parents:
diff changeset
  1157
			iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EInvalidObject );
hgs
parents:
diff changeset
  1158
			break;
hgs
parents:
diff changeset
  1159
			
hgs
parents:
diff changeset
  1160
    	case KErrOverflow:
hgs
parents:
diff changeset
  1161
    		iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EInvalidObject );
hgs
parents:
diff changeset
  1162
    		break;
hgs
parents:
diff changeset
  1163
    	}
hgs
parents:
diff changeset
  1164
hgs
parents:
diff changeset
  1165
    _DBG_FILE("CGlobalWLANAdapter::AddLeafObjectL(): end");
hgs
parents:
diff changeset
  1166
    }
hgs
parents:
diff changeset
  1167
hgs
parents:
diff changeset
  1168
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1169
// CGlobalWLANAdapter* CGlobalWLANAdapter::UpdateLeafObjectL( const TDesC& aURI, 
hgs
parents:
diff changeset
  1170
//    const TDesC& aLUID, const TDesC8& aObject, const TDesC& aType, 
hgs
parents:
diff changeset
  1171
//    const TInt aStatusRef )
hgs
parents:
diff changeset
  1172
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1173
void CGlobalWLANAdapter::UpdateLeafObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1174
                                          const TDesC8& aLUID, 
hgs
parents:
diff changeset
  1175
                                          const TDesC8& aObject, 
hgs
parents:
diff changeset
  1176
                                          const TDesC8& aType, 
hgs
parents:
diff changeset
  1177
                                          const TInt aStatusRef )
hgs
parents:
diff changeset
  1178
    {
hgs
parents:
diff changeset
  1179
    _DBG_FILE("CGlobalWLANAdapter::UpdateLeafObjectL(): begin");
hgs
parents:
diff changeset
  1180
    DBG_ARGS8(_S8("CGlobalWLANAdapter::UpdateLeafObjectL - <%S> <%S>"), &aURI, &aLUID );
hgs
parents:
diff changeset
  1181
    
hgs
parents:
diff changeset
  1182
    AddLeafObjectL( aURI, aLUID, aObject, aType, aStatusRef );
hgs
parents:
diff changeset
  1183
hgs
parents:
diff changeset
  1184
    _DBG_FILE("CGlobalWLANAdapter::UpdateLeafObjectL(): end");
hgs
parents:
diff changeset
  1185
    }
hgs
parents:
diff changeset
  1186
hgs
parents:
diff changeset
  1187
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1188
// CGlobalWLANAdapter::UpdateLeafObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1189
// const TDesC8& aLUID, const TDesC8& aObject, const TDesC8& aType )
hgs
parents:
diff changeset
  1190
// Not supported
hgs
parents:
diff changeset
  1191
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1192
hgs
parents:
diff changeset
  1193
void CGlobalWLANAdapter::UpdateLeafObjectL( const TDesC8& /*aURI*/, 
hgs
parents:
diff changeset
  1194
                                          const TDesC8& /*aLUID*/,
hgs
parents:
diff changeset
  1195
                                          RWriteStream*& /*aStream*/, 
hgs
parents:
diff changeset
  1196
                                          const TDesC8& /*aType*/,
hgs
parents:
diff changeset
  1197
                                          TInt aStatusRef )
hgs
parents:
diff changeset
  1198
    {
hgs
parents:
diff changeset
  1199
    _DBG_FILE("CGlobalWLANAdapter::UpdateLeafObjectL(): streaming: begin");
hgs
parents:
diff changeset
  1200
    
hgs
parents:
diff changeset
  1201
    iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1202
    
hgs
parents:
diff changeset
  1203
    _DBG_FILE("CGlobalWLANAdapter::UpdateLeafObjectL() streaming: end");
hgs
parents:
diff changeset
  1204
    }
hgs
parents:
diff changeset
  1205
hgs
parents:
diff changeset
  1206
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1207
// CGlobalWLANAdapter* CGlobalWLANAdapter::DeleteObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1208
// const TDesC8& aLUID, const TInt aStatusRef )
hgs
parents:
diff changeset
  1209
// Not supported
hgs
parents:
diff changeset
  1210
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1211
void CGlobalWLANAdapter::DeleteObjectL( const TDesC8& /*aURI*/, 
hgs
parents:
diff changeset
  1212
                                      const TDesC8& /*aLUID*/, 
hgs
parents:
diff changeset
  1213
                                      const TInt aStatusRef )
hgs
parents:
diff changeset
  1214
    {
hgs
parents:
diff changeset
  1215
    _DBG_FILE("CGlobalWLANAdapter::DeleteObjectL(): begin");
hgs
parents:
diff changeset
  1216
    
hgs
parents:
diff changeset
  1217
    iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EError); 
hgs
parents:
diff changeset
  1218
       
hgs
parents:
diff changeset
  1219
    _DBG_FILE("CGlobalWLANAdapter::DeleteObjectL(): end");
hgs
parents:
diff changeset
  1220
    }
hgs
parents:
diff changeset
  1221
hgs
parents:
diff changeset
  1222
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1223
// CGlobalWLANAdapter* CGlobalWLANAdapter::FetchLeafObjectSizeL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1224
//                     const TDesC8& aLUID, const TDesC8& aType, 
hgs
parents:
diff changeset
  1225
//                     const TInt aResultsRef, const TInt aStatusRef )
hgs
parents:
diff changeset
  1226
// not supported
hgs
parents:
diff changeset
  1227
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1228
hgs
parents:
diff changeset
  1229
void CGlobalWLANAdapter::FetchLeafObjectSizeL( const TDesC8& /*aURI*/, 
hgs
parents:
diff changeset
  1230
                                                 const TDesC8& /*aLUID*/,
hgs
parents:
diff changeset
  1231
                                                 const TDesC8& /*aType*/, 
hgs
parents:
diff changeset
  1232
                                                 TInt /*aResultsRef*/,
hgs
parents:
diff changeset
  1233
                                                 TInt /*aStatusRef*/ )
hgs
parents:
diff changeset
  1234
    {
hgs
parents:
diff changeset
  1235
    _DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectSizeL(): begin");
hgs
parents:
diff changeset
  1236
    _DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectSizeL(): end");
hgs
parents:
diff changeset
  1237
    return;
hgs
parents:
diff changeset
  1238
    }                                                
hgs
parents:
diff changeset
  1239
hgs
parents:
diff changeset
  1240
hgs
parents:
diff changeset
  1241
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1242
// CGlobalWLANAdapter* CGlobalWLANAdapter::FetchLeafObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1243
//                     const TDesC8& aLUID, const TDesC8& aType, 
hgs
parents:
diff changeset
  1244
//                     const TInt aResultsRef, const TInt aStatusRef )
hgs
parents:
diff changeset
  1245
// 
hgs
parents:
diff changeset
  1246
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1247
void CGlobalWLANAdapter::FetchLeafObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1248
                                        const TDesC8& aLUID, 
hgs
parents:
diff changeset
  1249
                                        const TDesC8& /*aType*/, 
hgs
parents:
diff changeset
  1250
                                        const TInt aResultsRef, 
hgs
parents:
diff changeset
  1251
                                        const TInt aStatusRef )
hgs
parents:
diff changeset
  1252
    {
hgs
parents:
diff changeset
  1253
    _DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): begin");
hgs
parents:
diff changeset
  1254
    DBG_ARGS8(_S8("Fetch aURI - %S - %S"), &aURI, &aLUID);
hgs
parents:
diff changeset
  1255
    
hgs
parents:
diff changeset
  1256
    // Store the required parameters into the struct. Actual reading will be done in
hgs
parents:
diff changeset
  1257
    // when CompleteOutstandingCommands is called
hgs
parents:
diff changeset
  1258
    
hgs
parents:
diff changeset
  1259
    // Get the last uri segment
hgs
parents:
diff changeset
  1260
    TPtrC8 lastUriSeg = GetLastUriSeg( aURI );
hgs
parents:
diff changeset
  1261
    DBG_ARGS8(_S8("Fetch leaf, lasturiseg - %S"), &lastUriSeg);
hgs
parents:
diff changeset
  1262
    
hgs
parents:
diff changeset
  1263
    //**************************************************************************
hgs
parents:
diff changeset
  1264
    // Check which leaf is in question
hgs
parents:
diff changeset
  1265
    //**************************************************************************
hgs
parents:
diff changeset
  1266
    if( aURI.Match( _L8("WLAN/*" ) ) != KErrNotFound )
hgs
parents:
diff changeset
  1267
    	{
hgs
parents:
diff changeset
  1268
        _DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): WLAN/* found in uri");
hgs
parents:
diff changeset
  1269
      	// *****************************************************************
hgs
parents:
diff changeset
  1270
      	if( lastUriSeg.Match( KNSmlWLanInternetConnectivityTest ) != KErrNotFound )
hgs
parents:
diff changeset
  1271
      		{	
hgs
parents:
diff changeset
  1272
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1273
      	   	iReadSettings->internetConnectivityTestPresent = ETrue;
hgs
parents:
diff changeset
  1274
      	   	iReadStatuses->internetConnectivityTestResult = aResultsRef;
hgs
parents:
diff changeset
  1275
      	   	iReadStatuses->internetConnectivityTestStatus = aStatusRef;
hgs
parents:
diff changeset
  1276
      		}
hgs
parents:
diff changeset
  1277
      	
hgs
parents:
diff changeset
  1278
      	// *****************************************************************
hgs
parents:
diff changeset
  1279
      	else if( lastUriSeg.Match( KNSmlWLanUseDefaultSettings ) != KErrNotFound )
hgs
parents:
diff changeset
  1280
      		{	
hgs
parents:
diff changeset
  1281
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1282
            iReadSettings->useDefaultSettingsPresent = ETrue;  
hgs
parents:
diff changeset
  1283
            iReadStatuses->useDefaultSettingsResult = aResultsRef;
hgs
parents:
diff changeset
  1284
            iReadStatuses->useDefaultSettingsStatus = aStatusRef;
hgs
parents:
diff changeset
  1285
            }
hgs
parents:
diff changeset
  1286
	
hgs
parents:
diff changeset
  1287
      	// *****************************************************************
hgs
parents:
diff changeset
  1288
      	else if( lastUriSeg.Match( KNSmlWLanLongRetryLimit ) != KErrNotFound )
hgs
parents:
diff changeset
  1289
      		{
hgs
parents:
diff changeset
  1290
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1291
      	    iReadSettings->longRetryLimitPresent = ETrue;
hgs
parents:
diff changeset
  1292
      	    iReadStatuses->longRetryLimitResult = aResultsRef;
hgs
parents:
diff changeset
  1293
      	    iReadStatuses->longRetryLimitStatus = aStatusRef;
hgs
parents:
diff changeset
  1294
      		}
hgs
parents:
diff changeset
  1295
hgs
parents:
diff changeset
  1296
      	// *****************************************************************
hgs
parents:
diff changeset
  1297
      	else if( lastUriSeg.Match( KNSmlWLanShortRetryLimit ) != KErrNotFound )
hgs
parents:
diff changeset
  1298
      		{	
hgs
parents:
diff changeset
  1299
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1300
      	    iReadSettings->shortRetryLimitPresent = ETrue;
hgs
parents:
diff changeset
  1301
      	    iReadStatuses->shortRetryLimitResult = aResultsRef;
hgs
parents:
diff changeset
  1302
      	    iReadStatuses->shortRetryLimitStatus = aStatusRef;
hgs
parents:
diff changeset
  1303
      		}
hgs
parents:
diff changeset
  1304
	
hgs
parents:
diff changeset
  1305
      	// *****************************************************************
hgs
parents:
diff changeset
  1306
      	else if( lastUriSeg.Match( KNSmlWLanRTSThreshold ) != KErrNotFound )
hgs
parents:
diff changeset
  1307
      		{
hgs
parents:
diff changeset
  1308
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1309
      	    iReadSettings->RTSThresholdPresent = ETrue;
hgs
parents:
diff changeset
  1310
      	    iReadStatuses->RTSThresholdResult = aResultsRef;
hgs
parents:
diff changeset
  1311
      	    iReadStatuses->RTSThresholdStatus = aStatusRef;
hgs
parents:
diff changeset
  1312
      		}
hgs
parents:
diff changeset
  1313
      		
hgs
parents:
diff changeset
  1314
      	// *****************************************************************
hgs
parents:
diff changeset
  1315
      	else if( lastUriSeg.Match( KNSmlWLanTXPowerLevel ) != KErrNotFound )
hgs
parents:
diff changeset
  1316
      		{
hgs
parents:
diff changeset
  1317
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1318
      	   	iReadSettings->TXPowerLevelPresent = ETrue;
hgs
parents:
diff changeset
  1319
      	   	iReadStatuses->TXPowerLevelResult = aResultsRef;
hgs
parents:
diff changeset
  1320
      	   	iReadStatuses->TXPowerLevelStatus = aStatusRef;
hgs
parents:
diff changeset
  1321
      		}
hgs
parents:
diff changeset
  1322
      		
hgs
parents:
diff changeset
  1323
       	// *****************************************************************
hgs
parents:
diff changeset
  1324
      	else if( lastUriSeg.Match( KNSmlWLanPowerSaving ) != KErrNotFound )
hgs
parents:
diff changeset
  1325
      		{
hgs
parents:
diff changeset
  1326
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1327
            iReadSettings->powerSavingPresent = ETrue;
hgs
parents:
diff changeset
  1328
            iReadStatuses->powerSavingResult = aResultsRef;
hgs
parents:
diff changeset
  1329
            iReadStatuses->powerSavingStatus = aStatusRef;
hgs
parents:
diff changeset
  1330
      		}
hgs
parents:
diff changeset
  1331
      			
hgs
parents:
diff changeset
  1332
      	// *****************************************************************
hgs
parents:
diff changeset
  1333
      	else if( lastUriSeg.Match( KNSmlWLanBackgroundScanInterval ) != KErrNotFound )
hgs
parents:
diff changeset
  1334
      		{
hgs
parents:
diff changeset
  1335
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1336
      	   	iReadSettings->backgroundScanIntervalPresent = ETrue;
hgs
parents:
diff changeset
  1337
      	   	iReadStatuses->backgroundScanIntervalResult = aResultsRef;
hgs
parents:
diff changeset
  1338
      	   	iReadStatuses->backgroundScanIntervalStatus = aStatusRef;
hgs
parents:
diff changeset
  1339
      		}
hgs
parents:
diff changeset
  1340
      		
hgs
parents:
diff changeset
  1341
      	// *****************************************************************
hgs
parents:
diff changeset
  1342
      	else if( lastUriSeg.Match( KNSmlWLanScanRate ) != KErrNotFound )
hgs
parents:
diff changeset
  1343
      		{
hgs
parents:
diff changeset
  1344
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1345
      	   	iReadSettings->scanRatePresent = ETrue;
hgs
parents:
diff changeset
  1346
      	   	iReadStatuses->scanRateResult = aResultsRef;
hgs
parents:
diff changeset
  1347
      	   	iReadStatuses->scanRateStatus = aStatusRef;
hgs
parents:
diff changeset
  1348
      		}
hgs
parents:
diff changeset
  1349
      			
hgs
parents:
diff changeset
  1350
      	// *****************************************************************
hgs
parents:
diff changeset
  1351
      	else if( lastUriSeg.Match( KNSmlWLanRCPITrigger ) != KErrNotFound )
hgs
parents:
diff changeset
  1352
      		{
hgs
parents:
diff changeset
  1353
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1354
      	   	iReadSettings->RCPITriggerPresent = ETrue;
hgs
parents:
diff changeset
  1355
      	   	iReadStatuses->RCPITriggerResult = aResultsRef;
hgs
parents:
diff changeset
  1356
      	   	iReadStatuses->RCPITriggerStatus = aStatusRef;
hgs
parents:
diff changeset
  1357
      		}
hgs
parents:
diff changeset
  1358
      			
hgs
parents:
diff changeset
  1359
      	// *****************************************************************
hgs
parents:
diff changeset
  1360
      	else if( lastUriSeg.Match( KNSmlWLanMinActiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
  1361
      		{
hgs
parents:
diff changeset
  1362
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1363
      	   	iReadSettings->minActiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
  1364
      	   	iReadStatuses->minActiveChannelTimeResult = aResultsRef;
hgs
parents:
diff changeset
  1365
      	   	iReadStatuses->minActiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1366
      		}
hgs
parents:
diff changeset
  1367
      		
hgs
parents:
diff changeset
  1368
      	// *****************************************************************
hgs
parents:
diff changeset
  1369
      	else if( lastUriSeg.Match( KNSmlWLanMaxActiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
  1370
      		{
hgs
parents:
diff changeset
  1371
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1372
      	   	iReadSettings->maxActiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
  1373
      	   	iReadStatuses->maxActiveChannelTimeResult = aResultsRef;
hgs
parents:
diff changeset
  1374
      	   	iReadStatuses->maxActiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1375
      		}
hgs
parents:
diff changeset
  1376
      		
hgs
parents:
diff changeset
  1377
      	// *****************************************************************
hgs
parents:
diff changeset
  1378
      	else if( lastUriSeg.Match( KNSmlWLanMaxTxMSDULifeTime ) != KErrNotFound )
hgs
parents:
diff changeset
  1379
      		{
hgs
parents:
diff changeset
  1380
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1381
      	   	iReadSettings->maxTxMSDULifeTimePresent = ETrue;
hgs
parents:
diff changeset
  1382
      	   	iReadStatuses->maxTxMSDULifeTimeResult = aResultsRef;
hgs
parents:
diff changeset
  1383
      	   	iReadStatuses->maxTxMSDULifeTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1384
      		}
hgs
parents:
diff changeset
  1385
      		
hgs
parents:
diff changeset
  1386
      	// *****************************************************************
hgs
parents:
diff changeset
  1387
      	else if( lastUriSeg.Match( KNSmlWLanScanExpirationTimer ) != KErrNotFound )
hgs
parents:
diff changeset
  1388
      		{
hgs
parents:
diff changeset
  1389
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1390
      	   	iReadSettings->scanExpirationTimerPresent = ETrue;
hgs
parents:
diff changeset
  1391
      	   	iReadStatuses->scanExpirationTimerResult = aResultsRef;
hgs
parents:
diff changeset
  1392
      	   	iReadStatuses->scanExpirationTimerStatus = aStatusRef;
hgs
parents:
diff changeset
  1393
      		}
hgs
parents:
diff changeset
  1394
      		
hgs
parents:
diff changeset
  1395
      	// *****************************************************************
hgs
parents:
diff changeset
  1396
      	else if( lastUriSeg.Match( KNSmlWLanUnloadDriverTimer ) != KErrNotFound )
hgs
parents:
diff changeset
  1397
      		{
hgs
parents:
diff changeset
  1398
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1399
      	   	iReadSettings->unloadDriverTimerPresent = ETrue;
hgs
parents:
diff changeset
  1400
      	   	iReadStatuses->unloadDriverTimerResult = aResultsRef;
hgs
parents:
diff changeset
  1401
      	   	iReadStatuses->unloadDriverTimerStatus = aStatusRef;
hgs
parents:
diff changeset
  1402
      		}
hgs
parents:
diff changeset
  1403
      		
hgs
parents:
diff changeset
  1404
      	// *****************************************************************
hgs
parents:
diff changeset
  1405
      	else if( lastUriSeg.Match( KNSmlWLanRoamTimer ) != KErrNotFound )
hgs
parents:
diff changeset
  1406
      		{
hgs
parents:
diff changeset
  1407
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1408
      	   	iReadSettings->roamTimerPresent = ETrue;
hgs
parents:
diff changeset
  1409
      	   	iReadStatuses->roamTimerResult = aResultsRef;
hgs
parents:
diff changeset
  1410
      	   	iReadStatuses->roamTimerStatus = aStatusRef;
hgs
parents:
diff changeset
  1411
      		}
hgs
parents:
diff changeset
  1412
      		
hgs
parents:
diff changeset
  1413
       	// *****************************************************************
hgs
parents:
diff changeset
  1414
      	else if( lastUriSeg.Match( KNSmlWLanRCPIDifference ) != KErrNotFound )
hgs
parents:
diff changeset
  1415
      		{
hgs
parents:
diff changeset
  1416
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1417
      	   	iReadSettings->RCPIDifferencePresent = ETrue;
hgs
parents:
diff changeset
  1418
      	   	iReadStatuses->RCPIDifferenceResult = aResultsRef;
hgs
parents:
diff changeset
  1419
      	   	iReadStatuses->RCPIDifferenceStatus = aStatusRef;
hgs
parents:
diff changeset
  1420
      		}
hgs
parents:
diff changeset
  1421
      		
hgs
parents:
diff changeset
  1422
      	// *****************************************************************
hgs
parents:
diff changeset
  1423
      	else if( lastUriSeg.Match( KNSmlWLanConnRegainTimer ) != KErrNotFound )
hgs
parents:
diff changeset
  1424
      		{
hgs
parents:
diff changeset
  1425
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1426
      	   	iReadSettings->connRegainTimerPresent = ETrue;
hgs
parents:
diff changeset
  1427
      	   	iReadStatuses->connRegainTimerResult = aResultsRef;
hgs
parents:
diff changeset
  1428
      	   	iReadStatuses->connRegainTimerStatus = aStatusRef;
hgs
parents:
diff changeset
  1429
      		}
hgs
parents:
diff changeset
  1430
      		
hgs
parents:
diff changeset
  1431
      	// *****************************************************************
hgs
parents:
diff changeset
  1432
      	else if( lastUriSeg.Match( KNSmlWLanMaxTriesToFindNw ) != KErrNotFound )
hgs
parents:
diff changeset
  1433
      		{
hgs
parents:
diff changeset
  1434
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1435
      	   	iReadSettings->maxTriesToFindNwPresent = ETrue;
hgs
parents:
diff changeset
  1436
      	   	iReadStatuses->maxTriesToFindNwResult = aResultsRef;
hgs
parents:
diff changeset
  1437
      	   	iReadStatuses->maxTriesToFindNwStatus = aStatusRef;
hgs
parents:
diff changeset
  1438
      		}
hgs
parents:
diff changeset
  1439
      		
hgs
parents:
diff changeset
  1440
      	// *****************************************************************
hgs
parents:
diff changeset
  1441
      	else if( lastUriSeg.Match( KNSmlWLanDelayBetweenFindNw ) != KErrNotFound )
hgs
parents:
diff changeset
  1442
      		{
hgs
parents:
diff changeset
  1443
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1444
      	   	iReadSettings->delayBetweenFindNwPresent = ETrue;
hgs
parents:
diff changeset
  1445
      	   	iReadStatuses->delayBetweenFindNwResult = aResultsRef;
hgs
parents:
diff changeset
  1446
      	   	iReadStatuses->delayBetweenFindNwStatus = aStatusRef;
hgs
parents:
diff changeset
  1447
      		}
hgs
parents:
diff changeset
  1448
      		
hgs
parents:
diff changeset
  1449
      	// *****************************************************************
hgs
parents:
diff changeset
  1450
      	else if( lastUriSeg.Match( KNSmlWLanAllowRadioMeasurements ) != KErrNotFound )
hgs
parents:
diff changeset
  1451
      		{
hgs
parents:
diff changeset
  1452
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1453
            iReadSettings->allowRadioMeasurementsPresent = ETrue;
hgs
parents:
diff changeset
  1454
           	iReadStatuses->allowRadioMeasurementsResult = aResultsRef;
hgs
parents:
diff changeset
  1455
      	   	iReadStatuses->allowRadioMeasurementsStatus = aStatusRef;
hgs
parents:
diff changeset
  1456
            }
hgs
parents:
diff changeset
  1457
              
hgs
parents:
diff changeset
  1458
      	// *****************************************************************
hgs
parents:
diff changeset
  1459
      	else if( lastUriSeg.Match( KNSmlWLanMinPassiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
  1460
      		{
hgs
parents:
diff changeset
  1461
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1462
      	   	iReadSettings->minPassiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
  1463
      	   	iReadStatuses->minPassiveChannelTimeResult = aResultsRef;
hgs
parents:
diff changeset
  1464
      	   	iReadStatuses->minPassiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1465
      		}
hgs
parents:
diff changeset
  1466
      		
hgs
parents:
diff changeset
  1467
      	// *****************************************************************
hgs
parents:
diff changeset
  1468
      	else if( lastUriSeg.Match( KNSmlWLanMaxPassiveChannelTime ) != KErrNotFound )
hgs
parents:
diff changeset
  1469
      		{
hgs
parents:
diff changeset
  1470
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1471
      	   	iReadSettings->maxPassiveChannelTimePresent = ETrue;
hgs
parents:
diff changeset
  1472
      	   	iReadStatuses->maxPassiveChannelTimeResult = aResultsRef;
hgs
parents:
diff changeset
  1473
      	   	iReadStatuses->maxPassiveChannelTimeStatus = aStatusRef;
hgs
parents:
diff changeset
  1474
      		}
hgs
parents:
diff changeset
  1475
      		
hgs
parents:
diff changeset
  1476
      	// *****************************************************************
hgs
parents:
diff changeset
  1477
      	else if( lastUriSeg.Match( KNSmlWLanMaxApFailureCount ) != KErrNotFound )
hgs
parents:
diff changeset
  1478
      		{
hgs
parents:
diff changeset
  1479
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1480
      	   	iReadSettings->maxApFailureCountPresent = ETrue;
hgs
parents:
diff changeset
  1481
      	   	iReadStatuses->maxApFailureCountResult = aResultsRef;
hgs
parents:
diff changeset
  1482
      	   	iReadStatuses->maxApFailureCountStatus = aStatusRef;
hgs
parents:
diff changeset
  1483
      		}
hgs
parents:
diff changeset
  1484
      		
hgs
parents:
diff changeset
  1485
      	// *****************************************************************
hgs
parents:
diff changeset
  1486
      	else if( lastUriSeg.Match( KNSmlWLanLongBeaconFindCount ) != KErrNotFound )
hgs
parents:
diff changeset
  1487
      		{
hgs
parents:
diff changeset
  1488
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1489
      	   	iReadSettings->longBeaconFindCountPresent = ETrue;
hgs
parents:
diff changeset
  1490
      	   	iReadStatuses->longBeaconFindCountResult = aResultsRef;
hgs
parents:
diff changeset
  1491
      	   	iReadStatuses->longBeaconFindCountStatus = aStatusRef;
hgs
parents:
diff changeset
  1492
      		}
hgs
parents:
diff changeset
  1493
      		
hgs
parents:
diff changeset
  1494
      	// *****************************************************************
hgs
parents:
diff changeset
  1495
      	else if( lastUriSeg.Match( KNSmlWLanQosNullFrameInterval ) != KErrNotFound )
hgs
parents:
diff changeset
  1496
      		{
hgs
parents:
diff changeset
  1497
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1498
      	   	iReadSettings->qosNullFrameIntervalPresent = ETrue;
hgs
parents:
diff changeset
  1499
      	   	iReadStatuses->qosNullFrameIntervalResult = aResultsRef;
hgs
parents:
diff changeset
  1500
      	   	iReadStatuses->qosNullFrameIntervalStatus = aStatusRef;
hgs
parents:
diff changeset
  1501
      		}
hgs
parents:
diff changeset
  1502
      		
hgs
parents:
diff changeset
  1503
      	// *****************************************************************
hgs
parents:
diff changeset
  1504
      	else if( lastUriSeg.Match( KNSmlWLanQosNullFrameTimeout ) != KErrNotFound )
hgs
parents:
diff changeset
  1505
      		{
hgs
parents:
diff changeset
  1506
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1507
      	   	iReadSettings->qosNullFrameTimeoutPresent = ETrue;
hgs
parents:
diff changeset
  1508
      	   	iReadStatuses->qosNullFrameTimeoutResult = aResultsRef;
hgs
parents:
diff changeset
  1509
      	   	iReadStatuses->qosNullFrameTimeoutStatus = aStatusRef;
hgs
parents:
diff changeset
  1510
      		}
hgs
parents:
diff changeset
  1511
      		
hgs
parents:
diff changeset
  1512
      	// *****************************************************************
hgs
parents:
diff changeset
  1513
      	else if( lastUriSeg.Match( KNSmlWLanMTU ) != KErrNotFound )
hgs
parents:
diff changeset
  1514
      		{
hgs
parents:
diff changeset
  1515
      		_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): leaf"); 
hgs
parents:
diff changeset
  1516
      	   	iReadSettings->MTUPresent = ETrue;
hgs
parents:
diff changeset
  1517
      	   	iReadStatuses->MTUResult = aResultsRef;
hgs
parents:
diff changeset
  1518
      	   	iReadStatuses->MTUStatus = aStatusRef;
hgs
parents:
diff changeset
  1519
      		}
hgs
parents:
diff changeset
  1520
      		
hgs
parents:
diff changeset
  1521
      	// *****************************************************************
hgs
parents:
diff changeset
  1522
   		// The given leaf was not found
hgs
parents:
diff changeset
  1523
	  	else
hgs
parents:
diff changeset
  1524
  			{
hgs
parents:
diff changeset
  1525
  			_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): No matchin leaf was found");
hgs
parents:
diff changeset
  1526
			iCallBack->SetStatusL(aStatusRef, ENotFound);
hgs
parents:
diff changeset
  1527
  			}
hgs
parents:
diff changeset
  1528
    	}
hgs
parents:
diff changeset
  1529
	else
hgs
parents:
diff changeset
  1530
    	{
hgs
parents:
diff changeset
  1531
        // Something went wrong
hgs
parents:
diff changeset
  1532
    	_DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): No matchin node was found");
hgs
parents:
diff changeset
  1533
        iCallBack->SetStatusL(aStatusRef, EInvalidObject);
hgs
parents:
diff changeset
  1534
    	}   
hgs
parents:
diff changeset
  1535
hgs
parents:
diff changeset
  1536
    _DBG_FILE("CGlobalWLANAdapter::FetchLeafObjectL(): end");
hgs
parents:
diff changeset
  1537
hgs
parents:
diff changeset
  1538
    }
hgs
parents:
diff changeset
  1539
    
hgs
parents:
diff changeset
  1540
hgs
parents:
diff changeset
  1541
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1542
// CGlobalWLANAdapter* CGlobalWLANAdapter::ChildURIListL( const TDesC& aURI, 
hgs
parents:
diff changeset
  1543
// const TDesC& aLUID, const CArrayFix<TNSmlDmMappingInfo>& aPreviousURISegmentList, 
hgs
parents:
diff changeset
  1544
// const TInt aResultsRef, const TInt aStatusRef )
hgs
parents:
diff changeset
  1545
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1546
void CGlobalWLANAdapter::ChildURIListL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1547
                                      const TDesC8& /*aLUID*/, 
hgs
parents:
diff changeset
  1548
                                      const CArrayFix<TSmlDmMappingInfo>& /*aPreviousURISegmentList*/, 
hgs
parents:
diff changeset
  1549
                                      const TInt aResultsRef, 
hgs
parents:
diff changeset
  1550
                                      const TInt aStatusRef )
hgs
parents:
diff changeset
  1551
    {
hgs
parents:
diff changeset
  1552
    _DBG_FILE("CGlobalWLANAdapter::ChildURIListL(): begin");
hgs
parents:
diff changeset
  1553
    DBG_ARGS8(_S8("globalwlanadapter::ChildUriList - <%S>"), &aURI );
hgs
parents:
diff changeset
  1554
 
hgs
parents:
diff changeset
  1555
    CBufBase* currentUriSegmentList = CBufFlat::NewL( KUriSegListLength );
hgs
parents:
diff changeset
  1556
    CleanupStack::PushL( currentUriSegmentList );
hgs
parents:
diff changeset
  1557
   	TEntry currentEntry;
hgs
parents:
diff changeset
  1558
   	TInt uriSegs = NumOfUriSegs( aURI );
hgs
parents:
diff changeset
  1559
    
hgs
parents:
diff changeset
  1560
    // Check whether WLAN node in question	
hgs
parents:
diff changeset
  1561
    if ( aURI.Match(_L8("WLAN"  ))!= KErrNotFound && uriSegs == 1 )
hgs
parents:
diff changeset
  1562
    	{
hgs
parents:
diff changeset
  1563
    	_DBG_FILE("CGlobalWLANAdapter::ChildURIListL(): WLAN");
hgs
parents:
diff changeset
  1564
    	currentUriSegmentList->InsertL( 0, KNSmlWLanNode );
hgs
parents:
diff changeset
  1565
      	iCallBack->SetResultsL( aResultsRef, *currentUriSegmentList, KNullDesC8 );
hgs
parents:
diff changeset
  1566
    	iCallBack->SetStatusL( aStatusRef, CSmlDmAdapter::EOk );
hgs
parents:
diff changeset
  1567
    	_DBG_FILE("CGlobalWLANAdapter::ChildURIListL(): WLAN leafs returned");
hgs
parents:
diff changeset
  1568
    	}
hgs
parents:
diff changeset
  1569
    
hgs
parents:
diff changeset
  1570
    // Some illegal node/leaf in question
hgs
parents:
diff changeset
  1571
    else
hgs
parents:
diff changeset
  1572
    	{
hgs
parents:
diff changeset
  1573
        iCallBack->SetStatusL(aStatusRef,CSmlDmAdapter::ENotFound);
hgs
parents:
diff changeset
  1574
        _DBG_FILE("CNSmlInternetAdapter::ChildURIListL(): ENotFound end");
hgs
parents:
diff changeset
  1575
    	}
hgs
parents:
diff changeset
  1576
    
hgs
parents:
diff changeset
  1577
    // delete the list
hgs
parents:
diff changeset
  1578
    CleanupStack::PopAndDestroy( currentUriSegmentList );
hgs
parents:
diff changeset
  1579
    _DBG_FILE("CGlobalWLANAdapter::ChildURIListL(): end");
hgs
parents:
diff changeset
  1580
    }
hgs
parents:
diff changeset
  1581
hgs
parents:
diff changeset
  1582
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1583
// void CGlobalWLANAdapter::AddNodeObjectL( const TDesC& aURI, const TDesC& aParentLUID, 
hgs
parents:
diff changeset
  1584
// const TInt aStatusRef )
hgs
parents:
diff changeset
  1585
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1586
void CGlobalWLANAdapter::AddNodeObjectL( const TDesC8& aURI, 
hgs
parents:
diff changeset
  1587
                                       const TDesC8& aParentLUID, 
hgs
parents:
diff changeset
  1588
                                       const TInt aStatusRef )
hgs
parents:
diff changeset
  1589
    {
hgs
parents:
diff changeset
  1590
 
hgs
parents:
diff changeset
  1591
    DBG_ARGS8(_S8("CGlobalWLANAdapter::AddNodeObjectL - uri: <%S> to aParentLuid: <%S>"), 
hgs
parents:
diff changeset
  1592
                &aURI, &aParentLUID ); 
hgs
parents:
diff changeset
  1593
                
hgs
parents:
diff changeset
  1594
    TInt uriSegs = NumOfUriSegs( aURI );
hgs
parents:
diff changeset
  1595
                
hgs
parents:
diff changeset
  1596
    // The only node is WLAN, lets check if that is in question
hgs
parents:
diff changeset
  1597
    if( aURI.Match( _L8("WLAN" ) ) != KErrNotFound && uriSegs==1 )
hgs
parents:
diff changeset
  1598
    	{
hgs
parents:
diff changeset
  1599
    	// No actions needed, the table is created and filled in the
hgs
parents:
diff changeset
  1600
    	// Execution function.
hgs
parents:
diff changeset
  1601
    	iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1602
    	}
hgs
parents:
diff changeset
  1603
    else
hgs
parents:
diff changeset
  1604
    	{
hgs
parents:
diff changeset
  1605
    	iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1606
    	}
hgs
parents:
diff changeset
  1607
hgs
parents:
diff changeset
  1608
    _DBG_FILE("CGlobalWLANAdapter::AddNodeObjectL(): end");
hgs
parents:
diff changeset
  1609
    }
hgs
parents:
diff changeset
  1610
    
hgs
parents:
diff changeset
  1611
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1612
// CGlobalWLANAdapter::ExecuteCommandL
hgs
parents:
diff changeset
  1613
// not supported
hgs
parents:
diff changeset
  1614
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1615
void CGlobalWLANAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, 
hgs
parents:
diff changeset
  1616
                              const TDesC8& /*aLUID*/,
hgs
parents:
diff changeset
  1617
                              const TDesC8& /*aArgument*/, 
hgs
parents:
diff changeset
  1618
                              const TDesC8& /*aType*/,
hgs
parents:
diff changeset
  1619
                              TInt aStatusRef )
hgs
parents:
diff changeset
  1620
    {
hgs
parents:
diff changeset
  1621
    _DBG_FILE("CGlobalWLANAdapter::ExecuteCommandL(): begin");
hgs
parents:
diff changeset
  1622
    
hgs
parents:
diff changeset
  1623
    iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1624
    
hgs
parents:
diff changeset
  1625
    _DBG_FILE("CGlobalWLANAdapter::ExecuteCommandL(): end");
hgs
parents:
diff changeset
  1626
    }
hgs
parents:
diff changeset
  1627
hgs
parents:
diff changeset
  1628
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1629
// CGlobalWLANAdapter::ExecuteCommandL ( .. RWriteStream ..)
hgs
parents:
diff changeset
  1630
// not supported
hgs
parents:
diff changeset
  1631
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1632
void CGlobalWLANAdapter::ExecuteCommandL( const TDesC8& /*aURI*/, 
hgs
parents:
diff changeset
  1633
                              const TDesC8& /*aLUID*/,
hgs
parents:
diff changeset
  1634
                              RWriteStream*& /*aStream*/, 
hgs
parents:
diff changeset
  1635
                              const TDesC8& /*aType*/,
hgs
parents:
diff changeset
  1636
                              TInt aStatusref )
hgs
parents:
diff changeset
  1637
    {
hgs
parents:
diff changeset
  1638
    _DBG_FILE("CGlobalWLANAdapter::ExecuteCommandL(): begin");
hgs
parents:
diff changeset
  1639
     
hgs
parents:
diff changeset
  1640
   	iCallBack->SetStatusL( aStatusref, CSmlDmAdapter::EError );
hgs
parents:
diff changeset
  1641
   	
hgs
parents:
diff changeset
  1642
    _DBG_FILE("CGlobalWLANAdapter::ExecuteCommandL(): end");
hgs
parents:
diff changeset
  1643
    }
hgs
parents:
diff changeset
  1644
hgs
parents:
diff changeset
  1645
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1646
// CGlobalWLANAdapter::CopyCommandL
hgs
parents:
diff changeset
  1647
// not supported
hgs
parents:
diff changeset
  1648
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1649
void CGlobalWLANAdapter::CopyCommandL( const TDesC8& /*aTargetURI*/,
hgs
parents:
diff changeset
  1650
                                     const TDesC8& /*aTargetLUID*/,
hgs
parents:
diff changeset
  1651
                                     const TDesC8& /* aSourceURI*/,
hgs
parents:
diff changeset
  1652
                                     const TDesC8& /*aSourceLUID*/, 
hgs
parents:
diff changeset
  1653
                                     const TDesC8& /*aType*/,
hgs
parents:
diff changeset
  1654
                                     TInt aStatusRef )
hgs
parents:
diff changeset
  1655
    {
hgs
parents:
diff changeset
  1656
    _DBG_FILE("CGlobalWLANAdapter::CopyCommandL(): begin");
hgs
parents:
diff changeset
  1657
    
hgs
parents:
diff changeset
  1658
    iCallBack->SetStatusL(aStatusRef, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1659
    
hgs
parents:
diff changeset
  1660
    _DBG_FILE("CGlobalWLANAdapter::CopyCommandL(): end");
hgs
parents:
diff changeset
  1661
    }
hgs
parents:
diff changeset
  1662
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1663
// CGlobalWLANAdapter::StartAtomicL
hgs
parents:
diff changeset
  1664
// not supported
hgs
parents:
diff changeset
  1665
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1666
void CGlobalWLANAdapter::StartAtomicL()
hgs
parents:
diff changeset
  1667
    {
hgs
parents:
diff changeset
  1668
    _DBG_FILE("CGlobalWLANAdapter::StartAtomicL(): begin");
hgs
parents:
diff changeset
  1669
    _DBG_FILE("CGlobalWLANAdapter::StartAtomicL(): end");
hgs
parents:
diff changeset
  1670
    }
hgs
parents:
diff changeset
  1671
hgs
parents:
diff changeset
  1672
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1673
// CGlobalWLANAdapter::CommitAtomicL
hgs
parents:
diff changeset
  1674
// not supported
hgs
parents:
diff changeset
  1675
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1676
void CGlobalWLANAdapter::CommitAtomicL()
hgs
parents:
diff changeset
  1677
    {
hgs
parents:
diff changeset
  1678
    _DBG_FILE("CGlobalWLANAdapter::CommitAtomicL(): begin");
hgs
parents:
diff changeset
  1679
    _DBG_FILE("CGlobalWLANAdapter::CommitAtomicL(): end");
hgs
parents:
diff changeset
  1680
    }
hgs
parents:
diff changeset
  1681
hgs
parents:
diff changeset
  1682
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1683
// CGlobalWLANAdapter::RollbackAtomicL
hgs
parents:
diff changeset
  1684
// returns EError
hgs
parents:
diff changeset
  1685
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1686
void CGlobalWLANAdapter::RollbackAtomicL()
hgs
parents:
diff changeset
  1687
    {
hgs
parents:
diff changeset
  1688
    _DBG_FILE("CGlobalWLANAdapter::RollbackAtomicL(): begin");
hgs
parents:
diff changeset
  1689
    _DBG_FILE("CGlobalWLANAdapter::RollbackAtomicL(): end");
hgs
parents:
diff changeset
  1690
    }
hgs
parents:
diff changeset
  1691
hgs
parents:
diff changeset
  1692
hgs
parents:
diff changeset
  1693
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1694
// CGlobalWLANAdapter::StreamingSupport
hgs
parents:
diff changeset
  1695
// returns ETrue, streaming is supported
hgs
parents:
diff changeset
  1696
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1697
hgs
parents:
diff changeset
  1698
TBool CGlobalWLANAdapter::StreamingSupport( TInt& /*aItemSize*/ )
hgs
parents:
diff changeset
  1699
    {
hgs
parents:
diff changeset
  1700
    _DBG_FILE("CGlobalWLANAdapter::StreamingSupport(): begin");
hgs
parents:
diff changeset
  1701
    _DBG_FILE("CGlobalWLANAdapter::StreamingSupport(): end");
hgs
parents:
diff changeset
  1702
    return EFalse;
hgs
parents:
diff changeset
  1703
    }
hgs
parents:
diff changeset
  1704
hgs
parents:
diff changeset
  1705
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1706
// CGlobalWLANAdapter::StreamCommittedL
hgs
parents:
diff changeset
  1707
// not used in this adapter
hgs
parents:
diff changeset
  1708
//------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1709
hgs
parents:
diff changeset
  1710
void CGlobalWLANAdapter::StreamCommittedL()
hgs
parents:
diff changeset
  1711
    {
hgs
parents:
diff changeset
  1712
    _DBG_FILE("CGlobalWLANAdapter::StreamCommittedL(): begin");
hgs
parents:
diff changeset
  1713
    _DBG_FILE("CGlobalWLANAdapter::StreamCommittedL(): end");
hgs
parents:
diff changeset
  1714
    }
hgs
parents:
diff changeset
  1715
hgs
parents:
diff changeset
  1716
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1717
// CGlobalWLANAdapter* CGlobalWLANAdapter::CompleteOutstandingCmdsL( )
hgs
parents:
diff changeset
  1718
//-----------------------------------------------------------------------------
hgs
parents:
diff changeset
  1719
void CGlobalWLANAdapter::CompleteOutstandingCmdsL( )
hgs
parents:
diff changeset
  1720
    {
hgs
parents:
diff changeset
  1721
    _DBG_FILE("CGlobalWLANAdapter::CompleteOutStandingCmdsL(): begin");
hgs
parents:
diff changeset
  1722
    
hgs
parents:
diff changeset
  1723
    ExecuteBufferL( ETrue );  
hgs
parents:
diff changeset
  1724
    
hgs
parents:
diff changeset
  1725
    _DBG_FILE("CGlobalWLANAdapter::CompleteOutStandingCmdsL(): end");
hgs
parents:
diff changeset
  1726
    }
hgs
parents:
diff changeset
  1727
hgs
parents:
diff changeset
  1728
hgs
parents:
diff changeset
  1729
// -------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1730
// CGlobalWLANAdapter::FillNodeInfoL()
hgs
parents:
diff changeset
  1731
// Fills the node info in ddf structure
hgs
parents:
diff changeset
  1732
// -------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1733
void CGlobalWLANAdapter::FillNodeInfoL( MSmlDmDDFObject& aNode,
hgs
parents:
diff changeset
  1734
                                          TSmlDmAccessTypes aAccTypes,
hgs
parents:
diff changeset
  1735
                                          MSmlDmDDFObject::TOccurence aOccurrence, 
hgs
parents:
diff changeset
  1736
                                          MSmlDmDDFObject::TScope aScope, 
hgs
parents:
diff changeset
  1737
                                          MSmlDmDDFObject::TDFFormat aFormat,
hgs
parents:
diff changeset
  1738
                                          const TDesC8& aDescription )
hgs
parents:
diff changeset
  1739
                                          
hgs
parents:
diff changeset
  1740
    {
hgs
parents:
diff changeset
  1741
    aNode.SetAccessTypesL(aAccTypes);
hgs
parents:
diff changeset
  1742
    aNode.SetOccurenceL(aOccurrence);
hgs
parents:
diff changeset
  1743
    aNode.SetScopeL(aScope);
hgs
parents:
diff changeset
  1744
    aNode.SetDFFormatL(aFormat);
hgs
parents:
diff changeset
  1745
    if(aFormat!=MSmlDmDDFObject::ENode)
hgs
parents:
diff changeset
  1746
        {
hgs
parents:
diff changeset
  1747
        aNode.AddDFTypeMimeTypeL(KNSmlMimeType);
hgs
parents:
diff changeset
  1748
        }
hgs
parents:
diff changeset
  1749
    aNode.SetDescriptionL(aDescription);
hgs
parents:
diff changeset
  1750
    }
hgs
parents:
diff changeset
  1751
hgs
parents:
diff changeset
  1752
hgs
parents:
diff changeset
  1753
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1754
// void CGlobalWLANAdapter::ExecuteBufferL( TBool aFinal )
hgs
parents:
diff changeset
  1755
// Executes buffered commands
hgs
parents:
diff changeset
  1756
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1757
void CGlobalWLANAdapter::ExecuteBufferL( TBool /*aFinal*/ )
hgs
parents:
diff changeset
  1758
    {
hgs
parents:
diff changeset
  1759
    
hgs
parents:
diff changeset
  1760
    _DBG_FILE("CGlobalWLANAdapter::ExecuteBuffer(): begin");
hgs
parents:
diff changeset
  1761
  
hgs
parents:
diff changeset
  1762
  	// Store the given values into cenrep and commsdb and
hgs
parents:
diff changeset
  1763
  	// read the required parameters from cenrep and commsdb
hgs
parents:
diff changeset
  1764
  	TRAPD (err1, StoreCenRepParamsL());
hgs
parents:
diff changeset
  1765
  	TRAPD (err2, StoreCommsDBParamsL());
hgs
parents:
diff changeset
  1766
  	TRAPD (err3, ReadCenRepParamsL());
hgs
parents:
diff changeset
  1767
  	TRAPD (err4, ReadCommsDBParamsL());
hgs
parents:
diff changeset
  1768
  	
hgs
parents:
diff changeset
  1769
  	// Init the member variables after updates
hgs
parents:
diff changeset
  1770
  	InitMemberVariables();
hgs
parents:
diff changeset
  1771
  	
hgs
parents:
diff changeset
  1772
  	// If some of the operations failed, then leave
hgs
parents:
diff changeset
  1773
  	User::LeaveIfError( err1 );
hgs
parents:
diff changeset
  1774
  	User::LeaveIfError( err2 );
hgs
parents:
diff changeset
  1775
  	User::LeaveIfError( err3 );
hgs
parents:
diff changeset
  1776
  	User::LeaveIfError( err4 );
hgs
parents:
diff changeset
  1777
  	
hgs
parents:
diff changeset
  1778
    _DBG_FILE("CGlobalWLANAdapter::ExecuteBuffer(): End");
hgs
parents:
diff changeset
  1779
    }
hgs
parents:
diff changeset
  1780
hgs
parents:
diff changeset
  1781
hgs
parents:
diff changeset
  1782
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1783
// TBool CGlobalWLANAdapter::StoreCenRepParamsL( )
hgs
parents:
diff changeset
  1784
// Stores the parameters to central repository
hgs
parents:
diff changeset
  1785
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  1786
void CGlobalWLANAdapter::StoreCenRepParamsL()
hgs
parents:
diff changeset
  1787
	{
hgs
parents:
diff changeset
  1788
	
hgs
parents:
diff changeset
  1789
	_DBG_FILE("CGlobalWLANAdapter::StoreCenRepParams(): begin");
hgs
parents:
diff changeset
  1790
hgs
parents:
diff changeset
  1791
 	CRepository* repository = NULL;
hgs
parents:
diff changeset
  1792
 	CRepository* conSettRep = NULL;
hgs
parents:
diff changeset
  1793
 	TInt err = KErrNone;
hgs
parents:
diff changeset
  1794
    
hgs
parents:
diff changeset
  1795
hgs
parents:
diff changeset
  1796
	// Write KWlanInternetConnectivityTest
hgs
parents:
diff changeset
  1797
    if ( iWriteSettings->internetConnectivityTestPresent )
hgs
parents:
diff changeset
  1798
    	{
hgs
parents:
diff changeset
  1799
    	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanInternetConnectivityTest start " ); 
hgs
parents:
diff changeset
  1800
    	// Open the cenrep for internet connectivity settings. This is the only global wlan parameter
hgs
parents:
diff changeset
  1801
    	// from this cenrep
hgs
parents:
diff changeset
  1802
        conSettRep = CRepository::NewL( KCRUidInternetConnectivitySettings );
hgs
parents:
diff changeset
  1803
        
hgs
parents:
diff changeset
  1804
        // There is no pointer to the repository, leave
hgs
parents:
diff changeset
  1805
        if ( conSettRep == NULL )
hgs
parents:
diff changeset
  1806
        	{
hgs
parents:
diff changeset
  1807
        	User::LeaveIfError( KErrGeneral );
hgs
parents:
diff changeset
  1808
        	}
hgs
parents:
diff changeset
  1809
        
hgs
parents:
diff changeset
  1810
        CleanupStack::PushL(conSettRep);
hgs
parents:
diff changeset
  1811
        
hgs
parents:
diff changeset
  1812
    	err = conSettRep->Set( KIctsTestPermission, static_cast<TInt>( iWriteSettings->internetConnectivityTest ) );
hgs
parents:
diff changeset
  1813
    	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanInternetConnectivityTest set to cenRep " ); 
hgs
parents:
diff changeset
  1814
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1815
        	{ 
hgs
parents:
diff changeset
  1816
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanInternetConnectivityTest" ); 
hgs
parents:
diff changeset
  1817
        	iCallBack->SetStatusL(iWriteStatuses->internetConnectivityTestStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1818
       	 	}
hgs
parents:
diff changeset
  1819
       	 else
hgs
parents:
diff changeset
  1820
       	 	{
hgs
parents:
diff changeset
  1821
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanInternetConnectivityTest failed " ); 
hgs
parents:
diff changeset
  1822
       	 	iCallBack->SetStatusL(iWriteStatuses->internetConnectivityTestStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1823
       	 	}
hgs
parents:
diff changeset
  1824
    	CleanupStack::PopAndDestroy(conSettRep);
hgs
parents:
diff changeset
  1825
       	}
hgs
parents:
diff changeset
  1826
    
hgs
parents:
diff changeset
  1827
    
hgs
parents:
diff changeset
  1828
    // The rest of the parameters are stored to Wlan device settings cenRep
hgs
parents:
diff changeset
  1829
    repository = CRepository::NewL( KCRUidWlanDeviceSettingsRegistryId );
hgs
parents:
diff changeset
  1830
    
hgs
parents:
diff changeset
  1831
    // There is no pointer to the repository, leave
hgs
parents:
diff changeset
  1832
    if ( repository == NULL )
hgs
parents:
diff changeset
  1833
    	{
hgs
parents:
diff changeset
  1834
    	User::LeaveIfError( KErrGeneral );
hgs
parents:
diff changeset
  1835
    	}
hgs
parents:
diff changeset
  1836
    
hgs
parents:
diff changeset
  1837
    CleanupStack::PushL(repository);
hgs
parents:
diff changeset
  1838
    
hgs
parents:
diff changeset
  1839
    if ( iWriteSettings->MTUPresent )
hgs
parents:
diff changeset
  1840
    	{
hgs
parents:
diff changeset
  1841
    	err = repository->Set( KWlanMTU, static_cast<TInt>( iWriteSettings->MTU ) );
hgs
parents:
diff changeset
  1842
    		
hgs
parents:
diff changeset
  1843
    	DBG_ARGS8(_S8("CGlobalWLANAdapter::StoreCenRepParams, MTU status - (%d)"), err );
hgs
parents:
diff changeset
  1844
    	if( err == KErrNone  ) 
hgs
parents:
diff changeset
  1845
        	{ 
hgs
parents:
diff changeset
  1846
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() MTU" ); 
hgs
parents:
diff changeset
  1847
        	iCallBack->SetStatusL(iWriteStatuses->MTUStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1848
       	 	}
hgs
parents:
diff changeset
  1849
       	 else
hgs
parents:
diff changeset
  1850
       	 	{
hgs
parents:
diff changeset
  1851
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() MTU failed " ); 
hgs
parents:
diff changeset
  1852
       	 	iCallBack->SetStatusL(iWriteStatuses->MTUStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1853
       	 	}
hgs
parents:
diff changeset
  1854
       	}
hgs
parents:
diff changeset
  1855
hgs
parents:
diff changeset
  1856
    // Write KWlanScanRate
hgs
parents:
diff changeset
  1857
    if ( iWriteSettings->scanRatePresent )
hgs
parents:
diff changeset
  1858
    	{
hgs
parents:
diff changeset
  1859
    	err = repository->Set( KWlanScanRate, static_cast<TInt>( iWriteSettings->scanRate ) );
hgs
parents:
diff changeset
  1860
    		
hgs
parents:
diff changeset
  1861
    	DBG_ARGS8(_S8("CGlobalWLANAdapter::StoreCenRepParams, scanrate status - (%d)"), err );
hgs
parents:
diff changeset
  1862
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1863
        	{ 
hgs
parents:
diff changeset
  1864
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() WlanScanRate" ); 
hgs
parents:
diff changeset
  1865
        	iCallBack->SetStatusL(iWriteStatuses->scanRateStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1866
       	 	}
hgs
parents:
diff changeset
  1867
       	 else
hgs
parents:
diff changeset
  1868
       	 	{
hgs
parents:
diff changeset
  1869
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() WlanScanRate failed " ); 
hgs
parents:
diff changeset
  1870
       	 	iCallBack->SetStatusL(iWriteStatuses->scanRateStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1871
       	 	}
hgs
parents:
diff changeset
  1872
       	}
hgs
parents:
diff changeset
  1873
hgs
parents:
diff changeset
  1874
    // Write KWlanRcpiTrigger
hgs
parents:
diff changeset
  1875
   	if ( iWriteSettings->RCPITriggerPresent )
hgs
parents:
diff changeset
  1876
    	{
hgs
parents:
diff changeset
  1877
    	err = repository->Set( KWlanRcpiTrigger, static_cast<TInt>( iWriteSettings->RCPITrigger ) );
hgs
parents:
diff changeset
  1878
    		
hgs
parents:
diff changeset
  1879
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1880
        	{
hgs
parents:
diff changeset
  1881
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRcpiTrigger" );
hgs
parents:
diff changeset
  1882
    	    iCallBack->SetStatusL(iWriteStatuses->RCPITriggerStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1883
       	 	}
hgs
parents:
diff changeset
  1884
       	 else
hgs
parents:
diff changeset
  1885
       	 	{
hgs
parents:
diff changeset
  1886
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRcpiTrigger failed" );
hgs
parents:
diff changeset
  1887
       	 	iCallBack->SetStatusL(iWriteStatuses->RCPITriggerStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1888
       	 	}
hgs
parents:
diff changeset
  1889
    	}
hgs
parents:
diff changeset
  1890
hgs
parents:
diff changeset
  1891
    // Write KWlanMinActiveChannelTime
hgs
parents:
diff changeset
  1892
    if ( iWriteSettings->minActiveChannelTimePresent )
hgs
parents:
diff changeset
  1893
    	{
hgs
parents:
diff changeset
  1894
    	err = repository->Set( KWlanMinActiveChannelTime, static_cast<TInt>( iWriteSettings->minActiveChannelTime ) );
hgs
parents:
diff changeset
  1895
    		
hgs
parents:
diff changeset
  1896
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1897
        	{
hgs
parents:
diff changeset
  1898
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMinActiveChannelTime" );
hgs
parents:
diff changeset
  1899
        	iCallBack->SetStatusL(iWriteStatuses->minActiveChannelTimeStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1900
       	 	}
hgs
parents:
diff changeset
  1901
       	 else
hgs
parents:
diff changeset
  1902
       	 	{
hgs
parents:
diff changeset
  1903
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMinActiveChannelTime failed" );
hgs
parents:
diff changeset
  1904
       	 	iCallBack->SetStatusL(iWriteStatuses->minActiveChannelTimeStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1905
       	 	}
hgs
parents:
diff changeset
  1906
        }
hgs
parents:
diff changeset
  1907
hgs
parents:
diff changeset
  1908
    // Write KWlanMaxActiveChannelTime
hgs
parents:
diff changeset
  1909
    if ( iWriteSettings->maxActiveChannelTimePresent )
hgs
parents:
diff changeset
  1910
    	{
hgs
parents:
diff changeset
  1911
    	err = repository->Set( KWlanMaxActiveChannelTime, static_cast<TInt>( iWriteSettings->maxActiveChannelTime ) );
hgs
parents:
diff changeset
  1912
    		
hgs
parents:
diff changeset
  1913
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1914
        	{ 
hgs
parents:
diff changeset
  1915
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxActiveChannelTime" );
hgs
parents:
diff changeset
  1916
        	iCallBack->SetStatusL(iWriteStatuses->maxActiveChannelTimeStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1917
       	 	}
hgs
parents:
diff changeset
  1918
       	 else
hgs
parents:
diff changeset
  1919
       	 	{
hgs
parents:
diff changeset
  1920
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxActiveChannelTime failed" );
hgs
parents:
diff changeset
  1921
       	 	iCallBack->SetStatusL(iWriteStatuses->maxActiveChannelTimeStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1922
       	 	}
hgs
parents:
diff changeset
  1923
        }
hgs
parents:
diff changeset
  1924
hgs
parents:
diff changeset
  1925
    // Write KWlanMaxTxMSDULifeTime
hgs
parents:
diff changeset
  1926
    if ( iWriteSettings->maxTxMSDULifeTimePresent )
hgs
parents:
diff changeset
  1927
    	{
hgs
parents:
diff changeset
  1928
    	err = repository->Set( KWlanMaxTxMSDULifeTime, static_cast<TInt>( iWriteSettings->maxTxMSDULifeTime ) );
hgs
parents:
diff changeset
  1929
    	
hgs
parents:
diff changeset
  1930
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1931
        	{
hgs
parents:
diff changeset
  1932
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanMaxTxMSDULifeTime" );
hgs
parents:
diff changeset
  1933
        	iCallBack->SetStatusL(iWriteStatuses->maxTxMSDULifeTimeStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1934
       	 	}
hgs
parents:
diff changeset
  1935
       	 else
hgs
parents:
diff changeset
  1936
       	 	{
hgs
parents:
diff changeset
  1937
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanMaxTxMSDULifeTime failed" );
hgs
parents:
diff changeset
  1938
       	 	iCallBack->SetStatusL(iWriteStatuses->maxTxMSDULifeTimeStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1939
       	 	}
hgs
parents:
diff changeset
  1940
        }
hgs
parents:
diff changeset
  1941
hgs
parents:
diff changeset
  1942
    // Write KWlanScanExpirationTimer
hgs
parents:
diff changeset
  1943
    if ( iWriteSettings->scanExpirationTimerPresent )
hgs
parents:
diff changeset
  1944
    	{
hgs
parents:
diff changeset
  1945
    	err = repository->Set( KWlanScanExpirationTimer, static_cast<TInt>( iWriteSettings->scanExpirationTimer ) );
hgs
parents:
diff changeset
  1946
    	
hgs
parents:
diff changeset
  1947
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1948
        	{
hgs
parents:
diff changeset
  1949
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanScanExpirationTimer" );
hgs
parents:
diff changeset
  1950
        	iCallBack->SetStatusL(iWriteStatuses->scanExpirationTimerStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1951
       	 	}
hgs
parents:
diff changeset
  1952
       	 else
hgs
parents:
diff changeset
  1953
       	 	{
hgs
parents:
diff changeset
  1954
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanScanExpirationTimer failed" );
hgs
parents:
diff changeset
  1955
       	 	iCallBack->SetStatusL(iWriteStatuses->scanExpirationTimerStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1956
       	 	}
hgs
parents:
diff changeset
  1957
		}
hgs
parents:
diff changeset
  1958
				
hgs
parents:
diff changeset
  1959
    // Write KWlanUnloadDriverTimer
hgs
parents:
diff changeset
  1960
    if ( iWriteSettings->unloadDriverTimerPresent )
hgs
parents:
diff changeset
  1961
    	{
hgs
parents:
diff changeset
  1962
    	err = repository->Set( KWlanUnloadDriverTimer, static_cast<TInt>( iWriteSettings->unloadDriverTimer ) );
hgs
parents:
diff changeset
  1963
    	
hgs
parents:
diff changeset
  1964
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  1965
        	{
hgs
parents:
diff changeset
  1966
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanUnloadDriverTimer" );
hgs
parents:
diff changeset
  1967
        	iCallBack->SetStatusL(iWriteStatuses->unloadDriverTimerStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1968
       	 	}
hgs
parents:
diff changeset
  1969
       	 else
hgs
parents:
diff changeset
  1970
       	 	{
hgs
parents:
diff changeset
  1971
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams()KWlanUnloadDriverTimer failed" );
hgs
parents:
diff changeset
  1972
       	 	iCallBack->SetStatusL(iWriteStatuses->unloadDriverTimerStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1973
       	 	}
hgs
parents:
diff changeset
  1974
        }
hgs
parents:
diff changeset
  1975
hgs
parents:
diff changeset
  1976
    // Write KWlanRoamTimer
hgs
parents:
diff changeset
  1977
    if ( iWriteSettings->roamTimerPresent )
hgs
parents:
diff changeset
  1978
    	{
hgs
parents:
diff changeset
  1979
    	err = repository->Set( KWlanRoamTimer, static_cast<TInt>( iWriteSettings->roamTimer ) );
hgs
parents:
diff changeset
  1980
    	
hgs
parents:
diff changeset
  1981
    	if( err == KErrNone) 
hgs
parents:
diff changeset
  1982
        	{
hgs
parents:
diff changeset
  1983
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRoamTimer" );
hgs
parents:
diff changeset
  1984
        	iCallBack->SetStatusL(iWriteStatuses->roamTimerStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  1985
       	 	}
hgs
parents:
diff changeset
  1986
       	 else
hgs
parents:
diff changeset
  1987
       	 	{
hgs
parents:
diff changeset
  1988
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRoamTimer failed" );
hgs
parents:
diff changeset
  1989
       	 	iCallBack->SetStatusL(iWriteStatuses->roamTimerStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  1990
       	 	}
hgs
parents:
diff changeset
  1991
        }
hgs
parents:
diff changeset
  1992
hgs
parents:
diff changeset
  1993
    // Write KWlanRcpiDifference
hgs
parents:
diff changeset
  1994
    if ( iWriteSettings->RCPIDifferencePresent )
hgs
parents:
diff changeset
  1995
    	{
hgs
parents:
diff changeset
  1996
    	err = repository->Set( KWlanRcpiDifference, static_cast<TInt>( iWriteSettings->RCPIDifference ) );
hgs
parents:
diff changeset
  1997
    	
hgs
parents:
diff changeset
  1998
    	DBG_ARGS8(_S8("CGlobalWLANAdapter::StoreCenRepParams, rcpidifference status - (%d)"), err );
hgs
parents:
diff changeset
  1999
    	if( err == KErrNone) 
hgs
parents:
diff changeset
  2000
        	{ 
hgs
parents:
diff changeset
  2001
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRcpiDifference" );
hgs
parents:
diff changeset
  2002
        	iCallBack->SetStatusL(iWriteStatuses->RCPIDifferenceStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2003
       	 	}
hgs
parents:
diff changeset
  2004
       	 else
hgs
parents:
diff changeset
  2005
       	 	{
hgs
parents:
diff changeset
  2006
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanRcpiDifference failed" );
hgs
parents:
diff changeset
  2007
       	 	iCallBack->SetStatusL(iWriteStatuses->RCPIDifferenceStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2008
       	 	}
hgs
parents:
diff changeset
  2009
        }
hgs
parents:
diff changeset
  2010
hgs
parents:
diff changeset
  2011
    // Write KWlanConnRegainTimer
hgs
parents:
diff changeset
  2012
    if ( iWriteSettings->connRegainTimerPresent )
hgs
parents:
diff changeset
  2013
    	{
hgs
parents:
diff changeset
  2014
    	err = repository->Set( KWlanConnRegainTimer, static_cast<TInt>( iWriteSettings->connRegainTimer ) );
hgs
parents:
diff changeset
  2015
    	
hgs
parents:
diff changeset
  2016
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2017
        	{
hgs
parents:
diff changeset
  2018
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanConnRegainTimer" );
hgs
parents:
diff changeset
  2019
        	iCallBack->SetStatusL(iWriteStatuses->connRegainTimerStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2020
       	 	}
hgs
parents:
diff changeset
  2021
       	else
hgs
parents:
diff changeset
  2022
       	 	{
hgs
parents:
diff changeset
  2023
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanConnRegainTimer failed" );
hgs
parents:
diff changeset
  2024
       	 	iCallBack->SetStatusL(iWriteStatuses->connRegainTimerStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2025
       	 	}
hgs
parents:
diff changeset
  2026
		}
hgs
parents:
diff changeset
  2027
				
hgs
parents:
diff changeset
  2028
    // Write KWlanMaxTriesToFindNw
hgs
parents:
diff changeset
  2029
   	if ( iWriteSettings->maxTriesToFindNwPresent )
hgs
parents:
diff changeset
  2030
    	{
hgs
parents:
diff changeset
  2031
    	err = repository->Set( KWlanMaxTriesToFindNw, static_cast<TInt>( iWriteSettings->maxTriesToFindNw ) );
hgs
parents:
diff changeset
  2032
    	
hgs
parents:
diff changeset
  2033
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2034
        	{
hgs
parents:
diff changeset
  2035
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxTriesToFindNw ");
hgs
parents:
diff changeset
  2036
        	iCallBack->SetStatusL(iWriteStatuses->maxTriesToFindNwStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2037
       	 	}
hgs
parents:
diff changeset
  2038
       	 else
hgs
parents:
diff changeset
  2039
       	 	{
hgs
parents:
diff changeset
  2040
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxTriesToFindNw failed");
hgs
parents:
diff changeset
  2041
       	 	iCallBack->SetStatusL(iWriteStatuses->maxTriesToFindNwStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2042
       	 	}
hgs
parents:
diff changeset
  2043
        }
hgs
parents:
diff changeset
  2044
hgs
parents:
diff changeset
  2045
    // Write KWlanDelayBetweenFindNw
hgs
parents:
diff changeset
  2046
    if ( iWriteSettings->delayBetweenFindNwPresent )
hgs
parents:
diff changeset
  2047
    	{
hgs
parents:
diff changeset
  2048
    	err = repository->Set( KWlanDelayBetweenFindNw, static_cast<TInt>( iWriteSettings->delayBetweenFindNw ) );
hgs
parents:
diff changeset
  2049
    	
hgs
parents:
diff changeset
  2050
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2051
        	{
hgs
parents:
diff changeset
  2052
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanDelayBetweenFindNw" );
hgs
parents:
diff changeset
  2053
        	iCallBack->SetStatusL(iWriteStatuses->delayBetweenFindNwStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2054
       	 	}
hgs
parents:
diff changeset
  2055
       	 else
hgs
parents:
diff changeset
  2056
       	 	{
hgs
parents:
diff changeset
  2057
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanDelayBetweenFindNw failed" );
hgs
parents:
diff changeset
  2058
       	 	iCallBack->SetStatusL(iWriteStatuses->delayBetweenFindNwStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2059
       	 	}
hgs
parents:
diff changeset
  2060
		}
hgs
parents:
diff changeset
  2061
				
hgs
parents:
diff changeset
  2062
    // Write KWlanMinPassiveChannelTime
hgs
parents:
diff changeset
  2063
    if ( iWriteSettings->minPassiveChannelTimePresent )
hgs
parents:
diff changeset
  2064
    	{
hgs
parents:
diff changeset
  2065
    	err = repository->Set( KWlanMinPassiveChannelTime, static_cast<TInt>( iWriteSettings->minPassiveChannelTime ) );
hgs
parents:
diff changeset
  2066
    	
hgs
parents:
diff changeset
  2067
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2068
        	{
hgs
parents:
diff changeset
  2069
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMinPassiveChannelTime" );
hgs
parents:
diff changeset
  2070
        	iCallBack->SetStatusL(iWriteStatuses->minPassiveChannelTimeStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2071
       	 	}
hgs
parents:
diff changeset
  2072
       	 else
hgs
parents:
diff changeset
  2073
       	 	{
hgs
parents:
diff changeset
  2074
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMinPassiveChannelTime failed" );
hgs
parents:
diff changeset
  2075
       	 	iCallBack->SetStatusL(iWriteStatuses->minPassiveChannelTimeStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2076
       	 	}
hgs
parents:
diff changeset
  2077
        }
hgs
parents:
diff changeset
  2078
hgs
parents:
diff changeset
  2079
    // Write KWlanMaxPassiveChannelTime
hgs
parents:
diff changeset
  2080
    if ( iWriteSettings->maxPassiveChannelTimePresent )
hgs
parents:
diff changeset
  2081
    	{
hgs
parents:
diff changeset
  2082
    	err = repository->Set( KWlanMaxPassiveChannelTime, static_cast<TInt>( iWriteSettings->maxPassiveChannelTime ) );
hgs
parents:
diff changeset
  2083
    	
hgs
parents:
diff changeset
  2084
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2085
        	{
hgs
parents:
diff changeset
  2086
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxPassiveChannelTime" );
hgs
parents:
diff changeset
  2087
        	iCallBack->SetStatusL(iWriteStatuses->maxPassiveChannelTimeStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2088
       	 	}
hgs
parents:
diff changeset
  2089
       	else
hgs
parents:
diff changeset
  2090
       	 	{
hgs
parents:
diff changeset
  2091
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxPassiveChannelTime failed" );
hgs
parents:
diff changeset
  2092
       	 	iCallBack->SetStatusL(iWriteStatuses->maxPassiveChannelTimeStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2093
       	 	}
hgs
parents:
diff changeset
  2094
		}
hgs
parents:
diff changeset
  2095
				
hgs
parents:
diff changeset
  2096
    // Write KWlanMaxApFailureCount
hgs
parents:
diff changeset
  2097
    if ( iWriteSettings->maxApFailureCountPresent )
hgs
parents:
diff changeset
  2098
    	{
hgs
parents:
diff changeset
  2099
    	err = repository->Set( KWlanMaxApFailureCount, static_cast<TInt>( iWriteSettings->maxApFailureCount ) );
hgs
parents:
diff changeset
  2100
    	
hgs
parents:
diff changeset
  2101
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2102
        	{
hgs
parents:
diff changeset
  2103
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxApFailureCount" );
hgs
parents:
diff changeset
  2104
        	iCallBack->SetStatusL(iWriteStatuses->maxApFailureCountStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2105
       	 	}
hgs
parents:
diff changeset
  2106
        else
hgs
parents:
diff changeset
  2107
       	 	{
hgs
parents:
diff changeset
  2108
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanMaxApFailureCount failed" );
hgs
parents:
diff changeset
  2109
       	 	iCallBack->SetStatusL(iWriteStatuses->maxApFailureCountStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2110
       	 	}
hgs
parents:
diff changeset
  2111
        }
hgs
parents:
diff changeset
  2112
hgs
parents:
diff changeset
  2113
    // Write KWlanLongBeaconFindCount
hgs
parents:
diff changeset
  2114
    if ( iWriteSettings->longBeaconFindCountPresent )
hgs
parents:
diff changeset
  2115
    	{
hgs
parents:
diff changeset
  2116
    	err = repository->Set( KWlanLongBeaconFindCount, static_cast<TInt>( iWriteSettings->longBeaconFindCount ) );
hgs
parents:
diff changeset
  2117
    	
hgs
parents:
diff changeset
  2118
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2119
      		{
hgs
parents:
diff changeset
  2120
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanLongBeaconFindCount" );
hgs
parents:
diff changeset
  2121
        	iCallBack->SetStatusL(iWriteStatuses->longBeaconFindCountStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2122
       	 	}
hgs
parents:
diff changeset
  2123
       	else
hgs
parents:
diff changeset
  2124
       	 	{
hgs
parents:
diff changeset
  2125
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanLongBeaconFindCount failed" );
hgs
parents:
diff changeset
  2126
       	 	iCallBack->SetStatusL(iWriteStatuses->longBeaconFindCountStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2127
       	 	}
hgs
parents:
diff changeset
  2128
		}
hgs
parents:
diff changeset
  2129
				
hgs
parents:
diff changeset
  2130
    // Write KWlanQosNullFrameInterval
hgs
parents:
diff changeset
  2131
    if ( iWriteSettings->qosNullFrameIntervalPresent )
hgs
parents:
diff changeset
  2132
    	{
hgs
parents:
diff changeset
  2133
    	err = repository->Set( KWlanQosNullFrameInterval, static_cast<TInt>( iWriteSettings->qosNullFrameInterval ) );
hgs
parents:
diff changeset
  2134
    	
hgs
parents:
diff changeset
  2135
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2136
        	{
hgs
parents:
diff changeset
  2137
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanQosNullFrameInterval" );
hgs
parents:
diff changeset
  2138
        	iCallBack->SetStatusL(iWriteStatuses->qosNullFrameIntervalStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2139
       	 	}
hgs
parents:
diff changeset
  2140
       	else
hgs
parents:
diff changeset
  2141
       	 	{
hgs
parents:
diff changeset
  2142
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanQosNullFrameInterval failed" );
hgs
parents:
diff changeset
  2143
       	 	iCallBack->SetStatusL(iWriteStatuses->qosNullFrameIntervalStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2144
       	 	}
hgs
parents:
diff changeset
  2145
        }
hgs
parents:
diff changeset
  2146
hgs
parents:
diff changeset
  2147
    // Write KWlanQosNullFrameTimeout
hgs
parents:
diff changeset
  2148
    if ( iWriteSettings->qosNullFrameTimeoutPresent )
hgs
parents:
diff changeset
  2149
    	{
hgs
parents:
diff changeset
  2150
    	err = repository->Set( KWlanQosNullFrameTimeout, static_cast<TInt>( iWriteSettings->qosNullFrameTimeout ) );
hgs
parents:
diff changeset
  2151
    	
hgs
parents:
diff changeset
  2152
    	if( err == KErrNone ) 
hgs
parents:
diff changeset
  2153
        	{
hgs
parents:
diff changeset
  2154
        	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanQosNullFrameTimeout" );
hgs
parents:
diff changeset
  2155
        	iCallBack->SetStatusL(iWriteStatuses->qosNullFrameTimeoutStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2156
       	 	}
hgs
parents:
diff changeset
  2157
       	else
hgs
parents:
diff changeset
  2158
       	 	{
hgs
parents:
diff changeset
  2159
       	 	_DBG_FILE("CGlobalWLANAdapter:StoreCenRepParams() KWlanQosNullFrameTimeout failed" );
hgs
parents:
diff changeset
  2160
       	 	iCallBack->SetStatusL(iWriteStatuses->qosNullFrameTimeoutStatus, CSmlDmAdapter::EError);
hgs
parents:
diff changeset
  2161
       	 	}
hgs
parents:
diff changeset
  2162
       	}
hgs
parents:
diff changeset
  2163
hgs
parents:
diff changeset
  2164
    // Cleanup
hgs
parents:
diff changeset
  2165
   	CleanupStack::PopAndDestroy(repository);
hgs
parents:
diff changeset
  2166
    _DBG_FILE("CGlobalWLANAdapter::StoreCenRepParams(): end");
hgs
parents:
diff changeset
  2167
    return;
hgs
parents:
diff changeset
  2168
	}
hgs
parents:
diff changeset
  2169
	
hgs
parents:
diff changeset
  2170
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2171
// void CGlobalWLANAdapter::StoreCommsDBParams( )
hgs
parents:
diff changeset
  2172
// Stores the parameters to central repository
hgs
parents:
diff changeset
  2173
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2174
void CGlobalWLANAdapter::StoreCommsDBParamsL()
hgs
parents:
diff changeset
  2175
	{
hgs
parents:
diff changeset
  2176
	
hgs
parents:
diff changeset
  2177
	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): begin");
hgs
parents:
diff changeset
  2178
	
hgs
parents:
diff changeset
  2179
	CCommsDatabase* db = CCommsDatabase::NewL();
hgs
parents:
diff changeset
  2180
	CleanupStack::PushL(db);
hgs
parents:
diff changeset
  2181
			
hgs
parents:
diff changeset
  2182
	// User defined WLAN device settings table from Comms database
hgs
parents:
diff changeset
  2183
    CCommsDbTableView* usrTable;
hgs
parents:
diff changeset
  2184
    
hgs
parents:
diff changeset
  2185
    // Open user settings.
hgs
parents:
diff changeset
  2186
    usrTable = db->OpenViewMatchingUintLC( TPtrC(WLAN_DEVICE_SETTINGS),
hgs
parents:
diff changeset
  2187
											TPtrC(WLAN_DEVICE_SETTINGS_TYPE),
hgs
parents:
diff changeset
  2188
											KWlanUserSettings );
hgs
parents:
diff changeset
  2189
		
hgs
parents:
diff changeset
  2190
	// if record did not exist, then it is created.
hgs
parents:
diff changeset
  2191
    if ( usrTable->GotoFirstRecord() != KErrNone )
hgs
parents:
diff changeset
  2192
        {
hgs
parents:
diff changeset
  2193
        _DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): Record creation");
hgs
parents:
diff changeset
  2194
    	TUint32 id;
hgs
parents:
diff changeset
  2195
    	User::LeaveIfError( usrTable->InsertRecord( id ) );
hgs
parents:
diff changeset
  2196
    
hgs
parents:
diff changeset
  2197
    	usrTable->WriteUintL( TPtrC(WLAN_DEVICE_SETTINGS_TYPE), KWlanUserSettings );  
hgs
parents:
diff changeset
  2198
    	//usrTable->WriteUintL( TPtrC(WLAN_TABLE_VERSION), KWlanDeviceSettingsTableVersion );
hgs
parents:
diff changeset
  2199
    	User::LeaveIfError( usrTable->PutRecordChanges() ); // End and save changes.
hgs
parents:
diff changeset
  2200
        }
hgs
parents:
diff changeset
  2201
			
hgs
parents:
diff changeset
  2202
	// Write CommsDat settings
hgs
parents:
diff changeset
  2203
    User::LeaveIfError( usrTable->UpdateRecord() ); // Begin changes.
hgs
parents:
diff changeset
  2204
	
hgs
parents:
diff changeset
  2205
	// Check which parameters are present in the structure, store them into commsdb and
hgs
parents:
diff changeset
  2206
	// update the status to OK/Error accordingly	
hgs
parents:
diff changeset
  2207
	if ( iWriteSettings->backgroundScanIntervalPresent )
hgs
parents:
diff changeset
  2208
		{
hgs
parents:
diff changeset
  2209
		_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KBgScanInterval");
hgs
parents:
diff changeset
  2210
    	TRAPD( err, usrTable->WriteUintL( TPtrC(WLAN_BG_SCAN_INTERVAL), iWriteSettings->backgroundScanInterval ));
hgs
parents:
diff changeset
  2211
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2212
    		{
hgs
parents:
diff changeset
  2213
    		iCallBack->SetStatusL(iWriteStatuses->backgroundScanIntervalStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2214
    		}
hgs
parents:
diff changeset
  2215
    	else
hgs
parents:
diff changeset
  2216
    		{
hgs
parents:
diff changeset
  2217
    		iCallBack->SetStatusL(iWriteStatuses->backgroundScanIntervalStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2218
    		}
hgs
parents:
diff changeset
  2219
		}
hgs
parents:
diff changeset
  2220
		
hgs
parents:
diff changeset
  2221
    if ( iWriteSettings->useDefaultSettingsPresent )
hgs
parents:
diff changeset
  2222
    	{
hgs
parents:
diff changeset
  2223
    	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KUseDefaultSettings");
hgs
parents:
diff changeset
  2224
    	TRAPD( err, usrTable->WriteBoolL( TPtrC(WLAN_USE_DEFAULT_SETTINGS), iWriteSettings->useDefaultSettings ));
hgs
parents:
diff changeset
  2225
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2226
    		{
hgs
parents:
diff changeset
  2227
    		iCallBack->SetStatusL(iWriteStatuses->useDefaultSettingsStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2228
    		}
hgs
parents:
diff changeset
  2229
    	else
hgs
parents:
diff changeset
  2230
    		{
hgs
parents:
diff changeset
  2231
    		iCallBack->SetStatusL(iWriteStatuses->useDefaultSettingsStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2232
    		}
hgs
parents:
diff changeset
  2233
		}
hgs
parents:
diff changeset
  2234
		
hgs
parents:
diff changeset
  2235
    if ( iWriteSettings->longRetryLimitPresent )
hgs
parents:
diff changeset
  2236
   		{
hgs
parents:
diff changeset
  2237
   		_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanLongRetry");
hgs
parents:
diff changeset
  2238
    	TRAPD( err, usrTable->WriteUintL( TPtrC(WLAN_LONG_RETRY), iWriteSettings->longRetryLimit ));
hgs
parents:
diff changeset
  2239
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2240
    		{
hgs
parents:
diff changeset
  2241
    		iCallBack->SetStatusL(iWriteStatuses->longRetryLimitStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2242
    		}
hgs
parents:
diff changeset
  2243
    	else
hgs
parents:
diff changeset
  2244
    		{
hgs
parents:
diff changeset
  2245
    		iCallBack->SetStatusL(iWriteStatuses->longRetryLimitStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2246
    		}
hgs
parents:
diff changeset
  2247
		}
hgs
parents:
diff changeset
  2248
		
hgs
parents:
diff changeset
  2249
    if ( iWriteSettings->shortRetryLimitPresent )
hgs
parents:
diff changeset
  2250
    	{
hgs
parents:
diff changeset
  2251
    	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanShortRetry");
hgs
parents:
diff changeset
  2252
    	TRAPD( err, usrTable->WriteUintL( TPtrC(WLAN_SHORT_RETRY), iWriteSettings->shortRetryLimit ));
hgs
parents:
diff changeset
  2253
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2254
    		{
hgs
parents:
diff changeset
  2255
    		iCallBack->SetStatusL(iWriteStatuses->shortRetryLimitStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2256
    		}
hgs
parents:
diff changeset
  2257
    	else
hgs
parents:
diff changeset
  2258
    		{
hgs
parents:
diff changeset
  2259
    		iCallBack->SetStatusL(iWriteStatuses->shortRetryLimitStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2260
    		}
hgs
parents:
diff changeset
  2261
		}
hgs
parents:
diff changeset
  2262
		
hgs
parents:
diff changeset
  2263
    if ( iWriteSettings->RTSThresholdPresent )
hgs
parents:
diff changeset
  2264
   		{
hgs
parents:
diff changeset
  2265
   		_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanRTSThreshold");
hgs
parents:
diff changeset
  2266
    	TRAPD( err, usrTable->WriteUintL( TPtrC(WLAN_RTS_THRESHOLD), iWriteSettings->RTSThreshold ));
hgs
parents:
diff changeset
  2267
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2268
    		{
hgs
parents:
diff changeset
  2269
    		iCallBack->SetStatusL(iWriteStatuses->RTSThresholdStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2270
    		}
hgs
parents:
diff changeset
  2271
    	else
hgs
parents:
diff changeset
  2272
    		{
hgs
parents:
diff changeset
  2273
    		iCallBack->SetStatusL(iWriteStatuses->RTSThresholdStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2274
    		}
hgs
parents:
diff changeset
  2275
		}
hgs
parents:
diff changeset
  2276
		
hgs
parents:
diff changeset
  2277
    if ( iWriteSettings->TXPowerLevelPresent )
hgs
parents:
diff changeset
  2278
    	{
hgs
parents:
diff changeset
  2279
    	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanTxPowerLevel");
hgs
parents:
diff changeset
  2280
    	TRAPD( err, usrTable->WriteUintL( TPtrC(NU_WLAN_TX_POWER_LEVEL), iWriteSettings->TXPowerLevel ));
hgs
parents:
diff changeset
  2281
    	if ( err == KErrNone)
hgs
parents:
diff changeset
  2282
    		{
hgs
parents:
diff changeset
  2283
    		iCallBack->SetStatusL(iWriteStatuses->TXPowerLevelStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2284
    		}
hgs
parents:
diff changeset
  2285
    	else
hgs
parents:
diff changeset
  2286
    		{
hgs
parents:
diff changeset
  2287
    		iCallBack->SetStatusL(iWriteStatuses->TXPowerLevelStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2288
    		}
hgs
parents:
diff changeset
  2289
		}
hgs
parents:
diff changeset
  2290
		
hgs
parents:
diff changeset
  2291
    if ( iWriteSettings->allowRadioMeasurementsPresent )
hgs
parents:
diff changeset
  2292
    	{
hgs
parents:
diff changeset
  2293
    	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanAllowRadioMeasurements");
hgs
parents:
diff changeset
  2294
    	TRAPD( err, usrTable->WriteBoolL( TPtrC(WLAN_ALLOW_RADIO_MEASUREMENTS), iWriteSettings->allowRadioMeasurements ));
hgs
parents:
diff changeset
  2295
        if ( err == KErrNone)
hgs
parents:
diff changeset
  2296
    		{
hgs
parents:
diff changeset
  2297
    		iCallBack->SetStatusL(iWriteStatuses->allowRadioMeasurementsStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2298
    		}
hgs
parents:
diff changeset
  2299
    	else
hgs
parents:
diff changeset
  2300
    		{
hgs
parents:
diff changeset
  2301
    		iCallBack->SetStatusL(iWriteStatuses->allowRadioMeasurementsStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2302
    		}
hgs
parents:
diff changeset
  2303
		}
hgs
parents:
diff changeset
  2304
    
hgs
parents:
diff changeset
  2305
    if ( iWriteSettings->powerSavingPresent )
hgs
parents:
diff changeset
  2306
    	{
hgs
parents:
diff changeset
  2307
    	_DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): write KWlanPowerSaving");
hgs
parents:
diff changeset
  2308
    	TRAPD( err, usrTable->WriteBoolL( TPtrC(WLAN_POWER_MODE), iWriteSettings->powerSaving ));
hgs
parents:
diff changeset
  2309
        if ( err == KErrNone)
hgs
parents:
diff changeset
  2310
    		{
hgs
parents:
diff changeset
  2311
    		iCallBack->SetStatusL(iWriteStatuses->powerSavingStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2312
    		}
hgs
parents:
diff changeset
  2313
    	else
hgs
parents:
diff changeset
  2314
    		{
hgs
parents:
diff changeset
  2315
    		iCallBack->SetStatusL(iWriteStatuses->powerSavingStatus, CSmlDmAdapter::EError);	
hgs
parents:
diff changeset
  2316
    		}
hgs
parents:
diff changeset
  2317
		}
hgs
parents:
diff changeset
  2318
    
hgs
parents:
diff changeset
  2319
    _DBG_FILE("CGlobalWLANAdapter::StoreCommsDBParams(): end");
hgs
parents:
diff changeset
  2320
    User::LeaveIfError( usrTable->PutRecordChanges() ); // End and save changes.
hgs
parents:
diff changeset
  2321
    CleanupStack::PopAndDestroy( usrTable );
hgs
parents:
diff changeset
  2322
    CleanupStack::PopAndDestroy( db );
hgs
parents:
diff changeset
  2323
    return;
hgs
parents:
diff changeset
  2324
    
hgs
parents:
diff changeset
  2325
	}
hgs
parents:
diff changeset
  2326
			
hgs
parents:
diff changeset
  2327
hgs
parents:
diff changeset
  2328
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2329
// void CGlobalWLANAdapter::ReadCenRepParams( )
hgs
parents:
diff changeset
  2330
// Reads parameters from central repository
hgs
parents:
diff changeset
  2331
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2332
void CGlobalWLANAdapter::ReadCenRepParamsL()
hgs
parents:
diff changeset
  2333
	{
hgs
parents:
diff changeset
  2334
		
hgs
parents:
diff changeset
  2335
	_DBG_FILE("CGlobalWLANAdapter::ReadCenRepParams(): begin");
hgs
parents:
diff changeset
  2336
	
hgs
parents:
diff changeset
  2337
	TInt err = KErrNone;
hgs
parents:
diff changeset
  2338
    CRepository* repository = NULL;
hgs
parents:
diff changeset
  2339
    TBuf8<KInputMaxLength> value;
hgs
parents:
diff changeset
  2340
    TBuf8<KTypeMaxLength> type;
hgs
parents:
diff changeset
  2341
    TInt temp = 0;
hgs
parents:
diff changeset
  2342
     
hgs
parents:
diff changeset
  2343
    // InternetConnectivityTest parameter is in a different cenRep than the other parameters
hgs
parents:
diff changeset
  2344
    // Write KWlanScanRate
hgs
parents:
diff changeset
  2345
    if ( iReadSettings->internetConnectivityTestPresent )
hgs
parents:
diff changeset
  2346
    	{
hgs
parents:
diff changeset
  2347
    	// This parameter is in the internet connectivity settings cenRep, open the repository
hgs
parents:
diff changeset
  2348
        repository = CRepository::NewL( KCRUidInternetConnectivitySettings );
hgs
parents:
diff changeset
  2349
        CleanupStack::PushL(repository);
hgs
parents:
diff changeset
  2350
      
hgs
parents:
diff changeset
  2351
    	value.Zero();
hgs
parents:
diff changeset
  2352
    	type.Zero();
hgs
parents:
diff changeset
  2353
    	
hgs
parents:
diff changeset
  2354
    	// if opening the cenrtral repository failed, then leave this function
hgs
parents:
diff changeset
  2355
    	if ( repository == NULL )
hgs
parents:
diff changeset
  2356
    		{
hgs
parents:
diff changeset
  2357
    		User::LeaveIfError( KErrGeneral );
hgs
parents:
diff changeset
  2358
    		}
hgs
parents:
diff changeset
  2359
    	
hgs
parents:
diff changeset
  2360
    	err = repository->Get( KIctsTestPermission, temp );    	
hgs
parents:
diff changeset
  2361
       	value.Num(temp);
hgs
parents:
diff changeset
  2362
       	type.Append( KNSmlWLanInternetConnectivityTest );
hgs
parents:
diff changeset
  2363
       	UpdateStatusAndResultL( iReadStatuses->internetConnectivityTestResult, iReadStatuses->internetConnectivityTestStatus, 
hgs
parents:
diff changeset
  2364
       					value, type, err  );
hgs
parents:
diff changeset
  2365
       	
hgs
parents:
diff changeset
  2366
       	CleanupStack::PopAndDestroy(repository);
hgs
parents:
diff changeset
  2367
    	}
hgs
parents:
diff changeset
  2368
    
hgs
parents:
diff changeset
  2369
    // The rest of the parameters are in WlanDeviceSettings cenRep
hgs
parents:
diff changeset
  2370
    repository = CRepository::NewL( KCRUidWlanDeviceSettingsRegistryId );
hgs
parents:
diff changeset
  2371
    CleanupStack::PushL(repository);
hgs
parents:
diff changeset
  2372
    
hgs
parents:
diff changeset
  2373
    // if opening the cenrtral repository failed, then leave this function
hgs
parents:
diff changeset
  2374
	if ( repository == NULL )
hgs
parents:
diff changeset
  2375
		{
hgs
parents:
diff changeset
  2376
		User::LeaveIfError( KErrGeneral );
hgs
parents:
diff changeset
  2377
		}
hgs
parents:
diff changeset
  2378
    
hgs
parents:
diff changeset
  2379
    if ( iReadSettings->MTUPresent )
hgs
parents:
diff changeset
  2380
    	{
hgs
parents:
diff changeset
  2381
    	value.Zero();
hgs
parents:
diff changeset
  2382
    	type.Zero();
hgs
parents:
diff changeset
  2383
    	err = repository->Get( KWlanMTU, temp );
hgs
parents:
diff changeset
  2384
       	value.Num(temp);
hgs
parents:
diff changeset
  2385
       	type.Append( KNSmlWLanMTU );
hgs
parents:
diff changeset
  2386
       	UpdateStatusAndResultL( iReadStatuses->MTUResult, iReadStatuses->MTUStatus, 
hgs
parents:
diff changeset
  2387
       					value, type, err  );
hgs
parents:
diff changeset
  2388
    	}
hgs
parents:
diff changeset
  2389
    
hgs
parents:
diff changeset
  2390
    // Write KWlanScanRate
hgs
parents:
diff changeset
  2391
    if ( iReadSettings->scanRatePresent )
hgs
parents:
diff changeset
  2392
    	{
hgs
parents:
diff changeset
  2393
    	value.Zero();
hgs
parents:
diff changeset
  2394
    	type.Zero();
hgs
parents:
diff changeset
  2395
    	err = repository->Get( KWlanScanRate, temp );
hgs
parents:
diff changeset
  2396
       	value.Num(temp);
hgs
parents:
diff changeset
  2397
       	type.Append( KNSmlWLanScanRate );
hgs
parents:
diff changeset
  2398
       	UpdateStatusAndResultL( iReadStatuses->scanRateResult, iReadStatuses->scanRateStatus, 
hgs
parents:
diff changeset
  2399
       					value, type, err  );
hgs
parents:
diff changeset
  2400
    	}
hgs
parents:
diff changeset
  2401
hgs
parents:
diff changeset
  2402
    // Write KWlanRcpiTrigger
hgs
parents:
diff changeset
  2403
   	if ( iReadSettings->RCPITriggerPresent )
hgs
parents:
diff changeset
  2404
    	{
hgs
parents:
diff changeset
  2405
    	value.Zero();
hgs
parents:
diff changeset
  2406
    	type.Zero();
hgs
parents:
diff changeset
  2407
    	err = repository->Get( KWlanRcpiTrigger, temp );
hgs
parents:
diff changeset
  2408
       	value.Num(temp);
hgs
parents:
diff changeset
  2409
       	type.Append( KNSmlWLanRCPITrigger );
hgs
parents:
diff changeset
  2410
       	UpdateStatusAndResultL( iReadStatuses->RCPITriggerResult, iReadStatuses->RCPITriggerStatus, 
hgs
parents:
diff changeset
  2411
       					value, type, err  );
hgs
parents:
diff changeset
  2412
       	}
hgs
parents:
diff changeset
  2413
hgs
parents:
diff changeset
  2414
    // Write KWlanMinActiveChannelTime
hgs
parents:
diff changeset
  2415
    if ( iReadSettings->minActiveChannelTimePresent )
hgs
parents:
diff changeset
  2416
   	 	{
hgs
parents:
diff changeset
  2417
   	 	value.Zero();
hgs
parents:
diff changeset
  2418
   	 	type.Zero();
hgs
parents:
diff changeset
  2419
   	 	err = repository->Get( KWlanMinActiveChannelTime, temp );
hgs
parents:
diff changeset
  2420
       	value.Num(temp);
hgs
parents:
diff changeset
  2421
       	type.Append( KNSmlWLanMinActiveChannelTime );
hgs
parents:
diff changeset
  2422
       	UpdateStatusAndResultL( iReadStatuses->minActiveChannelTimeResult, iReadStatuses->minActiveChannelTimeStatus, 
hgs
parents:
diff changeset
  2423
       					value, type, err  );
hgs
parents:
diff changeset
  2424
       	}
hgs
parents:
diff changeset
  2425
       	
hgs
parents:
diff changeset
  2426
    // Write KWlanMaxActiveChannelTime
hgs
parents:
diff changeset
  2427
    if ( iReadSettings->maxActiveChannelTimePresent )
hgs
parents:
diff changeset
  2428
   	 	{
hgs
parents:
diff changeset
  2429
   	 	value.Zero();
hgs
parents:
diff changeset
  2430
   	 	type.Zero();
hgs
parents:
diff changeset
  2431
   	 	err = repository->Get( KWlanMaxActiveChannelTime, temp );
hgs
parents:
diff changeset
  2432
		value.Num(temp);
hgs
parents:
diff changeset
  2433
		type.Append( KNSmlWLanMaxActiveChannelTime );
hgs
parents:
diff changeset
  2434
       	UpdateStatusAndResultL( iReadStatuses->maxActiveChannelTimeResult, iReadStatuses->maxActiveChannelTimeStatus, 
hgs
parents:
diff changeset
  2435
       					value, type, err  );
hgs
parents:
diff changeset
  2436
       	}
hgs
parents:
diff changeset
  2437
hgs
parents:
diff changeset
  2438
    // Write KWlanMaxTxMSDULifeTime
hgs
parents:
diff changeset
  2439
    if ( iReadSettings->maxTxMSDULifeTimePresent )
hgs
parents:
diff changeset
  2440
   	 	{
hgs
parents:
diff changeset
  2441
   	 	value.Zero();
hgs
parents:
diff changeset
  2442
   	 	type.Zero();
hgs
parents:
diff changeset
  2443
   	 	err = repository->Get( KWlanMaxTxMSDULifeTime, temp );
hgs
parents:
diff changeset
  2444
		value.Num(temp);
hgs
parents:
diff changeset
  2445
		type.Append( KNSmlWLanMaxTxMSDULifeTime );
hgs
parents:
diff changeset
  2446
       	UpdateStatusAndResultL( iReadStatuses->maxTxMSDULifeTimeResult, iReadStatuses->maxTxMSDULifeTimeStatus, 
hgs
parents:
diff changeset
  2447
       					value, type, err  );
hgs
parents:
diff changeset
  2448
       	}
hgs
parents:
diff changeset
  2449
hgs
parents:
diff changeset
  2450
    // Write KWlanScanExpirationTimer
hgs
parents:
diff changeset
  2451
    if ( iReadSettings->scanExpirationTimerPresent )
hgs
parents:
diff changeset
  2452
   	 	{
hgs
parents:
diff changeset
  2453
   	 	value.Zero();
hgs
parents:
diff changeset
  2454
   	 	type.Zero();
hgs
parents:
diff changeset
  2455
   	 	err = repository->Get( KWlanScanExpirationTimer, temp );
hgs
parents:
diff changeset
  2456
		value.Num(temp);
hgs
parents:
diff changeset
  2457
		type.Append( KNSmlWLanScanExpirationTimer );
hgs
parents:
diff changeset
  2458
       	UpdateStatusAndResultL( iReadStatuses->scanExpirationTimerResult, iReadStatuses->scanExpirationTimerStatus, 
hgs
parents:
diff changeset
  2459
       					value, type, err  );
hgs
parents:
diff changeset
  2460
       	}
hgs
parents:
diff changeset
  2461
				
hgs
parents:
diff changeset
  2462
    // Write KWlanUnloadDriverTimer
hgs
parents:
diff changeset
  2463
    if ( iReadSettings->unloadDriverTimerPresent )
hgs
parents:
diff changeset
  2464
   	 	{
hgs
parents:
diff changeset
  2465
   	 	value.Zero();
hgs
parents:
diff changeset
  2466
   	 	type.Zero();
hgs
parents:
diff changeset
  2467
   	 	err = repository->Get( KWlanUnloadDriverTimer, temp );
hgs
parents:
diff changeset
  2468
		value.Num(temp);
hgs
parents:
diff changeset
  2469
		type.Append( KNSmlWLanUnloadDriverTimer );
hgs
parents:
diff changeset
  2470
       	UpdateStatusAndResultL( iReadStatuses->unloadDriverTimerResult, iReadStatuses->unloadDriverTimerStatus, 
hgs
parents:
diff changeset
  2471
       					value, type, err  );
hgs
parents:
diff changeset
  2472
       	}
hgs
parents:
diff changeset
  2473
hgs
parents:
diff changeset
  2474
    // Write KWlanRoamTimer
hgs
parents:
diff changeset
  2475
    if ( iReadSettings->roamTimerPresent )
hgs
parents:
diff changeset
  2476
    	{
hgs
parents:
diff changeset
  2477
    	value.Zero();
hgs
parents:
diff changeset
  2478
		type.Zero();
hgs
parents:
diff changeset
  2479
    	err = repository->Get( KWlanRoamTimer, temp );
hgs
parents:
diff changeset
  2480
    	value.Num(temp);
hgs
parents:
diff changeset
  2481
		type.Append( KNSmlWLanRoamTimer );
hgs
parents:
diff changeset
  2482
       	UpdateStatusAndResultL( iReadStatuses->roamTimerResult, iReadStatuses->roamTimerStatus, 
hgs
parents:
diff changeset
  2483
       					value, type, err  );
hgs
parents:
diff changeset
  2484
       	}
hgs
parents:
diff changeset
  2485
hgs
parents:
diff changeset
  2486
    // Write KWlanRcpiDifference
hgs
parents:
diff changeset
  2487
    if ( iReadSettings->RCPIDifferencePresent )
hgs
parents:
diff changeset
  2488
    	{
hgs
parents:
diff changeset
  2489
    	value.Zero();
hgs
parents:
diff changeset
  2490
    	type.Zero();
hgs
parents:
diff changeset
  2491
    	type.Append( KNSmlWLanRCPIDifference );
hgs
parents:
diff changeset
  2492
    	err = repository->Get( KWlanRcpiDifference, temp );
hgs
parents:
diff changeset
  2493
		value.Num(temp); 	
hgs
parents:
diff changeset
  2494
       	UpdateStatusAndResultL( iReadStatuses->RCPIDifferenceResult, iReadStatuses->RCPIDifferenceStatus, 
hgs
parents:
diff changeset
  2495
       					value, type, err  );
hgs
parents:
diff changeset
  2496
       	}
hgs
parents:
diff changeset
  2497
hgs
parents:
diff changeset
  2498
    // Write KWlanConnRegainTimer
hgs
parents:
diff changeset
  2499
    if ( iReadSettings->connRegainTimerPresent )
hgs
parents:
diff changeset
  2500
    	{
hgs
parents:
diff changeset
  2501
    	value.Zero();
hgs
parents:
diff changeset
  2502
    	type.Zero();
hgs
parents:
diff changeset
  2503
    	type.Append( KNSmlWLanConnRegainTimer );
hgs
parents:
diff changeset
  2504
    	err = repository->Get( KWlanConnRegainTimer, temp );
hgs
parents:
diff changeset
  2505
		value.Num(temp);
hgs
parents:
diff changeset
  2506
       	UpdateStatusAndResultL( iReadStatuses->connRegainTimerResult, iReadStatuses->connRegainTimerStatus, 
hgs
parents:
diff changeset
  2507
       					value, type, err  );
hgs
parents:
diff changeset
  2508
       	}
hgs
parents:
diff changeset
  2509
				
hgs
parents:
diff changeset
  2510
    // Write KWlanMaxTriesToFindNw
hgs
parents:
diff changeset
  2511
   	if ( iReadSettings->maxTriesToFindNwPresent )
hgs
parents:
diff changeset
  2512
    	{
hgs
parents:
diff changeset
  2513
    	value.Zero();
hgs
parents:
diff changeset
  2514
    	type.Zero();
hgs
parents:
diff changeset
  2515
    	err = repository->Get( KWlanMaxTriesToFindNw, temp );
hgs
parents:
diff changeset
  2516
		value.Num(temp);
hgs
parents:
diff changeset
  2517
		type.Append( KNSmlWLanMaxTriesToFindNw );
hgs
parents:
diff changeset
  2518
       	UpdateStatusAndResultL( iReadStatuses->maxTriesToFindNwResult, iReadStatuses->maxTriesToFindNwStatus, 
hgs
parents:
diff changeset
  2519
       					value, type, err  );
hgs
parents:
diff changeset
  2520
       	}
hgs
parents:
diff changeset
  2521
hgs
parents:
diff changeset
  2522
    // Write KWlanDelayBetweenFindNw
hgs
parents:
diff changeset
  2523
    if ( iReadSettings->delayBetweenFindNwPresent )
hgs
parents:
diff changeset
  2524
    	{
hgs
parents:
diff changeset
  2525
    	value.Zero();
hgs
parents:
diff changeset
  2526
    	type.Zero();
hgs
parents:
diff changeset
  2527
    	err = repository->Get( KWlanDelayBetweenFindNw, temp );
hgs
parents:
diff changeset
  2528
		value.Num(temp);
hgs
parents:
diff changeset
  2529
		type.Append( KNSmlWLanDelayBetweenFindNw );
hgs
parents:
diff changeset
  2530
       	UpdateStatusAndResultL( iReadStatuses->delayBetweenFindNwResult, iReadStatuses->delayBetweenFindNwStatus, 
hgs
parents:
diff changeset
  2531
       					value, type, err  );
hgs
parents:
diff changeset
  2532
       	}
hgs
parents:
diff changeset
  2533
				
hgs
parents:
diff changeset
  2534
    // Write KWlanMinPassiveChannelTime
hgs
parents:
diff changeset
  2535
    if ( iReadSettings->minPassiveChannelTimePresent )
hgs
parents:
diff changeset
  2536
    	{
hgs
parents:
diff changeset
  2537
    	value.Zero();
hgs
parents:
diff changeset
  2538
    	type.Zero();
hgs
parents:
diff changeset
  2539
    	err = repository->Get( KWlanMinPassiveChannelTime, temp );
hgs
parents:
diff changeset
  2540
		value.Num(temp);
hgs
parents:
diff changeset
  2541
		type.Append( KNSmlWLanRCPITrigger );
hgs
parents:
diff changeset
  2542
       	UpdateStatusAndResultL( iReadStatuses->minPassiveChannelTimeResult, iReadStatuses->minPassiveChannelTimeStatus, 
hgs
parents:
diff changeset
  2543
       					value, type, err  );
hgs
parents:
diff changeset
  2544
       	}
hgs
parents:
diff changeset
  2545
hgs
parents:
diff changeset
  2546
    // Write KWlanMaxPassiveChannelTime
hgs
parents:
diff changeset
  2547
    if ( iReadSettings->maxPassiveChannelTimePresent )
hgs
parents:
diff changeset
  2548
    	{
hgs
parents:
diff changeset
  2549
    	value.Zero();
hgs
parents:
diff changeset
  2550
    	type.Zero();
hgs
parents:
diff changeset
  2551
    	err = repository->Get( KWlanMaxPassiveChannelTime, temp );
hgs
parents:
diff changeset
  2552
		value.Num(temp);
hgs
parents:
diff changeset
  2553
		type.Append( KNSmlWLanMinPassiveChannelTime );
hgs
parents:
diff changeset
  2554
       	UpdateStatusAndResultL( iReadStatuses->maxPassiveChannelTimeResult, iReadStatuses->maxPassiveChannelTimeStatus, 
hgs
parents:
diff changeset
  2555
       					value, type, err  );
hgs
parents:
diff changeset
  2556
       	}
hgs
parents:
diff changeset
  2557
       			
hgs
parents:
diff changeset
  2558
    // Write KWlanMaxApFailureCount
hgs
parents:
diff changeset
  2559
    if ( iReadSettings->maxApFailureCountPresent )
hgs
parents:
diff changeset
  2560
    	{
hgs
parents:
diff changeset
  2561
    	value.Zero();
hgs
parents:
diff changeset
  2562
    	type.Zero();
hgs
parents:
diff changeset
  2563
    	err = repository->Get( KWlanMaxApFailureCount, temp );
hgs
parents:
diff changeset
  2564
		value.Num(temp);
hgs
parents:
diff changeset
  2565
		type.Append( KNSmlWLanMaxApFailureCount );
hgs
parents:
diff changeset
  2566
       	UpdateStatusAndResultL( iReadStatuses->maxApFailureCountResult, iReadStatuses->maxApFailureCountStatus, 
hgs
parents:
diff changeset
  2567
       					value, type, err  );
hgs
parents:
diff changeset
  2568
       	}
hgs
parents:
diff changeset
  2569
hgs
parents:
diff changeset
  2570
    // Write KWlanLongBeaconFindCount
hgs
parents:
diff changeset
  2571
    if ( iReadSettings->longBeaconFindCountPresent )
hgs
parents:
diff changeset
  2572
    	{
hgs
parents:
diff changeset
  2573
    	value.Zero();
hgs
parents:
diff changeset
  2574
    	type.Zero();
hgs
parents:
diff changeset
  2575
    	err = repository->Get( KWlanLongBeaconFindCount, temp );
hgs
parents:
diff changeset
  2576
		value.Num(temp);
hgs
parents:
diff changeset
  2577
		type.Append( KNSmlWLanLongBeaconFindCount );
hgs
parents:
diff changeset
  2578
       	UpdateStatusAndResultL( iReadStatuses->longBeaconFindCountResult, iReadStatuses->longBeaconFindCountStatus, 
hgs
parents:
diff changeset
  2579
       					value, type, err  );
hgs
parents:
diff changeset
  2580
       	}
hgs
parents:
diff changeset
  2581
				
hgs
parents:
diff changeset
  2582
    // Write KWlanQosNullFrameInterval
hgs
parents:
diff changeset
  2583
    if ( iReadSettings->qosNullFrameIntervalPresent )
hgs
parents:
diff changeset
  2584
    	{
hgs
parents:
diff changeset
  2585
    	value.Zero();
hgs
parents:
diff changeset
  2586
    	type.Zero();
hgs
parents:
diff changeset
  2587
    	err = repository->Get( KWlanQosNullFrameInterval, temp );
hgs
parents:
diff changeset
  2588
		value.Num(temp);
hgs
parents:
diff changeset
  2589
		type.Append( KNSmlWLanQosNullFrameInterval );
hgs
parents:
diff changeset
  2590
       	UpdateStatusAndResultL( iReadStatuses->qosNullFrameIntervalResult, iReadStatuses->qosNullFrameIntervalStatus, 
hgs
parents:
diff changeset
  2591
       					value, type, err  );
hgs
parents:
diff changeset
  2592
       	}
hgs
parents:
diff changeset
  2593
hgs
parents:
diff changeset
  2594
    // Write KWlanQosNullFrameTimeout
hgs
parents:
diff changeset
  2595
    if ( iReadSettings->qosNullFrameTimeoutPresent )
hgs
parents:
diff changeset
  2596
    	{
hgs
parents:
diff changeset
  2597
    	value.Zero();
hgs
parents:
diff changeset
  2598
    	type.Zero();
hgs
parents:
diff changeset
  2599
    	err = repository->Get( KWlanQosNullFrameTimeout, temp );
hgs
parents:
diff changeset
  2600
		value.Num(temp);
hgs
parents:
diff changeset
  2601
		type.Append( KNSmlWLanQosNullFrameTimeout );
hgs
parents:
diff changeset
  2602
       	UpdateStatusAndResultL( iReadStatuses->qosNullFrameTimeoutResult, iReadStatuses->qosNullFrameTimeoutStatus, 
hgs
parents:
diff changeset
  2603
       					value, type, err  );
hgs
parents:
diff changeset
  2604
       	}
hgs
parents:
diff changeset
  2605
hgs
parents:
diff changeset
  2606
    // Cleanup
hgs
parents:
diff changeset
  2607
    CleanupStack::PopAndDestroy(repository);
hgs
parents:
diff changeset
  2608
    _DBG_FILE("CGlobalWLANAdapter::ReadCenRepParams(): end"); 
hgs
parents:
diff changeset
  2609
    return;
hgs
parents:
diff changeset
  2610
	
hgs
parents:
diff changeset
  2611
	}
hgs
parents:
diff changeset
  2612
hgs
parents:
diff changeset
  2613
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2614
// void CGlobalWLANAdapter::UpdateStatusAndResultL( )
hgs
parents:
diff changeset
  2615
// Reads parameters from cenrep and updates result/status
hgs
parents:
diff changeset
  2616
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2617
void CGlobalWLANAdapter::UpdateStatusAndResultL( TInt aResult, TInt aStatus, TDesC8& aValue, TDesC8& aType, TInt aStoreErr )
hgs
parents:
diff changeset
  2618
	{
hgs
parents:
diff changeset
  2619
	
hgs
parents:
diff changeset
  2620
	_DBG_FILE("CGlobalWLANAdapter::UpdateStatusAndResultL(): begin");
hgs
parents:
diff changeset
  2621
hgs
parents:
diff changeset
  2622
	CBufBase *lObject = CBufFlat::NewL(KInputMaxLength);
hgs
parents:
diff changeset
  2623
    CleanupStack::PushL(lObject);
hgs
parents:
diff changeset
  2624
hgs
parents:
diff changeset
  2625
    // If reading went ok, then we can set the results and statuses
hgs
parents:
diff changeset
  2626
    if ( aStoreErr == KErrNone )
hgs
parents:
diff changeset
  2627
    	{
hgs
parents:
diff changeset
  2628
    	lObject->InsertL(0, aValue);
hgs
parents:
diff changeset
  2629
    	iCallBack->SetResultsL( aResult,*lObject,aType );
hgs
parents:
diff changeset
  2630
    	iCallBack->SetStatusL( aStatus, CSmlDmAdapter::EOk);
hgs
parents:
diff changeset
  2631
    	}
hgs
parents:
diff changeset
  2632
    else
hgs
parents:
diff changeset
  2633
    	{
hgs
parents:
diff changeset
  2634
    	iCallBack->SetStatusL( aStatus, CSmlDmAdapter::EError );
hgs
parents:
diff changeset
  2635
    	}
hgs
parents:
diff changeset
  2636
    
hgs
parents:
diff changeset
  2637
    _DBG_FILE("CGlobalWLANAdapter::UpdateStatusAndResultL(): end");
hgs
parents:
diff changeset
  2638
    CleanupStack::PopAndDestroy(lObject);
hgs
parents:
diff changeset
  2639
    return;
hgs
parents:
diff changeset
  2640
   	}
hgs
parents:
diff changeset
  2641
hgs
parents:
diff changeset
  2642
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2643
// void CGlobalWLANAdapter::ReadCommsDBParams( )
hgs
parents:
diff changeset
  2644
// Reads parameters from commsDB
hgs
parents:
diff changeset
  2645
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2646
void CGlobalWLANAdapter::ReadCommsDBParamsL()
hgs
parents:
diff changeset
  2647
	{
hgs
parents:
diff changeset
  2648
	_DBG_FILE("CGlobalWLANAdapter::ReadCommsDBParams() begin" );  
hgs
parents:
diff changeset
  2649
   
hgs
parents:
diff changeset
  2650
  	CCommsDatabase* db = CCommsDatabase::NewL();
hgs
parents:
diff changeset
  2651
  	CleanupStack::PushL(db);
hgs
parents:
diff changeset
  2652
			
hgs
parents:
diff changeset
  2653
	// User defined WLAN device settings table from Comms database
hgs
parents:
diff changeset
  2654
    CCommsDbTableView* usrTable;
hgs
parents:
diff changeset
  2655
    
hgs
parents:
diff changeset
  2656
    // Open user settings.
hgs
parents:
diff changeset
  2657
    usrTable = db->OpenViewMatchingUintLC( TPtrC(WLAN_DEVICE_SETTINGS),
hgs
parents:
diff changeset
  2658
    										TPtrC(WLAN_DEVICE_SETTINGS_TYPE),
hgs
parents:
diff changeset
  2659
    										KWlanUserSettings );
hgs
parents:
diff changeset
  2660
hgs
parents:
diff changeset
  2661
    TUint32 intVal;
hgs
parents:
diff changeset
  2662
    TBool boolVal = EFalse;
hgs
parents:
diff changeset
  2663
    TBuf8<KInputMaxLength> value;
hgs
parents:
diff changeset
  2664
    TBuf8<KTypeMaxLength> type;
hgs
parents:
diff changeset
  2665
    TInt err = KErrNone;
hgs
parents:
diff changeset
  2666
    TInt readErr = KErrNone;
hgs
parents:
diff changeset
  2667
    _LIT8(KTrue,"True");
hgs
parents:
diff changeset
  2668
    _LIT8(KFalse,"False");
hgs
parents:
diff changeset
  2669
		
hgs
parents:
diff changeset
  2670
	// if record did not exist, then we don't do anything
hgs
parents:
diff changeset
  2671
    if ( usrTable == NULL )
hgs
parents:
diff changeset
  2672
    	readErr = KErrGeneral;
hgs
parents:
diff changeset
  2673
   	else
hgs
parents:
diff changeset
  2674
   		readErr = usrTable->GotoFirstRecord();
hgs
parents:
diff changeset
  2675
hgs
parents:
diff changeset
  2676
    // Check whether parameter was requested to be fetched
hgs
parents:
diff changeset
  2677
   	if ( iReadSettings->backgroundScanIntervalPresent )
hgs
parents:
diff changeset
  2678
   		{
hgs
parents:
diff changeset
  2679
   		// The reading is done if the commdb record was opened successfully, otherwise the err
hgs
parents:
diff changeset
  2680
   		// is updated so that the ReadAndSetStatus function can update thet status correctly
hgs
parents:
diff changeset
  2681
   		if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2682
   			{
hgs
parents:
diff changeset
  2683
    		TRAP( err, usrTable->ReadUintL( TPtrC(WLAN_BG_SCAN_INTERVAL), intVal ));
hgs
parents:
diff changeset
  2684
   			}
hgs
parents:
diff changeset
  2685
    	else
hgs
parents:
diff changeset
  2686
    		{
hgs
parents:
diff changeset
  2687
            err=readErr;
hgs
parents:
diff changeset
  2688
    		}
hgs
parents:
diff changeset
  2689
   		
hgs
parents:
diff changeset
  2690
   		value.Zero();
hgs
parents:
diff changeset
  2691
   		type.Zero();
hgs
parents:
diff changeset
  2692
    	value.Num(intVal); 
hgs
parents:
diff changeset
  2693
    	type.Append( KNSmlWLanBackgroundScanInterval );
hgs
parents:
diff changeset
  2694
    	UpdateStatusAndResultL( iReadStatuses->backgroundScanIntervalResult, iReadStatuses->backgroundScanIntervalStatus, 
hgs
parents:
diff changeset
  2695
       					value, type, err );
hgs
parents:
diff changeset
  2696
   		}
hgs
parents:
diff changeset
  2697
 
hgs
parents:
diff changeset
  2698
    if ( iReadSettings->useDefaultSettingsPresent )
hgs
parents:
diff changeset
  2699
    	{
hgs
parents:
diff changeset
  2700
   		if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2701
   			{
hgs
parents:
diff changeset
  2702
    		TRAP( err, usrTable->ReadBoolL( TPtrC(WLAN_USE_DEFAULT_SETTINGS), boolVal ));
hgs
parents:
diff changeset
  2703
   			}
hgs
parents:
diff changeset
  2704
    	else
hgs
parents:
diff changeset
  2705
    		{
hgs
parents:
diff changeset
  2706
            err=readErr;
hgs
parents:
diff changeset
  2707
    		}
hgs
parents:
diff changeset
  2708
    	
hgs
parents:
diff changeset
  2709
		value.Zero();
hgs
parents:
diff changeset
  2710
		type.Zero();
hgs
parents:
diff changeset
  2711
    	if ( boolVal == 0 )
hgs
parents:
diff changeset
  2712
    		value.Copy(KFalse);
hgs
parents:
diff changeset
  2713
    	else
hgs
parents:
diff changeset
  2714
    		value.Copy(KTrue);
hgs
parents:
diff changeset
  2715
    	
hgs
parents:
diff changeset
  2716
    	type.Append( KNSmlWLanUseDefaultSettings );
hgs
parents:
diff changeset
  2717
    	_DBG_FILE("CGlobalWLANAdapter::ReadCommsDBParams() go set status" );
hgs
parents:
diff changeset
  2718
    	UpdateStatusAndResultL( iReadStatuses->useDefaultSettingsResult, iReadStatuses->useDefaultSettingsStatus, 
hgs
parents:
diff changeset
  2719
       					value, type, err );
hgs
parents:
diff changeset
  2720
    	}
hgs
parents:
diff changeset
  2721
    
hgs
parents:
diff changeset
  2722
    if ( iReadSettings->longRetryLimitPresent )
hgs
parents:
diff changeset
  2723
    	{
hgs
parents:
diff changeset
  2724
    	if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2725
    		{
hgs
parents:
diff changeset
  2726
    		TRAP( err, usrTable->ReadUintL( TPtrC(WLAN_LONG_RETRY), intVal ));
hgs
parents:
diff changeset
  2727
    		}
hgs
parents:
diff changeset
  2728
   		else
hgs
parents:
diff changeset
  2729
   			{
hgs
parents:
diff changeset
  2730
   			err = readErr;
hgs
parents:
diff changeset
  2731
   			}
hgs
parents:
diff changeset
  2732
    	
hgs
parents:
diff changeset
  2733
    	value.Zero();
hgs
parents:
diff changeset
  2734
    	value.Num(intVal);
hgs
parents:
diff changeset
  2735
    	type.Zero();
hgs
parents:
diff changeset
  2736
    	type.Append( KNSmlWLanLongRetryLimit );
hgs
parents:
diff changeset
  2737
    	UpdateStatusAndResultL( iReadStatuses->longRetryLimitResult, iReadStatuses->longRetryLimitStatus, 
hgs
parents:
diff changeset
  2738
       					value, type, err );
hgs
parents:
diff changeset
  2739
    	}
hgs
parents:
diff changeset
  2740
    
hgs
parents:
diff changeset
  2741
    if ( iReadSettings->shortRetryLimitPresent )
hgs
parents:
diff changeset
  2742
    	{
hgs
parents:
diff changeset
  2743
    	if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2744
    		{
hgs
parents:
diff changeset
  2745
    		TRAP( err, usrTable->ReadUintL( TPtrC(WLAN_SHORT_RETRY), intVal ));
hgs
parents:
diff changeset
  2746
    		}
hgs
parents:
diff changeset
  2747
   		else
hgs
parents:
diff changeset
  2748
   			{
hgs
parents:
diff changeset
  2749
   			err = readErr;
hgs
parents:
diff changeset
  2750
   			}
hgs
parents:
diff changeset
  2751
    	
hgs
parents:
diff changeset
  2752
    	value.Zero();
hgs
parents:
diff changeset
  2753
    	type.Zero();
hgs
parents:
diff changeset
  2754
    	value.Num(intVal);
hgs
parents:
diff changeset
  2755
    	type.Append( KNSmlWLanShortRetryLimit );
hgs
parents:
diff changeset
  2756
    	UpdateStatusAndResultL( iReadStatuses->shortRetryLimitResult, iReadStatuses->shortRetryLimitStatus, 
hgs
parents:
diff changeset
  2757
       					value, type, err );
hgs
parents:
diff changeset
  2758
    	}
hgs
parents:
diff changeset
  2759
    	
hgs
parents:
diff changeset
  2760
    if ( iReadSettings->RTSThresholdPresent )
hgs
parents:
diff changeset
  2761
    	{
hgs
parents:
diff changeset
  2762
    	if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2763
    		{
hgs
parents:
diff changeset
  2764
    		TRAP( err, usrTable->ReadUintL( TPtrC(WLAN_RTS_THRESHOLD), intVal ));
hgs
parents:
diff changeset
  2765
    		}
hgs
parents:
diff changeset
  2766
   		else
hgs
parents:
diff changeset
  2767
   			{
hgs
parents:
diff changeset
  2768
   			err = readErr;
hgs
parents:
diff changeset
  2769
   			}
hgs
parents:
diff changeset
  2770
    	
hgs
parents:
diff changeset
  2771
    	value.Zero();
hgs
parents:
diff changeset
  2772
    	type.Zero();
hgs
parents:
diff changeset
  2773
    	value.Num(intVal);
hgs
parents:
diff changeset
  2774
    	type.Append( KNSmlWLanRTSThreshold );
hgs
parents:
diff changeset
  2775
    	UpdateStatusAndResultL( iReadStatuses->RTSThresholdResult, iReadStatuses->RTSThresholdStatus, 
hgs
parents:
diff changeset
  2776
       					value, type, err );
hgs
parents:
diff changeset
  2777
    	}
hgs
parents:
diff changeset
  2778
    
hgs
parents:
diff changeset
  2779
    if ( iReadSettings->TXPowerLevelPresent )
hgs
parents:
diff changeset
  2780
    	{
hgs
parents:
diff changeset
  2781
		if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2782
			{
hgs
parents:
diff changeset
  2783
    		TRAP( err, usrTable->ReadUintL( TPtrC(NU_WLAN_TX_POWER_LEVEL), intVal ));
hgs
parents:
diff changeset
  2784
			}
hgs
parents:
diff changeset
  2785
   		else
hgs
parents:
diff changeset
  2786
   			{
hgs
parents:
diff changeset
  2787
   			err = readErr;
hgs
parents:
diff changeset
  2788
   			}
hgs
parents:
diff changeset
  2789
		
hgs
parents:
diff changeset
  2790
		value.Zero();
hgs
parents:
diff changeset
  2791
		type.Zero();
hgs
parents:
diff changeset
  2792
    	value.Num(intVal);
hgs
parents:
diff changeset
  2793
    	type.Append( KNSmlWLanTXPowerLevel );
hgs
parents:
diff changeset
  2794
    	UpdateStatusAndResultL( iReadStatuses->TXPowerLevelResult, iReadStatuses->TXPowerLevelStatus, 
hgs
parents:
diff changeset
  2795
       					value, type, err );
hgs
parents:
diff changeset
  2796
    	}
hgs
parents:
diff changeset
  2797
    
hgs
parents:
diff changeset
  2798
    if ( iReadSettings->allowRadioMeasurementsPresent )
hgs
parents:
diff changeset
  2799
    	{
hgs
parents:
diff changeset
  2800
		if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2801
			{
hgs
parents:
diff changeset
  2802
    		TRAP( err, usrTable->ReadBoolL( TPtrC(WLAN_ALLOW_RADIO_MEASUREMENTS), boolVal ));
hgs
parents:
diff changeset
  2803
			}
hgs
parents:
diff changeset
  2804
   		else
hgs
parents:
diff changeset
  2805
   			{
hgs
parents:
diff changeset
  2806
   			err = readErr;
hgs
parents:
diff changeset
  2807
   			}
hgs
parents:
diff changeset
  2808
		
hgs
parents:
diff changeset
  2809
		value.Zero();
hgs
parents:
diff changeset
  2810
		type.Zero();
hgs
parents:
diff changeset
  2811
    	if ( boolVal )
hgs
parents:
diff changeset
  2812
    		value.Copy(_L8("True"));
hgs
parents:
diff changeset
  2813
    	else
hgs
parents:
diff changeset
  2814
    		value.Copy(_L8("False"));
hgs
parents:
diff changeset
  2815
    	
hgs
parents:
diff changeset
  2816
    	type.Append( KNSmlWLanAllowRadioMeasurements );
hgs
parents:
diff changeset
  2817
    	UpdateStatusAndResultL( iReadStatuses->allowRadioMeasurementsResult, iReadStatuses->allowRadioMeasurementsStatus, 
hgs
parents:
diff changeset
  2818
       					value, type, err );
hgs
parents:
diff changeset
  2819
    	}
hgs
parents:
diff changeset
  2820
    
hgs
parents:
diff changeset
  2821
    if ( iReadSettings->powerSavingPresent )
hgs
parents:
diff changeset
  2822
    	{
hgs
parents:
diff changeset
  2823
		if ( readErr == KErrNone )
hgs
parents:
diff changeset
  2824
    		{
hgs
parents:
diff changeset
  2825
    		TRAP( err, usrTable->ReadBoolL( TPtrC(WLAN_POWER_MODE), boolVal ));
hgs
parents:
diff changeset
  2826
    		}
hgs
parents:
diff changeset
  2827
   		else
hgs
parents:
diff changeset
  2828
   			{
hgs
parents:
diff changeset
  2829
   			err = readErr;
hgs
parents:
diff changeset
  2830
   			}
hgs
parents:
diff changeset
  2831
		
hgs
parents:
diff changeset
  2832
		value.Zero();
hgs
parents:
diff changeset
  2833
		type.Zero();
hgs
parents:
diff changeset
  2834
    	if ( boolVal )
hgs
parents:
diff changeset
  2835
    		value.Copy(_L8("True"));
hgs
parents:
diff changeset
  2836
    	else
hgs
parents:
diff changeset
  2837
    		value.Copy(_L8("False"));
hgs
parents:
diff changeset
  2838
    	
hgs
parents:
diff changeset
  2839
    	type.Append( KNSmlWLanPowerSaving );
hgs
parents:
diff changeset
  2840
    	UpdateStatusAndResultL( iReadStatuses->powerSavingResult, iReadStatuses->powerSavingStatus, 
hgs
parents:
diff changeset
  2841
       					value, type, err );
hgs
parents:
diff changeset
  2842
    	}
hgs
parents:
diff changeset
  2843
hgs
parents:
diff changeset
  2844
	CleanupStack::PopAndDestroy( usrTable );
hgs
parents:
diff changeset
  2845
    CleanupStack::PopAndDestroy( db );
hgs
parents:
diff changeset
  2846
	_DBG_FILE("CGlobalWLANAdapter::ReadCommsDBParams() end" );  
hgs
parents:
diff changeset
  2847
	return;
hgs
parents:
diff changeset
  2848
	}
hgs
parents:
diff changeset
  2849
hgs
parents:
diff changeset
  2850
hgs
parents:
diff changeset
  2851
hgs
parents:
diff changeset
  2852
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2853
// TInt CGlobalWLANAdapter::NumOfUriSegs( const TDesC8& aUri )
hgs
parents:
diff changeset
  2854
// Return count of URI segments of aUri
hgs
parents:
diff changeset
  2855
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2856
TInt CGlobalWLANAdapter::NumOfUriSegs( const TDesC8& aUri )
hgs
parents:
diff changeset
  2857
    {
hgs
parents:
diff changeset
  2858
    _DBG_FILE("CGlobalWLANAdapter::NumOfUriSegs(): begin");
hgs
parents:
diff changeset
  2859
hgs
parents:
diff changeset
  2860
    TInt count = 1;
hgs
parents:
diff changeset
  2861
    for( TInt i=0; i<aUri.Length(); i++ )
hgs
parents:
diff changeset
  2862
        {
hgs
parents:
diff changeset
  2863
        if( aUri[i] == '/' )
hgs
parents:
diff changeset
  2864
            count ++;
hgs
parents:
diff changeset
  2865
        }
hgs
parents:
diff changeset
  2866
hgs
parents:
diff changeset
  2867
    _DBG_FILE("CGlobalWLANAdapter::NumOfUriSegs(): end");
hgs
parents:
diff changeset
  2868
    return count;
hgs
parents:
diff changeset
  2869
    }
hgs
parents:
diff changeset
  2870
hgs
parents:
diff changeset
  2871
hgs
parents:
diff changeset
  2872
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2873
// TPtrC8 CGlobalWLANAdapter::GetLastUriSeg(const TDesC8& aURI)
hgs
parents:
diff changeset
  2874
// Returns only the last uri segemnt
hgs
parents:
diff changeset
  2875
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2876
TPtrC8 CGlobalWLANAdapter::GetLastUriSeg( const TDesC8& aURI )
hgs
parents:
diff changeset
  2877
    {
hgs
parents:
diff changeset
  2878
    _DBG_FILE("CGlobalWLANAdapter::GetLastUriSeg(): begin");
hgs
parents:
diff changeset
  2879
hgs
parents:
diff changeset
  2880
	// search for the segment after the last slash
hgs
parents:
diff changeset
  2881
    TInt i;
hgs
parents:
diff changeset
  2882
    for( i = aURI.Length() - 1; i >= 0; i-- )
hgs
parents:
diff changeset
  2883
        {
hgs
parents:
diff changeset
  2884
        if( aURI[i] == '/' )
hgs
parents:
diff changeset
  2885
            {
hgs
parents:
diff changeset
  2886
            break;
hgs
parents:
diff changeset
  2887
            }
hgs
parents:
diff changeset
  2888
        }
hgs
parents:
diff changeset
  2889
hgs
parents:
diff changeset
  2890
    if( i == 0 )
hgs
parents:
diff changeset
  2891
        {
hgs
parents:
diff changeset
  2892
        _DBG_FILE("CGlobalWLANAdapter::GetLastUriSeg(): end");
hgs
parents:
diff changeset
  2893
        return aURI;
hgs
parents:
diff changeset
  2894
        }
hgs
parents:
diff changeset
  2895
    else
hgs
parents:
diff changeset
  2896
        {
hgs
parents:
diff changeset
  2897
        _DBG_FILE("CGlobalWLANAdapter::GetLastUriSeg(): end");
hgs
parents:
diff changeset
  2898
        return aURI.Mid( i + 1 );
hgs
parents:
diff changeset
  2899
        }
hgs
parents:
diff changeset
  2900
    }
hgs
parents:
diff changeset
  2901
    
hgs
parents:
diff changeset
  2902
hgs
parents:
diff changeset
  2903
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2904
// TInt CNSmlWLanAdapter::DesToInt( const TDesC8& aNumber )
hgs
parents:
diff changeset
  2905
// Returns aLuid as integer value
hgs
parents:
diff changeset
  2906
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2907
TInt CGlobalWLANAdapter::DesToInt( const TDesC8& aNumber )
hgs
parents:
diff changeset
  2908
    {
hgs
parents:
diff changeset
  2909
    _DBG_FILE("CGlobalWLANAdapter::DesToInt(): begin");
hgs
parents:
diff changeset
  2910
    
hgs
parents:
diff changeset
  2911
    TInt err = KErrNone;
hgs
parents:
diff changeset
  2912
    TLex8 lex(aNumber);
hgs
parents:
diff changeset
  2913
    TInt value = 0;
hgs
parents:
diff changeset
  2914
    err = lex.Val( value );
hgs
parents:
diff changeset
  2915
hgs
parents:
diff changeset
  2916
    DBG_ARGS8(_S8("CGlobalWLANAdapter::DesToInt() - Des: <%S> Int: <%D>"), &aNumber, value );
hgs
parents:
diff changeset
  2917
    _DBG_FILE("CGlobalWLANAdapter::DesToInt(): end");
hgs
parents:
diff changeset
  2918
   
hgs
parents:
diff changeset
  2919
    // the input might have been illegal. Return error code if conversion failed.
hgs
parents:
diff changeset
  2920
    if ( err == KErrNone )
hgs
parents:
diff changeset
  2921
    	return value;
hgs
parents:
diff changeset
  2922
    else
hgs
parents:
diff changeset
  2923
    	return err;
hgs
parents:
diff changeset
  2924
    }
hgs
parents:
diff changeset
  2925
    
hgs
parents:
diff changeset
  2926
    
hgs
parents:
diff changeset
  2927
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2928
// TInt CNSmlWLanAdapter::InitMemberVariables
hgs
parents:
diff changeset
  2929
// Inits the member variable structures
hgs
parents:
diff changeset
  2930
// ------------------------------------------------------------------------------------------------
hgs
parents:
diff changeset
  2931
void CGlobalWLANAdapter::InitMemberVariables()
hgs
parents:
diff changeset
  2932
    {
hgs
parents:
diff changeset
  2933
    _DBG_FILE("CGlobalWLANAdapter::InitMemberVariables(): begin");
hgs
parents:
diff changeset
  2934
    
hgs
parents:
diff changeset
  2935
    iWriteSettings->RCPITriggerPresent=EFalse;
hgs
parents:
diff changeset
  2936
  	iWriteSettings->internetConnectivityTestPresent=EFalse;
hgs
parents:
diff changeset
  2937
	iWriteSettings->useDefaultSettingsPresent=EFalse;
hgs
parents:
diff changeset
  2938
	iWriteSettings->longRetryLimitPresent=EFalse;
hgs
parents:
diff changeset
  2939
	iWriteSettings->shortRetryLimitPresent=EFalse;
hgs
parents:
diff changeset
  2940
	iWriteSettings->RTSThresholdPresent=EFalse;
hgs
parents:
diff changeset
  2941
	iWriteSettings->TXPowerLevelPresent=EFalse;
hgs
parents:
diff changeset
  2942
	iWriteSettings->powerSavingPresent=EFalse;
hgs
parents:
diff changeset
  2943
	iWriteSettings->backgroundScanIntervalPresent=EFalse;
hgs
parents:
diff changeset
  2944
	iWriteSettings->scanRatePresent=EFalse;
hgs
parents:
diff changeset
  2945
	iWriteSettings->RCPITriggerPresent=EFalse;
hgs
parents:
diff changeset
  2946
	iWriteSettings->minActiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2947
	iWriteSettings->maxActiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2948
	iWriteSettings->maxTxMSDULifeTimePresent=EFalse;
hgs
parents:
diff changeset
  2949
	iWriteSettings->scanExpirationTimerPresent=EFalse;
hgs
parents:
diff changeset
  2950
	iWriteSettings->unloadDriverTimerPresent=EFalse;
hgs
parents:
diff changeset
  2951
	iWriteSettings->roamTimerPresent=EFalse;
hgs
parents:
diff changeset
  2952
	iWriteSettings->RCPIDifferencePresent=EFalse;
hgs
parents:
diff changeset
  2953
	iWriteSettings->connRegainTimerPresent=EFalse;
hgs
parents:
diff changeset
  2954
	iWriteSettings->maxTriesToFindNwPresent=EFalse;
hgs
parents:
diff changeset
  2955
	iWriteSettings->delayBetweenFindNwPresent=EFalse;
hgs
parents:
diff changeset
  2956
	iWriteSettings->allowRadioMeasurementsPresent=EFalse;
hgs
parents:
diff changeset
  2957
	iWriteSettings->minPassiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2958
	iWriteSettings->maxPassiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2959
	iWriteSettings->maxApFailureCountPresent=EFalse;
hgs
parents:
diff changeset
  2960
	iWriteSettings->longBeaconFindCountPresent=EFalse;
hgs
parents:
diff changeset
  2961
	iWriteSettings->qosNullFrameIntervalPresent=EFalse;
hgs
parents:
diff changeset
  2962
	iWriteSettings->qosNullFrameTimeoutPresent=EFalse;
hgs
parents:
diff changeset
  2963
	iWriteSettings->MTUPresent=EFalse;
hgs
parents:
diff changeset
  2964
		 
hgs
parents:
diff changeset
  2965
	iReadSettings->RCPITriggerPresent=EFalse;
hgs
parents:
diff changeset
  2966
  	iReadSettings->internetConnectivityTestPresent=EFalse;
hgs
parents:
diff changeset
  2967
	iReadSettings->useDefaultSettingsPresent=EFalse;
hgs
parents:
diff changeset
  2968
	iReadSettings->longRetryLimitPresent=EFalse;
hgs
parents:
diff changeset
  2969
	iReadSettings->shortRetryLimitPresent=EFalse;
hgs
parents:
diff changeset
  2970
	iReadSettings->RTSThresholdPresent=EFalse;
hgs
parents:
diff changeset
  2971
	iReadSettings->TXPowerLevelPresent=EFalse;
hgs
parents:
diff changeset
  2972
	iReadSettings->powerSavingPresent=EFalse;
hgs
parents:
diff changeset
  2973
	iReadSettings->backgroundScanIntervalPresent=EFalse;
hgs
parents:
diff changeset
  2974
	iReadSettings->scanRatePresent=EFalse;
hgs
parents:
diff changeset
  2975
	iReadSettings->RCPITriggerPresent=EFalse;
hgs
parents:
diff changeset
  2976
	iReadSettings->minActiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2977
	iReadSettings->maxActiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2978
	iReadSettings->maxTxMSDULifeTimePresent=EFalse;
hgs
parents:
diff changeset
  2979
	iReadSettings->scanExpirationTimerPresent=EFalse;
hgs
parents:
diff changeset
  2980
	iReadSettings->unloadDriverTimerPresent=EFalse;
hgs
parents:
diff changeset
  2981
	iReadSettings->roamTimerPresent=EFalse;
hgs
parents:
diff changeset
  2982
	iReadSettings->RCPIDifferencePresent=EFalse;
hgs
parents:
diff changeset
  2983
	iReadSettings->connRegainTimerPresent=EFalse;
hgs
parents:
diff changeset
  2984
	iReadSettings->maxTriesToFindNwPresent=EFalse;
hgs
parents:
diff changeset
  2985
	iReadSettings->delayBetweenFindNwPresent=EFalse;
hgs
parents:
diff changeset
  2986
	iReadSettings->allowRadioMeasurementsPresent=EFalse;
hgs
parents:
diff changeset
  2987
	iReadSettings->minPassiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2988
	iReadSettings->maxPassiveChannelTimePresent=EFalse;
hgs
parents:
diff changeset
  2989
	iReadSettings->maxApFailureCountPresent=EFalse;
hgs
parents:
diff changeset
  2990
	iReadSettings->longBeaconFindCountPresent=EFalse;
hgs
parents:
diff changeset
  2991
	iReadSettings->qosNullFrameIntervalPresent=EFalse;
hgs
parents:
diff changeset
  2992
	iReadSettings->qosNullFrameTimeoutPresent=EFalse;
hgs
parents:
diff changeset
  2993
	iReadSettings->MTUPresent=EFalse;
hgs
parents:
diff changeset
  2994
hgs
parents:
diff changeset
  2995
	_DBG_FILE("CGlobalWLANAdapter::InitMemberVariables(): begin");
hgs
parents:
diff changeset
  2996
    }
hgs
parents:
diff changeset
  2997
hgs
parents:
diff changeset
  2998
// end of file