phoneapp/phoneuicontrol/inc/cphonecallheadermanager.h
changeset 0 5f000ab63145
child 20 3c221667e687
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Bubble manager wrapper.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPHONECALLHEADERMANAGER_H
       
    20 #define CPHONECALLHEADERMANAGER_H
       
    21 
       
    22 //INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <bmbubblemanager.h>
       
    25 
       
    26 #include "mphonecallheadermanagerutility.h"
       
    27 #include "mphonestatemachine.h"
       
    28 #include "mphoneviewcommandhandle.h"
       
    29 #include "mphonecustomization.h"
       
    30 
       
    31 class TPhoneCmdParamCallHeaderData;
       
    32 class TPhoneCallHeaderParam;
       
    33 
       
    34 /**
       
    35  * Class contains helper functions for bubble manager.
       
    36  *
       
    37  * @lib phoneuicontrol
       
    38  * @since S60 v9.1
       
    39  */
       
    40 NONSHARABLE_CLASS( CPhoneCallHeaderManager ) :  public CBase,
       
    41                                                 public MPhoneCallHeaderManagerUtility
       
    42     {
       
    43     public:
       
    44         
       
    45         /**
       
    46         * Creates new instance of CPhoneCallHeaderManager
       
    47         * @param aStateMachine: a state machine
       
    48         * @param aViewCommandHandle: handle to the PhoneUIView
       
    49         * @param aCustomization: handle to customization.
       
    50         * @return CPhoneCallHeaderManager* object  
       
    51         */
       
    52         static CPhoneCallHeaderManager* NewL(
       
    53                     MPhoneViewCommandHandle& aViewCommandHandle,
       
    54                     MPhoneStateMachine& aStateMachine,
       
    55                     MPhoneCustomization* aCustomization );
       
    56         /**
       
    57         * Destructor.
       
    58         */
       
    59         virtual ~CPhoneCallHeaderManager();
       
    60         
       
    61     public:
       
    62         
       
    63         /**
       
    64         * Returns updated remote information data.
       
    65         * @param aCallId - Call Id.
       
    66         */
       
    67         TPhoneCmdParamCallHeaderData UpdateCallHeaderInfoL( 
       
    68                 const TInt aCallId );
       
    69         
       
    70         void GetRemoteInfoDataL(  const TInt aCallId, TDes& aData ) const;
       
    71        
       
    72         /**
       
    73         * Display call header for call coming in ( the remote info data 
       
    74         * and picture is displayed immediately )
       
    75         * @param aCallid call id
       
    76         * @param aWaitingCall waiting call indication
       
    77         */
       
    78         void DisplayHeaderForCallComingInL(
       
    79                 const TInt aCallId, 
       
    80                 const TBool aWaitingCall );
       
    81        
       
    82         /**
       
    83         * Display call header for outgoing call (the phone number is initially
       
    84         * displayed)
       
    85         * @param aCallid call id
       
    86         */
       
    87         void DisplayHeaderForOutgoingCallL(
       
    88                 const TInt aCallId );
       
    89        
       
    90         /**
       
    91         * Sets the call header type used in the call bubble.
       
    92         * @param aCallHeaderType, call header type.
       
    93         */
       
    94         void SetCallHeaderType( 
       
    95                 const CBubbleManager::TPhoneCallTypeFlags aCallHeaderType );
       
    96         
       
    97         /**
       
    98         * Returns the set call header type.
       
    99         */
       
   100         CBubbleManager::TPhoneCallTypeFlags CallHeaderType() const;
       
   101                 
       
   102         /**
       
   103         * Sets divert indication to call header if necessary
       
   104         * @param aCallId - Call Id.
       
   105         * @param aCallHeaderData - Call header where indication will be set
       
   106         *                          if needed.
       
   107         */
       
   108         void SetDivertIndication( const TBool aDivertIndication );
       
   109         
       
   110         /**
       
   111         * Checks if call is waiting, returns ETrue if call is waiting
       
   112         * otherwise EFalse.
       
   113         * @param aCallId, call id.
       
   114         */
       
   115         TBool IsWaitingCallL( const TInt aCallId ) const;
       
   116         
       
   117         /**
       
   118         * Checks if call is video, returns ETrue if call is video
       
   119         * otherwise EFalse.
       
   120         * @param aCallId, call id.
       
   121         */
       
   122         TBool IsVideoCall( const TInt aCallId ) const;
       
   123  
       
   124 		/**
       
   125         * Sets texts to call header
       
   126         * @param aCallId - Call Id.
       
   127 		* @param aWaitingCall waiting call indication
       
   128         * @param aCallHeaderData - Call header where indication will be set
       
   129         *                          if needed.
       
   130         */         
       
   131         void SetCallHeaderTextsForCallComingIn(
       
   132                 const TInt aCallId, 
       
   133                 const TBool aWaitingCall,
       
   134                 TPhoneCmdParamCallHeaderData* aCallHeaderData );
       
   135         
       
   136     public:  // Functions from base class
       
   137         
       
   138         /**
       
   139         * @see MPhoneBubbleManagerUtility.
       
   140         */
       
   141         void SetPhoneNumberAvailabilityL( 
       
   142                 const TInt aNumberLength,
       
   143                 const TBool aContactInfoAvailable );
       
   144         
       
   145         /**
       
   146         * @see MPhoneBubbleManagerUtility.
       
   147         */
       
   148         void GetInCallNumberTextL( TInt aCallId, TDes& aData ) const;
       
   149         
       
   150         /**
       
   151         * @see MPhoneBubbleManagerUtility.
       
   152         */
       
   153         void LoadCallHeaderTexts(
       
   154             const TInt aLabelId, 
       
   155             const TInt aShortLabelId,
       
   156             TPhoneCmdParamCallHeaderData* aCallHeaderData ); 
       
   157         
       
   158         /**
       
   159         * @see MPhoneBubbleManagerUtility.
       
   160         */
       
   161         MPhoneCustomization* Customization(){ return iCustomization; }
       
   162         
       
   163         /**
       
   164         * @see MPhoneBubbleManagerUtility.
       
   165         */
       
   166         void LoadResource( TDes& aData, const TInt aResource );
       
   167         
       
   168     private:
       
   169     
       
   170         /**
       
   171         * C++ default constructor.
       
   172         */
       
   173         CPhoneCallHeaderManager(
       
   174                 MPhoneViewCommandHandle& aViewCommandHandle,
       
   175                 MPhoneStateMachine& aStateMachine,
       
   176                 MPhoneCustomization* aCustomization );
       
   177         
       
   178         /**
       
   179         * Symbian constructor
       
   180         */
       
   181         void ConstructL();
       
   182         
       
   183     private:
       
   184         
       
   185         MPhoneViewCommandHandle& iViewCommandHandle;
       
   186         MPhoneStateMachine& iStateMachine;
       
   187         MPhoneCustomization* iCustomization;
       
   188         TPhoneCallHeaderParam* iCallHeaderParam;
       
   189     };
       
   190 
       
   191 
       
   192 #endif // CPHONECALLHEADERMANAGER_H