phoneapp/phoneuistates/inc/cphonesinglecall.h
changeset 37 ba76fc04e6c2
child 50 377c906a8701
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     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 *     GSM-specific single call state implementation.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef CPHONESINGLECALL_H
       
    21 #define CPHONESINGLECALL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "cphonegsmincall.h"
       
    25 #include "tphonecmdparamboolean.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 // CLASS DECLARATION
       
    30 /**
       
    31 *  GSM-specific single call state
       
    32 */
       
    33 class CPhoneSingleCall : public CPhoneGsmInCall
       
    34     {
       
    35     public:  
       
    36 
       
    37         /**
       
    38         * Destructor.
       
    39         */
       
    40         IMPORT_C virtual ~CPhoneSingleCall();
       
    41         
       
    42         /**
       
    43         * Creates the GSM-specific Single call state class
       
    44         * @param aStateMachine: a state machine
       
    45         * @param aViewCommandHandle: handle to the PhoneUIView
       
    46         * @return an instance of class CPhoneSingleCall
       
    47         */
       
    48         static CPhoneSingleCall* NewL( 
       
    49             MPhoneStateMachine* aStateMachine, 
       
    50             MPhoneViewCommandHandle* aViewCommandHandle,
       
    51             MPhoneCustomization* aPhoneCustomization );
       
    52 
       
    53         IMPORT_C virtual void HandleKeyMessageL(
       
    54             TPhoneKeyEventMessages aMessage,
       
    55             TKeyCode aCode );
       
    56 
       
    57         /**
       
    58         * A message handling function for Phone Engine messages
       
    59         * @param aMessage Message from Phone Engine
       
    60         * @param aCallId Call id the message concerns
       
    61         */
       
    62         IMPORT_C virtual void HandlePhoneEngineMessageL(
       
    63             const TInt aMessage, 
       
    64             TInt aCallId );       
       
    65             
       
    66         IMPORT_C virtual TBool HandleCommandL( TInt aCommand );
       
    67 
       
    68 
       
    69     protected:
       
    70 
       
    71         /**
       
    72         * By default EPOC constructor is private.
       
    73         */
       
    74         IMPORT_C CPhoneSingleCall( 
       
    75             MPhoneStateMachine* aStateMachine, 
       
    76             MPhoneViewCommandHandle* aViewCommandHandle,
       
    77             MPhoneCustomization* aPhoneCustomization );
       
    78         
       
    79         /**
       
    80         * ConstructL()
       
    81         */
       
    82         IMPORT_C virtual void ConstructL();
       
    83 
       
    84         /**
       
    85         * Open menu bar
       
    86         */
       
    87         IMPORT_C virtual void OpenMenuBarL();
       
    88 
       
    89         /**
       
    90         * Returns call identifier of the call this state is associated with.
       
    91         * @return   Call identifier.
       
    92         */
       
    93         IMPORT_C TInt CallId() const;
       
    94     private:
       
    95     
       
    96         void OpenVideoCallMenuBarL();
       
    97     
       
    98         void HandleHeldL( TInt aCallId );
       
    99         
       
   100         void HandleConnectedL( TInt aCallId );
       
   101         
       
   102         void ToggleHoldL();
       
   103         
       
   104         void HandleIncomingL( TInt aCallId );
       
   105         
       
   106         void DisplayIncomingCallL( 
       
   107             TInt aCallId, 
       
   108             const TPhoneCmdParamBoolean aCommandParam );
       
   109 
       
   110         void CallFromNewCallQueryL();
       
   111         
       
   112         void HandleDiallingL( TInt aCallId );
       
   113                 
       
   114         void DisplayCallSetupL( TInt aCallId );
       
   115         
       
   116         void SetCallResumeL();
       
   117         
       
   118         void SetCallHoldL();
       
   119         
       
   120         void SwitchToVideoL();
       
   121         
       
   122         void SwitchToVoiceL();
       
   123     
       
   124     private:
       
   125     
       
   126         // Call id information.
       
   127         TInt iCallId;
       
   128         
       
   129         // Status of query
       
   130         TBool iSwitchToVideoQuery;
       
   131         
       
   132     };
       
   133 
       
   134 #endif // CPHONESINGLECALL_H
       
   135 
       
   136 // End of File