mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/src/ccallinformation_stub.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2007-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:  Provides information about ongoing calls.
       
    15 *
       
    16 */
       
    17 
       
    18 #include "ccallinformation.h"
       
    19 #include "callinformation.h"
       
    20 #include "ccallinfoiter.h"
       
    21 
       
    22 // ---------------------------------------------------------------------------
       
    23 // C++ constructor.
       
    24 // ---------------------------------------------------------------------------
       
    25 //
       
    26 CCallInformation::CCallInformation()
       
    27     {
       
    28     }
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // Symbian second-phase constructor.
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 void CCallInformation::ConstructL()
       
    35     {
       
    36     //iImpl = CCallInformationImpl::NewL();
       
    37     
       
    38     iInfos = CCallInfos::NewL();
       
    39     iInfoIter = CCallInfoIter::NewL( *iInfos );
       
    40     }
       
    41 
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // Two-phased constructor.
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C CCallInformation* CCallInformation::NewL()
       
    48     {
       
    49     CCallInformation* self = new (ELeave) CCallInformation( );    
       
    50     CleanupStack::PushL( self );
       
    51     self->ConstructL();
       
    52     CleanupStack::Pop( self );
       
    53     return self;
       
    54     }
       
    55 
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // Destructor
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 CCallInformation::~CCallInformation()
       
    62     {
       
    63     //delete iImpl;
       
    64     if ( iInfos )
       
    65         {
       
    66         delete iInfos;
       
    67         iInfos = NULL;
       
    68         }
       
    69     if ( iInfoIter )
       
    70         {
       
    71         delete iInfoIter;
       
    72         iInfoIter = NULL;
       
    73         }
       
    74     }
       
    75 
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // Get calls by given state. 
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 
       
    82 EXPORT_C CCallInfoIter& CCallInformation::GetCallsL( CCPCall::TCallState aState )
       
    83     {
       
    84     //return iImpl->GetCallsL( aState );
       
    85     // Add dummy data to call infos
       
    86     iInfos->AddCallInfosL();
       
    87     return *iInfoIter;
       
    88     }            
       
    89 
       
    90 // End of File.