bluetoothengine/headsetsimulator/profiles/hspprofile/inc/hspsettings.h
branchheadsetsimulator
changeset 60 90dbfc0435e3
equal deleted inserted replaced
59:02103bf20ee5 60:90dbfc0435e3
       
     1 /* 
       
     2  *
       
     3  * Copyright (c) <2010> Comarch S.A. and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  * This component and the accompanying materials are made available
       
     6  * under the terms of the License "Eclipse Public License v1.0"
       
     7  * which accompanies this distribution, and is available
       
     8  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     9  *
       
    10  * Original Contributors:
       
    11  * Comarch S.A. - original contribution.
       
    12  *
       
    13  * Contributors:
       
    14  *
       
    15  * Description:
       
    16  *
       
    17  */
       
    18 
       
    19 #ifndef HSPSETTINGS_H_
       
    20 #define HSPSETTINGS_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 /**
       
    25  * @brief Singleton class representing profile's settings
       
    26  */
       
    27 class CHsHSPSettings : public CBase
       
    28 {
       
    29 public:
       
    30 
       
    31     /**
       
    32      * Returns pointer to singleton class
       
    33      * 
       
    34      * @return class instance
       
    35      */
       
    36     static CHsHSPSettings* InstanceL();
       
    37 
       
    38     /**
       
    39      * Decrements reference counter. Deletes singleton if there are no references.
       
    40      */
       
    41     void Release();
       
    42 
       
    43 private:
       
    44     /**
       
    45      * Constructor for performing 1st stage construction
       
    46      */
       
    47     CHsHSPSettings();
       
    48 
       
    49     /**
       
    50      * Destructor
       
    51      */
       
    52     ~CHsHSPSettings();
       
    53 
       
    54     /**
       
    55      * Constructor for performing 2nd stage construction
       
    56      */
       
    57     void ConstructL();
       
    58 
       
    59 public:
       
    60 
       
    61     /**
       
    62      * Sets speaker volume level
       
    63      * 
       
    64      * @param aLevel new level
       
    65      */
       
    66     void SetSpeakerVolumeLevel( const TInt aLevel );
       
    67 
       
    68     /**
       
    69      * Sets speaker volume level
       
    70      * 
       
    71      * @param aLevel new level
       
    72      */
       
    73     void SetMicGainLevel( const TInt aLevel );
       
    74 
       
    75     /**
       
    76      * Updates call status
       
    77      * 
       
    78      * @param aIsCallOngoing denotes if audio call is ongoing
       
    79      */
       
    80     void UpdateCallStatus( const TBool aIsCallOngoing );
       
    81 
       
    82     
       
    83     /**
       
    84      * Getter for 'CallOngoing' status
       
    85      * 
       
    86      * @return ETrue if audio call is ongoing, otherwise EFalse
       
    87      */
       
    88      TBool CallOngoing() const;
       
    89     
       
    90 private:
       
    91 
       
    92     /** Speaker volume level */
       
    93     TInt iSpeakerVolumeLevel;
       
    94 
       
    95     /** Microphone gain level */
       
    96     TInt iMicGainLevel;
       
    97 
       
    98     /** Denotes if voice call is ongoing */
       
    99     TBool iCallOngoing;
       
   100 
       
   101     /** Reference counter */
       
   102     TInt iReferenceCounter;
       
   103 };
       
   104 #endif /* HSPSETTINGS_H_ */