phoneapp/phoneuiview/inc/cphonecallheadertextanimation.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *     Singleton class for implementing video call header text animation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONECALLHEADERTEXTANIMATION_H
       
    21 #define CPHONECALLHEADERTEXTANIMATION_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <coemain.h>
       
    25 #include "mphonetimer.h"
       
    26 #include "bmbubblemanager.h"
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt KPhoneCallHeaderAnimationTextLength = 125;
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CPhoneTimer;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 class CPhoneCallHeaderTextAnimation : public CCoeStatic, public MPhoneTimer
       
    37     {
       
    38     public:  
       
    39 
       
    40         /**    
       
    41          * Returns an instance of this class. When called for the first
       
    42          * time, a new instance is created and returned.  After that,
       
    43          * calling InstanceL returns the same instance that was created
       
    44          * earlier.
       
    45          *   
       
    46          * @return A pointer to a CPhoneCallHeaderTextAnimation object    
       
    47          */    
       
    48         static CPhoneCallHeaderTextAnimation* InstanceL();   
       
    49         
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         virtual ~CPhoneCallHeaderTextAnimation();
       
    54         
       
    55         /**
       
    56         * Stops and destroys video call text animation bubble.
       
    57         */
       
    58         void RemoveAnimatingVideoCallHeader();
       
    59  
       
    60 		/**
       
    61 		* Begins animating video call header
       
    62 		* @param aBubbleId - bubble which will affect on this
       
    63 		* @param aNormalText - normal length text
       
    64 		* @param aShortText - short version of the text
       
    65 		* @param aBubbleManager - reference to bubble manager for manipulating
       
    66 		*						  the bubble
       
    67 		*/
       
    68 		void StartAnimatingVideoCallHeaderL(
       
    69 			const CBubbleManager::TBubbleId aBubbleId,    
       
    70     		const TDesC& aNormalText,
       
    71     		const TDesC& aShortText,
       
    72     		CBubbleManager& aBubbleManager );
       
    73     	
       
    74     	/**
       
    75     	* Sets bubble texts
       
    76     	* @param aNormalText - normal length text
       
    77     	* @param aShortText - short version of the text
       
    78     	*/	
       
    79 		void SetBubbleTexts( const TDesC& aNormalText, 
       
    80 			const TDesC& aShortText );
       
    81         
       
    82     // From base class MPhoneTimer
       
    83         /**
       
    84         * From MPhoneTimer
       
    85         * This function is called after on timeout.
       
    86         */
       
    87         void HandleTimeOutL();
       
    88         
       
    89 
       
    90     private:
       
    91 
       
    92         /**    
       
    93          * Default constructor is private because we are using the
       
    94          * singleton design pattern.
       
    95          */    
       
    96         CPhoneCallHeaderTextAnimation();  
       
    97         
       
    98         /**
       
    99         * By default EPOC constructor is private.
       
   100         */
       
   101         void ConstructL();
       
   102                         
       
   103         
       
   104     private:
       
   105     
       
   106         /**
       
   107         * Animation timer
       
   108         */
       
   109         CPhoneTimer* iTimer;
       
   110         
       
   111         /**
       
   112         * Number of dots displayed in the bubble
       
   113         */
       
   114         TInt iDotNum;
       
   115           
       
   116         /*
       
   117         * Pointer to bubble manager
       
   118         */
       
   119         CBubbleManager* iBubbleManager;
       
   120 
       
   121         // Bubble Id for the bubble of active call
       
   122         CBubbleManager::TBubbleId iActiveBubble;
       
   123 
       
   124         // Normal text for video call header
       
   125         TBuf<KPhoneCallHeaderAnimationTextLength> iNormalText;
       
   126 
       
   127         // Short text for video call header
       
   128         TBuf<KPhoneCallHeaderAnimationTextLength> iShortText;
       
   129 
       
   130     };
       
   131     
       
   132 #endif // CPHONECALLHEADERTEXTANIMATION_H
       
   133 
       
   134 // End of File