wlanutilities/wpswizard/stubs/stub_wlanmgmtclient.cpp
changeset 46 2fbd1d709fe7
equal deleted inserted replaced
45:d9ec2b8c6bad 46:2fbd1d709fe7
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * WLAN Management API stubbing for WPS Wizard use in emulator.
       
    16 */
       
    17 
       
    18 #include <e32std.h>
       
    19 #include <e32base.h>
       
    20 #include "wlanmgmtclient.h"
       
    21 
       
    22 // ---------------------------------------------------------
       
    23 // CWlanScanRequest::NewL
       
    24 // ---------------------------------------------------------
       
    25 //
       
    26 CWlanMgmtClient* CWlanMgmtClient::NewL()
       
    27     {
       
    28     CWlanMgmtClient* self = new CWlanMgmtClient;
       
    29     return self;
       
    30     }
       
    31     
       
    32 // ---------------------------------------------------------
       
    33 // CWlanScanRequest::~CWlanMgmtClient
       
    34 // ---------------------------------------------------------
       
    35 //
       
    36 CWlanMgmtClient::~CWlanMgmtClient()
       
    37     {
       
    38     }
       
    39 
       
    40 // ---------------------------------------------------------
       
    41 // CWlanScanRequest::CWlanMgmtClient
       
    42 // ---------------------------------------------------------
       
    43 //
       
    44 CWlanMgmtClient::CWlanMgmtClient()
       
    45     {
       
    46     }
       
    47 
       
    48 // ---------------------------------------------------------
       
    49 // CWlanScanRequest::RunProtectedSetup
       
    50 // ---------------------------------------------------------
       
    51 //
       
    52 void CWlanMgmtClient::RunProtectedSetup(
       
    53     TRequestStatus& aStatus,
       
    54     const TWlanSsid& aSsid,
       
    55     const TWlanWpsPin& /* aWpsPin */,
       
    56     CArrayFixSeg<TWlanProtectedSetupCredentialAttribute>& aCredentials )
       
    57 {
       
    58     // Complete the request immediately
       
    59     TRequestStatus *status = &aStatus;
       
    60     TInt err = KErrNone;
       
    61     TWlanProtectedSetupCredentialAttribute attr;
       
    62     
       
    63     attr.iSsid.Copy(aSsid);
       
    64     attr.iSecurityMode = EWlanIapSecurityModeAllowUnsecure;
       
    65     attr.iAuthenticationMode = EWlanAuthenticationModeOpen;
       
    66     attr.iOperatingMode = EWlanOperatingModeInfrastructure;
       
    67     attr.iWepDefaultKey = EWlanDefaultWepKey1;
       
    68     
       
    69     TRAP(err, aCredentials.AppendL(attr) );
       
    70     User::RequestComplete(status, err);
       
    71 }
       
    72 
       
    73 // ---------------------------------------------------------
       
    74 // CWlanScanRequest::CancelProtectedSetup
       
    75 // ---------------------------------------------------------
       
    76 //
       
    77 void CWlanMgmtClient::CancelProtectedSetup()
       
    78     {
       
    79     }
       
    80