phoneapp/phoneuiview/inc/cphoneincallindicator.h
changeset 0 5f000ab63145
child 1 838b0a10d15b
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002 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:  It manages incall indicator.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONEINCALLINDICATOR_H
       
    20 #define CPHONEINCALLINDICATOR_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CAknIncallBubble;
       
    27 class TPhoneCommandParam;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  It manages incall indicator (small bubble over the status pane).
       
    33 *
       
    34 *  @since 1.0
       
    35 */
       
    36 class CPhoneIncallIndicator : public CBase
       
    37     {
       
    38     public:  // Constructors and destructor      
       
    39         
       
    40         /**
       
    41         * Two-phased constructor.
       
    42         * @return new instance.
       
    43         */
       
    44         static CPhoneIncallIndicator* NewL();
       
    45         
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         ~CPhoneIncallIndicator();
       
    50 
       
    51     public: // New functions
       
    52 
       
    53         /**
       
    54         * Update indicator using the specified data
       
    55         * @param aCommandParam command parameter
       
    56         */
       
    57         void Update( TPhoneCommandParam* aCommandParam );
       
    58 
       
    59         /**
       
    60         * Handle an audio mute change
       
    61         * @param aCommandParam command parameter
       
    62         */
       
    63         void HandleMuteChange( TPhoneCommandParam* aCommandParam );
       
    64 
       
    65         /**
       
    66         * Handle a ciphering change
       
    67         * @param aCommandParam command parameter
       
    68         */
       
    69         void HandleCipheringChange( TPhoneCommandParam* aCommandParam );
       
    70 
       
    71     private:
       
    72 
       
    73         /**
       
    74         * C++ constructor.
       
    75         */
       
    76         CPhoneIncallIndicator();
       
    77 
       
    78         /**
       
    79         * Symbian OS constructor.
       
    80         */
       
    81         void ConstructL();
       
    82 
       
    83         /**
       
    84         * Update indicator.
       
    85         */
       
    86         void Update();
       
    87 
       
    88         /**
       
    89         * Sets state.
       
    90         *
       
    91         * @param aState new state.
       
    92         * @param aSync do synchronously.
       
    93         */
       
    94         void SetState( TInt aState, TBool aSync );
       
    95 
       
    96         /**
       
    97         * Updates using recovery system.
       
    98         */
       
    99         void UpdateWithRecovery();
       
   100 
       
   101         /**
       
   102         * Updates incall indicator.
       
   103         */
       
   104         static TInt DoRecoverUpdateL( TAny* aAny );
       
   105 
       
   106         /**
       
   107         * Updates incall indicator.
       
   108         */
       
   109         static TInt DoUpdate( TAny* aAny );
       
   110 
       
   111     private:    // Data
       
   112 
       
   113         // Recovery id for updating incall indicator.
       
   114         TInt iUpdateRecoveryId;
       
   115 
       
   116         // Current call state.
       
   117         TInt iCallState;
       
   118 
       
   119         // Incall mode.
       
   120         TInt iMode;
       
   121 
       
   122         // Current state.
       
   123         TInt iState;
       
   124 
       
   125         // Owned incall bubble instance.
       
   126         CAknIncallBubble* iBubble;
       
   127 
       
   128         // Indicates if phone is muted.
       
   129         TBool iMuted;
       
   130 
       
   131         // Indicates if ciphering is off.
       
   132         TBool iCipheringOff;
       
   133 
       
   134         // Indicates if call is in emergency mode.
       
   135         TBool iEmergency;
       
   136 
       
   137         // Owned callback.
       
   138         CIdle* iUpdater;
       
   139         
       
   140         // Indicates if line2 is in use.
       
   141         TBool iLine2;
       
   142         
       
   143         // Indicated if bubble needs to be visible or not
       
   144         TBool iVisible;
       
   145         
       
   146         // Indicates if ciphering indicator is allowed.
       
   147         TBool iCipheringIndicatorAllowed; 
       
   148     };
       
   149 
       
   150 #endif      // CPHONEINCALLINDICATOR_H
       
   151             
       
   152 // End of File