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