coreapplicationuis/SysAp/Src/Usb/sysapusbchargerdetector.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 13 Oct 2010 14:43:04 +0300
branchRCL_3
changeset 82 4610cd70c542
parent 0 2e3d3ce01487
permissions -rw-r--r--
Revision: 201039 Kit: 201041

/*
* Copyright (c) 2008 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:  This class offers USB charger detector service.
*
*/


#ifndef T_SYSAPUSBCHARGERDETECTOR_H
#define T_SYSAPUSBCHARGERDETECTOR_H

#include <e32std.h>

// CLASS DECLARATION
/**
*  This class offers USB charger detector service.
*
*  @since 3.2
*/
class TSysApUsbChargerDetector
    {
public:
    /**
     * Constructor.
     *
     * @since S60 3.2
     */
    TSysApUsbChargerDetector();

    /**
     * Sets USB device used status.
     *
     * @since S60 3.2
     * @param aUsbDeviceUsed Value of USB device used status
     */
    void SetUsbDeviceUsed( TBool aUsbDeviceUsed );

    /**
     * Sets charging used status.
     *
     * @since S60 3.2
     * @param aChargingUsed Value of charging used status
     */
    void SetChargingUsed( TBool aChargingUsed );

    /**
     * Resets the USB charger detector.
     *
     * @since S60 3.2
     */
    void Reset();

    /**
     * Checks is host only USB charging used i.e. charging without
     * decicated USB charger.
     *
     * @since S60 3.2
     * @return ETrue if USB charging is used. Otherwise EFalse.
     */
    TBool HostOnlyUsbChargingUsed() const;

    /**
     * Enables USB charging.
     *
     * @since S60 3.2
     * @param aUsbChargingEnabled Value of charging enabled status
     */
    void EnableUsbCharging( TBool aUsbChargingEnabled );

private:
    /**
     * Indicates if USB device is used.
     */
    TBool iUsbDeviceUsed;

    /**
     * Indicates if charging is used.
     */
    TBool iChargingUsed;

    /**
     * Indicates if USB charging is enabled.
     */
    TBool iUsbChargingEnabled;

    };

#endif // T_SYSAPUSBCHARGERDETECTOR_H