mmshplugins/mmshaoplugin/tsrc/ut_aoplugin/Stubs/inc/ccallinformation.h
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 
       
    19 #ifndef C_CALLINFORMATION_H
       
    20 #define C_CALLINFORMATION_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "callinformation.h"
       
    24 #include "mcall.h"
       
    25 
       
    26 
       
    27 // forward declarations 
       
    28 class MCallInformationObserver;
       
    29 class CCallInformationImpl;
       
    30 class CCallInfoIter;
       
    31 
       
    32 
       
    33 /**
       
    34  *  Class to be used for receiving information about ongoing calls. 
       
    35  *
       
    36  *  @code
       
    37  *  // create the CCallInformation instance e.g. when the client component is created
       
    38  *  iCallInfo = CCallInformation::NewL(); 
       
    39  *  iCallInfo->NotifyCallInformationChanges(*iObserver);
       
    40  *  
       
    41  *  // and use it when needed
       
    42  *  CCallInfoIter& iter = iCallInfo->GetCallsL();    
       
    43  *  @endcode
       
    44  *
       
    45  *  @lib telephonyservice.lib
       
    46  *  @since S60 v5.1 
       
    47  */
       
    48 NONSHARABLE_CLASS( CCallInformation ) : public CBase
       
    49     {
       
    50 
       
    51 public:
       
    52 
       
    53     /**
       
    54      * Two-phased constructor.          
       
    55      */
       
    56     IMPORT_C static CCallInformation* NewL();
       
    57     
       
    58 
       
    59     /**
       
    60     * Destructor.
       
    61     */
       
    62     virtual ~CCallInformation();
       
    63 
       
    64     /**
       
    65      * Allows a client to be notified when there are changes in current calls.
       
    66      * There can be only one observer per CCallInformation instance.
       
    67      *
       
    68      * @since S60 v5.1 
       
    69      * @param aObserver Observer for notifications.
       
    70      */
       
    71      IMPORT_C void NotifyCallInformationChanges( MCallInformationObserver& aObserver );
       
    72     
       
    73     /**
       
    74      * Used to cancel previously placed NotifyCallInformationChanges call.
       
    75      *
       
    76      * @since S60 v5.1      
       
    77      */
       
    78      IMPORT_C void CancelNotification();
       
    79      
       
    80      /**
       
    81      * Gets the snapshot of ongoing calls.
       
    82      *
       
    83      * @since S60 v5.1      
       
    84      * @return Ongoing calls.
       
    85      */
       
    86      IMPORT_C CCallInfoIter& GetCallsL( );
       
    87 			
       
    88 	 /**
       
    89      * Get calls by given state. 
       
    90      *
       
    91      * @since S60 v5.1 
       
    92      * @param aState Specifies a call state that is used as a search key.
       
    93      * @return Calls in state aSate, e.g. in case of conference call several 
       
    94      *         calls have the same state.
       
    95      */     
       
    96      IMPORT_C CCallInfoIter& GetCallsL( CCPCall::TCallState aState );   
       
    97      
       
    98      
       
    99 private:
       
   100 
       
   101     CCallInformation();
       
   102 
       
   103     void ConstructL();
       
   104 
       
   105 
       
   106 private: // data    
       
   107     
       
   108 	CCallInformationImpl* iImpl;	
       
   109 	
       
   110 	// Helper Data Needed by STUB Implemenation.
       
   111 	CCallInfoIter* iInfoIter;
       
   112 	CCallInfos* iInfos;
       
   113     };
       
   114 
       
   115 
       
   116 #endif // C_CALLINFORMATION_H