telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmlinelist.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 CMMLINELIST_H
       
    21 #define CMMLINELIST_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "cmmtsyobjectlist.h"
       
    25 #include "MmTsy_conf.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CMmPhoneTsy;
       
    29 class CMmLineTsy;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * This class provides the means for the Phone object (CMmPhoneTsy class) to 
       
    35  * keep track of opened Lines. When a Line object is opened it should be put 
       
    36  * on the Phone's LineList.
       
    37  */
       
    38 NONSHARABLE_CLASS( CMmLineList ) : public CMmTsyObjectList
       
    39     {
       
    40     public: // Enumerations
       
    41     
       
    42          /** Lines */ 
       
    43          enum TLines
       
    44             {
       
    45             ELine0Voice1,
       
    46             ELine1Voice2,
       
    47             ELine2Data,
       
    48             ELine3Fax
       
    49             };
       
    50 
       
    51     public:     // Constructors and destructor
       
    52         /**
       
    53          * Two-phased constructor.
       
    54          * @param CMmPhoneTsy* aMmPhone: pointer to the Phone
       
    55          * @return created CallList object 
       
    56          */        
       
    57         static CMmLineList* NewL( CMmPhoneTsy* aMmPhone );
       
    58 
       
    59         /**
       
    60          * Destructor.
       
    61          */
       
    62         virtual ~CMmLineList();
       
    63 
       
    64         // New functions
       
    65 
       
    66         /**
       
    67          * Returns the Line that has the given mode
       
    68          *          
       
    69          *
       
    70          * @param const TUint8 aLineMode: Line mode
       
    71          * @return Line object
       
    72          */
       
    73         CMmLineTsy* GetMmLineByMode( const RMobilePhone::TMobileService 
       
    74         	aLineMode ) const;
       
    75 
       
    76         /**
       
    77          * Returns the Line that has the given index in container
       
    78          *          
       
    79          *
       
    80          * @param const TInt aIndex: index of the Line which is to be returned.
       
    81          * @return Call object
       
    82          */
       
    83         CMmLineTsy* GetMmLineByIndex( const TInt aIndex ); 
       
    84 
       
    85 		    /**
       
    86          * This method adds a TSY object to the container
       
    87          *          
       
    88          *
       
    89          * @param CTelObject* aObject: object to be added to the list.
       
    90 		     * @param TName name: name of the line which is going to be added
       
    91          * @return status success/failure
       
    92          */  
       
    93 		    TInt AddLineObject ( CTelObject* aTsyObject, const TName& aLineName );
       
    94 
       
    95         /**
       
    96          * This method removes a named line from the container
       
    97          *          
       
    98          *
       
    99          * @param const TName& aLineName: name of the line to be marked as removed
       
   100          * @return status success/failure
       
   101          */
       
   102         TInt RemoveLine( const TName& aLineName);
       
   103 
       
   104 		    /**
       
   105          * Delete Call Container
       
   106          *          
       
   107          *
       
   108          */  
       
   109 		void DeleteContainer();
       
   110 
       
   111 		    /**
       
   112 		     * Returns the object that has the given index in container
       
   113 		     * 		     
       
   114          *
       
   115          * @param const TUint aIndex: index of the object which is to be returned.
       
   116          * @return Object to be returned
       
   117          */
       
   118 		    CBase* GetObjectByIndex( const TInt aIndex ) const;
       
   119 
       
   120     private:     // Constructors and destructor
       
   121 
       
   122         /**
       
   123          * C++ default constructor.
       
   124          */
       
   125         CMmLineList();
       
   126 
       
   127         /**
       
   128          * By default Symbian 2nd phase constructor is private.
       
   129          */
       
   130         void ConstructL();
       
   131 
       
   132     private:    // Data
       
   133     
       
   134 		    /**
       
   135          * Boolean array which permits to check if line is in use or not.
       
   136          */
       
   137         TBool iIsLineInUse[ KMmTsyNumOfSupportedLines ];
       
   138         
       
   139 		    /**
       
   140          * None
       
   141          */
       
   142         TBool iInitialised;
       
   143 
       
   144     };
       
   145 
       
   146 #endif // CMMLINELIST_H
       
   147 
       
   148 //  End of file