phoneengine/callhandling/inc/cpecall.h
changeset 37 ba76fc04e6c2
parent 0 5f000ab63145
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2002-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:  This file contains the header file of the CPECall object
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPECALL_H
       
    20 #define CPECALL_H
       
    21 
       
    22 //INCLUDES
       
    23 #include <pevirtualengine.h>
       
    24 #include <mccecall.h>
       
    25 #include <mccecallobserver.h>
       
    26 #include <mpecall.h>
       
    27 
       
    28 // CONSTANTS
       
    29 // None
       
    30 
       
    31 // MACROS
       
    32 // None
       
    33 
       
    34 // DATA TYPES
       
    35 // None.
       
    36 
       
    37 // FUNCTION PROTOTYPES
       
    38 // None. 
       
    39 
       
    40 // FORWARD DECLARATIONS
       
    41 class MPEMessageSender;
       
    42 class MCCECallObserver;
       
    43 
       
    44 // CLASS DECLARATION
       
    45 
       
    46 /**
       
    47 *  Create call handling requests to Call Command object
       
    48 *  @lib CallHandling.lib
       
    49 *  @since Series60_4.0
       
    50 */
       
    51 class CPECall 
       
    52         : public CBase,
       
    53           public MPECall
       
    54     {
       
    55     protected: //Constructors and descructor
       
    56         /**
       
    57         * C++ default constructor.
       
    58         */
       
    59         IMPORT_C CPECall( MPEMessageSender& aOwner );
       
    60 
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         virtual IMPORT_C ~CPECall();
       
    65               
       
    66     public:    //New functions
       
    67         
       
    68         /**
       
    69         * Reroutes call messages from other objects to call handling object
       
    70         * @param aMessage The message code of the message
       
    71         */    
       
    72         virtual void SendMessage( const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage );
       
    73         
       
    74         /**
       
    75         * Reroutes error messages from other objects to call handling object
       
    76         * @param aErrorCode The error code of the failed operation
       
    77         */        
       
    78         IMPORT_C virtual void SendErrorMessage( const TInt aErrorCode );
       
    79         
       
    80         /**
       
    81         * Returns call error code and cause.
       
    82         * @param aErrorCode, the error code stored after previous unsuccessful request
       
    83         */
       
    84         virtual void GetErrorCode( TInt& aErrorCode ) const;
       
    85         
       
    86         /**
       
    87         * Sets call status information
       
    88         * @param aCallState the status of the current call
       
    89         */    
       
    90         virtual void SetCallState( const TPEState aCallState );
       
    91 
       
    92         /**
       
    93         * Returns call status information
       
    94         * @return the status of the current call
       
    95         */    
       
    96         virtual TPEState GetCallState() const;
       
    97 
       
    98         /**
       
    99         * Sets call ID number
       
   100         * @param aCallId, the call id number
       
   101         */    
       
   102         virtual void SetCallId( const TInt aCallId );
       
   103         
       
   104         /**
       
   105         * Returns call id number
       
   106         * @return the call id number
       
   107         */    
       
   108         virtual TInt GetCallId() const;
       
   109 
       
   110     protected:
       
   111 
       
   112         // Reference to owner of this class
       
   113         MPEMessageSender& iOwner;
       
   114         // The id number of the call
       
   115         TInt iCallId;
       
   116         // The current state of the call
       
   117         TInt iCallState;
       
   118         // Includes possible error code of the call.
       
   119         TInt iErrorCode;
       
   120     };
       
   121 
       
   122 #endif // CPECALLDATA_H
       
   123 
       
   124 //    End of File