phoneengine/callhandling/src/cpecall.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2003-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 implementation of CPECall class 
       
    15 *                member functions.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include <talogger.h>
       
    22 
       
    23 #include "cpecall.h"
       
    24 #include "mpemessagesender.h"
       
    25 
       
    26 // EXTERNAL DATA STRUCTURES
       
    27 // None.
       
    28 
       
    29 // EXTERNAL FUNCTION PROTOTYPES  
       
    30 // None.
       
    31 
       
    32 // CONSTANTS
       
    33 // None.
       
    34 
       
    35 // MACROS
       
    36 // None.
       
    37 
       
    38 // LOCAL CONSTANTS AND MACROS
       
    39 // None.
       
    40 
       
    41 // MODULE DATA STRUCTURES
       
    42 // None.
       
    43 
       
    44 // LOCAL FUNCTION PROTOTYPES
       
    45 // None.
       
    46 
       
    47 // FORWARD DECLARATIONS
       
    48 // None.
       
    49 
       
    50 // ==================== LOCAL FUNCTIONS ====================
       
    51 // None.
       
    52 
       
    53 // ================= MEMBER FUNCTIONS =======================
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CPECall::CPECall
       
    57 // C++ default constructor can NOT contain any code, that
       
    58 // might leave.
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 EXPORT_C CPECall::CPECall
       
    62         ( 
       
    63         MPEMessageSender& aOwner
       
    64         ) : iOwner( aOwner ),
       
    65             iCallState( EPEStateIdle )
       
    66     {
       
    67     TEFLOGSTRING( KTAOBJECT, "cpecall: CPECall::cpecall: start." );
       
    68     TEFLOGSTRING( KTAOBJECT, "cpecall: CPECall::cpecall: complete." );
       
    69     }
       
    70 
       
    71 // Destructor
       
    72 EXPORT_C CPECall::~CPECall
       
    73         (
       
    74         // None.
       
    75         )
       
    76     {
       
    77     TEFLOGSTRING( KTAOBJECT, "cpecall: CPECall::~CPECall: Start." );
       
    78     TEFLOGSTRING( KTAOBJECT, "cpecall: CPECall::~CPECall: Complete." );
       
    79     }    
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // CPECall::SendErrorMessage
       
    83 // Method reroutes error message from other modules to the CPEPCallHandling-object
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 EXPORT_C void CPECall::SendErrorMessage( const TInt aErrorCode )
       
    87     {
       
    88     iErrorCode = aErrorCode;
       
    89     iOwner.SendErrorMessage( iCallId, aErrorCode );
       
    90     }
       
    91 
       
    92 // -----------------------------------------------------------------------------
       
    93 // CPECall::SendMessage
       
    94 // Method reroutes messages from other modules to the CPECallHandling-object
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 void CPECall::SendMessage
       
    98         ( 
       
    99         const MEngineMonitor::TPEMessagesFromPhoneEngine aMessage
       
   100         )
       
   101     {
       
   102     iOwner.SendMessage( aMessage, iCallId );
       
   103     }
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // CPECall::GetErrorCode
       
   107 // Get the error code of the call.
       
   108 // -----------------------------------------------------------------------------
       
   109 //
       
   110 void CPECall::GetErrorCode
       
   111         (
       
   112         TInt& aErrorCode
       
   113         ) const
       
   114     {
       
   115     aErrorCode = iErrorCode;
       
   116     }
       
   117     
       
   118 // -----------------------------------------------------------------------------
       
   119 // CPECall::SetCallState
       
   120 // Method sets call state.
       
   121 // -----------------------------------------------------------------------------
       
   122 //
       
   123 void CPECall::SetCallState
       
   124         ( 
       
   125         const TPEState aCallState
       
   126         )
       
   127     {
       
   128     iCallState =  aCallState;
       
   129     }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // CPECall::GetCallState
       
   133 // Method returns call state.
       
   134 // -----------------------------------------------------------------------------
       
   135 //
       
   136 TPEState CPECall::GetCallState
       
   137         (
       
   138         // None.
       
   139         ) const
       
   140     {
       
   141     return iCallState;
       
   142     }
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // CPECall::SetCallId
       
   146 // Method sets call identification numbers
       
   147 // -----------------------------------------------------------------------------
       
   148 //
       
   149 void CPECall::SetCallId
       
   150         ( 
       
   151         const TInt aCallId
       
   152         )
       
   153     {
       
   154     iCallId = aCallId;
       
   155     }
       
   156 
       
   157 // -----------------------------------------------------------------------------
       
   158 // CPECall::GetCallId
       
   159 // Method returns call identification numbers
       
   160 // -----------------------------------------------------------------------------
       
   161 //
       
   162 TInt CPECall::GetCallId
       
   163         (
       
   164         // None.
       
   165         ) const
       
   166     {
       
   167     return iCallId;
       
   168     }
       
   169     
       
   170 // ================= OTHER EXPORTED FUNCTIONS ===============================
       
   171 // None.
       
   172 
       
   173 // End of File