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