telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmcalllist.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2006-2009 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 #ifndef CMMCALLLIST_H
       
    21 #define CMMCALLLIST_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <etelmm.h>
       
    25 #include "cmmtsyobjectlist.h"
       
    26 #include <ctsy/serviceapi/mmtsy_defaults.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CMmPhoneTsy;
       
    30 class CMmCallTsy;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  * This class provides the means for the Phone object (CMmPhoneTsy class) to 
       
    36  * keep track of opened calls from all Lines. When ever a Call object is 
       
    37  * opened it should be put on the Phone's CallList. Exception: Call objects 
       
    38  * for incoming calls -> TSY does not want visibility of these objects to 
       
    39  * clients.
       
    40  */
       
    41 NONSHARABLE_CLASS( CMmCallList ) : public CMmTsyObjectList
       
    42     {
       
    43     public: // Constructors and destructor
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          * @param CMmPhoneTsy* aMmPhone: pointer to the Phone
       
    48          * @return created CallList object 
       
    49          */
       
    50         static CMmCallList* NewL( CMmPhoneTsy* aMmPhone );
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         virtual ~CMmCallList();
       
    56 
       
    57     public: // New functions
       
    58 
       
    59         /**
       
    60          * Returns the Call that has the given index in container
       
    61          *          
       
    62          *
       
    63          * @param const TInt aIndex: index of the Call which is to be returned.
       
    64          * @return Call object
       
    65          */
       
    66         virtual CMmCallTsy* GetMmCallByIndex( const TInt aIndex );
       
    67 
       
    68         /**
       
    69          * Returns the Call that has the given index in container
       
    70          *          
       
    71          *
       
    72          * @param const TInt aIndex: index of the Call which is to be returned.
       
    73          * @return Call object
       
    74          */
       
    75         virtual CMmCallTsy* GetMmCallByIndexAndLine( 
       
    76                     const TInt aIndex,
       
    77                     const TName* aLineName );
       
    78 
       
    79         /**
       
    80          * Returns the Call by ID
       
    81          *          
       
    82          *
       
    83          * @param const TInt aCallId: Call ID
       
    84          * @return Call object
       
    85          */
       
    86         virtual CMmCallTsy* GetMmCallById( const TInt aCallId );
       
    87 
       
    88         /**
       
    89          * Returns the Call by name
       
    90          *          
       
    91          *
       
    92          * @param const TName* aName: Name of the Call to be returned
       
    93          * @return Call object
       
    94          */
       
    95         virtual CMmCallTsy* GetMmCallByName( const TName* aName );
       
    96 
       
    97         /**
       
    98          * Returns the Call that has the given mode
       
    99          *          
       
   100          *
       
   101          * @param const  RMobileCall::TMobileService aCallMode: Call mode
       
   102          * @return Call object
       
   103          */
       
   104         virtual CMmCallTsy* GetMmCallByMode( const RMobilePhone::TMobileService aCallMode );
       
   105 
       
   106         /**        
       
   107          * Returns the Call that has the given status
       
   108          *          
       
   109          *
       
   110          * @param RMobileCall::TMobileCallStatus aStatus: Call status
       
   111          * @return Call object
       
   112          */
       
   113         virtual CMmCallTsy* GetMmCallByStatus( RMobileCall::TMobileCallStatus aStatus );
       
   114 
       
   115         /**
       
   116          * Removes the Call that has given ID, from the Call container
       
   117          *          
       
   118          *
       
   119          * @param const TInt aMmCallId: Call ID
       
   120          * @return result success/failure
       
   121          */
       
   122         virtual TInt RemoveMmCallById( const TInt aMmCallId );
       
   123 
       
   124         /**
       
   125          * Removes Calls from Call list opened from a given Line
       
   126          *          
       
   127          *
       
   128          * @param const TName* aName: Line name
       
   129          */
       
   130         virtual void RemoveCallsByLine( const TName* aLineName );
       
   131 
       
   132         /**
       
   133          * This method adds a TSY object to the container
       
   134          *          
       
   135          *
       
   136          * @param CTelObject* aObject: object to be added to the list.
       
   137          * @return status success/failure
       
   138          */        
       
   139         virtual TInt AddObject( CTelObject* aObject );
       
   140         
       
   141     private: // New functions
       
   142 
       
   143         /**
       
   144          * C++ default constructor.
       
   145          */
       
   146         CMmCallList();
       
   147 
       
   148         /**
       
   149          * By default Symbian 2nd phase constructor is private.
       
   150          */
       
   151         void ConstructL();
       
   152 
       
   153     };
       
   154 
       
   155 #endif // CMMCALLLIST_H
       
   156 
       
   157 //  End of file