bluetoothengine/headsetsimulator/profiles/hspprofile/inc/hspsettings.h
author michal.sulewski
Wed, 15 Sep 2010 15:59:44 +0200
branchheadsetsimulator
changeset 60 90dbfc0435e3
permissions -rw-r--r--
source code commit

/* 
 *
 * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
 * which accompanies this distribution, and is available
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Original Contributors:
 * Comarch S.A. - original contribution.
 *
 * Contributors:
 *
 * Description:
 *
 */

#ifndef HSPSETTINGS_H_
#define HSPSETTINGS_H_

#include <e32base.h>

/**
 * @brief Singleton class representing profile's settings
 */
class CHsHSPSettings : public CBase
{
public:

    /**
     * Returns pointer to singleton class
     * 
     * @return class instance
     */
    static CHsHSPSettings* InstanceL();

    /**
     * Decrements reference counter. Deletes singleton if there are no references.
     */
    void Release();

private:
    /**
     * Constructor for performing 1st stage construction
     */
    CHsHSPSettings();

    /**
     * Destructor
     */
    ~CHsHSPSettings();

    /**
     * Constructor for performing 2nd stage construction
     */
    void ConstructL();

public:

    /**
     * Sets speaker volume level
     * 
     * @param aLevel new level
     */
    void SetSpeakerVolumeLevel( const TInt aLevel );

    /**
     * Sets speaker volume level
     * 
     * @param aLevel new level
     */
    void SetMicGainLevel( const TInt aLevel );

    /**
     * Updates call status
     * 
     * @param aIsCallOngoing denotes if audio call is ongoing
     */
    void UpdateCallStatus( const TBool aIsCallOngoing );

    
    /**
     * Getter for 'CallOngoing' status
     * 
     * @return ETrue if audio call is ongoing, otherwise EFalse
     */
     TBool CallOngoing() const;
    
private:

    /** Speaker volume level */
    TInt iSpeakerVolumeLevel;

    /** Microphone gain level */
    TInt iMicGainLevel;

    /** Denotes if voice call is ongoing */
    TBool iCallOngoing;

    /** Reference counter */
    TInt iReferenceCounter;
};
#endif /* HSPSETTINGS_H_ */