telutils/telephonyservice/src/ccallinformation.cpp
changeset 0 ff3b6d0fd310
child 19 7d48bed6ce0c
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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 
       
    19 #include <e32base.h>
       
    20 
       
    21 #include "ccallinformation.h"
       
    22 #include "ccallinformationimpl.h"
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // C++ constructor.
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 CCallInformation::CCallInformation()
       
    33     {
       
    34         
       
    35     }
       
    36 
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // Symbian second-phase constructor.
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 void CCallInformation::ConstructL()
       
    43     {
       
    44     
       
    45     iImpl = CCallInformationImpl::NewL();    
       
    46     }
       
    47 
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // Two-phased constructor.
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 EXPORT_C CCallInformation* CCallInformation::NewL()
       
    54     {
       
    55     	
       
    56     CCallInformation* self = new (ELeave) CCallInformation( );    
       
    57         
       
    58     CleanupStack::PushL( self );
       
    59     self->ConstructL();
       
    60     CleanupStack::Pop( self );
       
    61     
       
    62     return self;
       
    63     }
       
    64 
       
    65 
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // Destructor
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 CCallInformation::~CCallInformation()
       
    72     {
       
    73         
       
    74     delete iImpl;
       
    75     }
       
    76 
       
    77 
       
    78 
       
    79 // ---------------------------------------------------------------------------
       
    80 // Sets observer for call information changes.
       
    81 // ---------------------------------------------------------------------------
       
    82 //
       
    83 EXPORT_C void CCallInformation::NotifyCallInformationChanges(
       
    84     MCallInformationObserver& aObserver )
       
    85     {
       
    86     iImpl->NotifyCallInformationChanges( aObserver );    
       
    87     return;
       
    88     }
       
    89     
       
    90 // ---------------------------------------------------------------------------
       
    91 // Cancels previously placed NotifyCallInformationChangesL call.
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 EXPORT_C void CCallInformation::CancelNotification( )
       
    95     {
       
    96     iImpl->CancelNotification( ); 
       
    97     return;
       
    98     }
       
    99     
       
   100 // ---------------------------------------------------------------------------
       
   101 // Gets the snapshot of ongoing calls.
       
   102 // ---------------------------------------------------------------------------
       
   103 //
       
   104 EXPORT_C CCallInfoIter& CCallInformation::GetCallsL( ) 
       
   105     {
       
   106     
       
   107     return iImpl->GetCallsL( );
       
   108     
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // Returns information whether call in given state exist. 
       
   113 // ---------------------------------------------------------------------------
       
   114 //
       
   115 EXPORT_C TBool CCallInformation::IsCallInState( CCPCall::TCallState aState ) const
       
   116     {
       
   117     return iImpl->IsCallInState( aState );
       
   118     }
       
   119 
       
   120