vtuis/videotelui/inc/commands/tvtuiaudiostate.h
branchRCL_3
changeset 25 779871d1e4f4
parent 0 ed9695c8bcbe
equal deleted inserted replaced
24:f15ac8e65a02 25:779871d1e4f4
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Audio state class definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef T_VTUIAUDIOSTATE_H
       
    20 #define T_VTUIAUDIOSTATE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "tvtflagcontainer.h"
       
    25 
       
    26 class CVtEngModel;
       
    27 
       
    28 /**
       
    29  *  TVtUiAudioState
       
    30  *
       
    31  *  Contains status information about video telephony audio.
       
    32  *
       
    33  *  @since S60 v3.2
       
    34  */
       
    35 NONSHARABLE_CLASS( TVtUiAudioState ) : public TVtUpdateableFlagContainer
       
    36     {
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Constructor
       
    41      *
       
    42      * @param aModel Reference to VT engine model.
       
    43      */
       
    44     inline TVtUiAudioState( CVtEngModel& aModel );
       
    45 
       
    46     /**
       
    47      * Return whether audio is enabled or not.
       
    48      *
       
    49      * @return ETrue if audio is enabled EFalse otherwise.
       
    50      */
       
    51     inline TBool IsAudio() const;
       
    52 
       
    53     /**
       
    54      * Return whether BT handsfree can be activated or not.
       
    55      *
       
    56      * @return ETrue if BT handsfree can be activated EFalse otherwise.
       
    57      */
       
    58     inline TBool CanActivateBtHf() const;
       
    59 
       
    60     /**
       
    61      * Return whether BT handsfree can be deactivated or not.
       
    62      *
       
    63      * @return ETrue if BT handsfree can be deactivated EFalse otherwise.
       
    64      */
       
    65     inline TBool CanDeactivateBtHf() const;
       
    66 
       
    67     /**
       
    68      * Return whether loudspeaker can be activated or not.
       
    69      *
       
    70      * @return ETrue if loudpseaker can be activated EFalse otherwise.
       
    71      */
       
    72     inline TBool CanActivateLoudspeaker() const;
       
    73 
       
    74     /**
       
    75      * Return whether loudspeaker can be deactivated or not.
       
    76      *
       
    77      * @return ETrue if loudspeaker can be deactivated EFalse otherwise.
       
    78      */
       
    79     inline TBool CanDeactivateLoudspeaker() const;
       
    80 
       
    81     /**
       
    82      * Return whether or not audio is permanently stopped.
       
    83      *
       
    84      * @return ETrue if audio is permanently stopped.
       
    85      */
       
    86     inline TBool IsAudioPermanentlyStopped() const;
       
    87 
       
    88 private: // from TVtUpdateableFlagContainer
       
    89 
       
    90     /**
       
    91      * @see TVtUpdateableFlagContainer::UpdateFlags
       
    92      */
       
    93     void UpdateFlags();
       
    94 
       
    95 private:
       
    96 
       
    97     // Enumeration for audio state flags.
       
    98     enum TFlags
       
    99         {
       
   100         /** Is set if audio is currently enabled. */
       
   101         EIsAudio = ( 1<<0 ),
       
   102         /** Is set if BT handsfree can be activated. */
       
   103         ECanActivateBtHf = ( 1<<1 ),
       
   104         /** Is set if BT handsfree can be deactivated. */
       
   105         ECanDeactivateBtHf = ( 1<<2 ),
       
   106         /** Is set if loudspeaker can be activated. */
       
   107         ECanActivateLoudspeaker = ( 1<<3 ),
       
   108         /** Is set if loudspeaker can be deactivated. */
       
   109         ECanDeactivateLoudspeaker = ( 1<<4 ),
       
   110         /** Set if audio is permanently stopped */
       
   111         EIsAudioPermanentlyStopped = ( 1<<5 )
       
   112         };
       
   113 
       
   114     // Reference to engine model instance
       
   115     CVtEngModel& iModel;
       
   116 
       
   117     };
       
   118 
       
   119 #include "tvtuiaudiostate.inl"
       
   120 
       
   121 #endif // T_VTUIAUDIOSTATE_H