hotspotfw/hsserver/src/hssscan.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 16:07:56 +0300
changeset 19 10810c91db26
parent 0 56b72877c1cb
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* 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