coreapplicationuis/SysAp/Src/Usb/SysApUsbIndicatorImpl.h
author hgs
Wed, 20 Oct 2010 17:03:03 +0300
changeset 81 676b6116ca93
parent 0 2e3d3ce01487
permissions -rw-r--r--
201041_01

/*
* Copyright (c) 2003-2010 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:  The implementation of MSysApUsbIndicator.
*
*/


#ifndef SYSAPUSBINDICATORIMPL_H
#define SYSAPUSBINDICATORIMPL_H

// INCLUDES
#include <e32base.h>
#include "MSysApUsbIndicator.h"
#include <usbman.h>
#include <avkon.hrh>

// FORWARD DECLARATIONS

class CSysApAppUi;

// CLASS DECLARATION
/**
*  CSysApUsbIndicator
*  
*  @lib   sysap
*  @since 2.1 
*/

class CSysApUsbIndicator : public CActive, public MSysApUsbIndicator
{
public:

    /**
    * Two-phased constructor.
    */         
    static CSysApUsbIndicator* NewL( CSysApAppUi& aSysApAppUi );

    /**
    * Destructor.
    */
    ~CSysApUsbIndicator();

public: // from CActive
    /**
    *	@param none
    *	@return none
    */    
    void RunL();
    
    /**
    *	@param aError the error returned
    *	@return error
    */
    TInt RunError(TInt aError);

    /**
    *	@param none
    *	@return none
    */    
    void DoCancel();

private:

    /**
    * Constructor.
    */         
    CSysApUsbIndicator( CSysApAppUi& aSysApAppUi );

    /**
    * Two-phased constructor.
    * @param None
    * @return void
    */
    void ConstructL();  

private:

    CSysApAppUi&         iSysApAppUi;
    RUsb                 iUsbMan;
    TUsbDeviceState      iDeviceState;     // current state of USB
    TBool                iIndicatorOn;  // current state of indicator
#ifdef FCC_UNIT_TEST
    friend class Cutsysapgeneraltest;
#endif 
};

#endif // SYSAPUSBINDICATORIMPL_H

// End of File