mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/src/muscommonstubs.cpp
changeset 22 496ad160a278
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     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 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "muscommonstubs.h"
       
    20 
       
    21 
       
    22 // ---- MEMBER FUNCTIONS OF CMusEngObserverStub --------------------------------
       
    23 
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // 
       
    27 // -----------------------------------------------------------------------------
       
    28 //
       
    29 CMusCommonObserverStub::CMusCommonObserverStub()
       
    30     :iCallEvent( static_cast<RMobileCall::TMobileCallEvent>(-1) )
       
    31     {
       
    32     // NOP
       
    33     }
       
    34         
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // 
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 CMusCommonObserverStub::~CMusCommonObserverStub()
       
    41     {
       
    42     delete iTelNumber;
       
    43     iTelNumber = NULL;
       
    44     }
       
    45 
       
    46 
       
    47 // ----- From MMusCallMonitorObserver ------------------------------------------
       
    48 
       
    49  
       
    50 // -----------------------------------------------------------------------------
       
    51 // 
       
    52 // -----------------------------------------------------------------------------
       
    53 //	
       
    54 void CMusCommonObserverStub::CallConnectedL( const TDesC& aTelNumber,
       
    55 											 TBool aIsSipUri )
       
    56     {
       
    57     delete iTelNumber;
       
    58     iTelNumber = NULL;
       
    59     iTelNumber = aTelNumber.AllocL();
       
    60     iCallConnectedCalled = ETrue;
       
    61     iIsSipUri = aIsSipUri;
       
    62     }
       
    63 
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // 
       
    67 // -----------------------------------------------------------------------------
       
    68 //	    
       
    69 void CMusCommonObserverStub::CallHoldL( const TDesC& aTelNumber,
       
    70 										TBool aIsSipUri )
       
    71     {
       
    72     delete iTelNumber;
       
    73     iTelNumber = NULL;
       
    74     iTelNumber = aTelNumber.AllocL();
       
    75     iCallHoldCalled = ETrue;
       
    76     iIsSipUri = aIsSipUri;
       
    77     }
       
    78     
       
    79 
       
    80 // -----------------------------------------------------------------------------
       
    81 // 
       
    82 // -----------------------------------------------------------------------------
       
    83 //	
       
    84 void CMusCommonObserverStub::ConferenceCallL()
       
    85     {
       
    86     iConferenceCallCalled = ETrue;
       
    87     }
       
    88     
       
    89 
       
    90 // -----------------------------------------------------------------------------
       
    91 // 
       
    92 // -----------------------------------------------------------------------------
       
    93 //	
       
    94 void CMusCommonObserverStub::NoActiveCallL()
       
    95     {
       
    96     iNoActiveCallCalled = ETrue;
       
    97     }
       
    98 
       
    99 
       
   100 
       
   101 
       
   102 // ----- HELPERS ---------------------------------------------------------------
       
   103 
       
   104 
       
   105 // -----------------------------------------------------------------------------
       
   106 // 
       
   107 // -----------------------------------------------------------------------------
       
   108 //	
       
   109 TBool CMusCommonObserverStub::IsReseted()
       
   110     {
       
   111     return ( iCallConnectedCalled == EFalse && 
       
   112              iCallHoldCalled == EFalse &&
       
   113              iConferenceCallCalled == EFalse &&
       
   114              iNoActiveCallCalled == EFalse &&
       
   115              !iTelNumber &&
       
   116              iCallEvent == -1 );
       
   117     }
       
   118 
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // 
       
   122 // -----------------------------------------------------------------------------
       
   123 //	
       
   124 void CMusCommonObserverStub::Reset()
       
   125     {
       
   126     iCallConnectedCalled = EFalse;
       
   127     iCallHoldCalled = EFalse;
       
   128     iConferenceCallCalled = EFalse;
       
   129     iNoActiveCallCalled = EFalse;
       
   130     
       
   131     delete iTelNumber;
       
   132     iTelNumber = NULL;
       
   133     
       
   134     iCallEvent = static_cast<RMobileCall::TMobileCallEvent>(-1);
       
   135     }
       
   136