hotspotfw/hsserver/src/hssscan.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 16:18:40 +0300
branchRCL_3
changeset 24 63be7eb3fc78
parent 0 56b72877c1cb
permissions -rw-r--r--
Revision: 201029 Kit: 201035

/*
* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Implementation of Active Object
*
*/



// INCLUDE FILES
#include <hssscan.h>
#include <hotspotsession.h>

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CHssScan
// -----------------------------------------------------------------------------
CHssScan::CHssScan( CWlanMgmtClient* aWlanMgmtClient, CHotSpotSession& aCallback) :
    CActive( CActive::EPriorityStandard ),
    iCallback( aCallback ),
    iMgmtClient( aWlanMgmtClient ),
    iScanInfo( NULL )
    {
    TRAP_IGNORE( iScanInfo = CWlanScanInfo::NewL() );
    // Possible leave error neglected!?
    CActiveScheduler::Add( this );        
    }
    
// -----------------------------------------------------------------------------
// ~CHssScan
// -----------------------------------------------------------------------------
CHssScan::~CHssScan()
    {
    Cancel();
    delete iScanInfo;
    }

// -----------------------------------------------------------------------------
// RunL
// -----------------------------------------------------------------------------
void CHssScan::RunL()
    {
        iCallback.ScanCompleteL( iStatus , *iScanInfo );
    }

// -----------------------------------------------------------------------------
// RunError 
// -----------------------------------------------------------------------------
TInt CHssScan::RunError( TInt /* aError */ )
    {

    return KErrNone;
    }

// -----------------------------------------------------------------------------
// DoCancel
// -----------------------------------------------------------------------------
void CHssScan::DoCancel()
    {
    
    }

// -----------------------------------------------------------------------------
// IssueRequest
// -----------------------------------------------------------------------------
void CHssScan::IssueRequest()
    {
        iMgmtClient->GetScanResults( iStatus, *iScanInfo );
	    SetActive();
    }
    
    
// end of file