telephonyserverplugins/common_tsy/commontsy/inc/mmtsy/cmmvoicelinetsy.h
changeset 0 3553901f7fa8
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 CMMVOICELINETSY_H
       
    21 #define CMMVOICELINETSY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "cmmlinetsy.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CMmCallExtInterface;
       
    28 class MTelephonyAudioControl;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33  *  CMmLineTsy implements mode dependent Voice Line based functionality 
       
    34  *  (defined by Symbian)
       
    35  */
       
    36 NONSHARABLE_CLASS( CMmVoiceLineTsy ) : public CMmLineTsy
       
    37     {
       
    38     public: // Enumerations
       
    39 
       
    40         /** Enumeration for Swap status */
       
    41         enum TSwapStatus
       
    42             {
       
    43             EStatusSwapNotRequested,
       
    44             EWaitingHoldAndResumeOk,
       
    45             EWaitingHoldOk,
       
    46             EWaitingResumeOk
       
    47             };
       
    48 
       
    49     public:  // Constructors and destructor
       
    50         
       
    51         /**
       
    52          * Two-phased constructor.
       
    53          *          
       
    54          *
       
    55          * @param aMmPhone Pointer to the Phone object
       
    56          * @param aMode Line mode
       
    57          * @param aName Name of this line
       
    58          * @param aMessageManager Pointer to the MessageManager
       
    59          * @param aTelephonyAudioControl Pointer Telephony Audio Control    
       
    60          * @return Created line object 
       
    61          */
       
    62         static CMmVoiceLineTsy* NewL( CMmPhoneTsy* aMmPhone, 
       
    63             RMobilePhone::TMobileService aMode, const TDesC& aName, 
       
    64             CMmMessageManagerBase* aMessageManager,
       
    65             MTelephonyAudioControl* aTelephonyAudioControl );
       
    66         
       
    67         /**
       
    68          * Destructor.
       
    69          */
       
    70         ~CMmVoiceLineTsy();
       
    71 
       
    72     public: // New functions
       
    73         
       
    74         /**
       
    75          * Used for determining if Swap request is ready to be completed
       
    76          *          
       
    77          *
       
    78          * @param aCallStatus Status of the latest status indication
       
    79          * @return Boolean describing if Swap is ready or not
       
    80          */
       
    81         TBool IsSwapReady( RMobileCall::TMobileCallStatus aCallStatus );
       
    82 
       
    83         /**
       
    84          * Used for setting Swap status
       
    85          *          
       
    86          *
       
    87          * @param aSwapStatus New status of swap
       
    88          */
       
    89         void SetSwapStatus( CMmVoiceLineTsy::TSwapStatus aSwapStatus );
       
    90 
       
    91         /**
       
    92          * Used for retrieving Swap status of this line
       
    93          *          
       
    94          *
       
    95          * @return Current status of swap
       
    96          */
       
    97         CMmVoiceLineTsy::TSwapStatus SwapStatus() const;
       
    98 
       
    99     public: // Functions from base classes
       
   100 
       
   101         /**
       
   102          * This method is used for notifying a client about an incoming call.
       
   103          *          
       
   104          *
       
   105          * @param aDataPackage Package containing information about the 
       
   106          * incoming call
       
   107          */
       
   108         void CompleteNotifyIncomingCall( CMmDataPackage* aDataPackage );
       
   109 
       
   110         /**
       
   111          * This method is used for notifying a line of a call 
       
   112          * entering Dialling state
       
   113          *          
       
   114          *
       
   115          * @param aDataPackage Package containing information about the call
       
   116          */
       
   117         void CompleteNotifyDiallingStatus( CMmDataPackage* aDataPackage );
       
   118 
       
   119         /**
       
   120          * This function creates a new name for a call and opens a new call.
       
   121          *          
       
   122          *
       
   123          * @param aName Name of the new call.
       
   124          * @return Call object that was opened.
       
   125          */
       
   126         CTelObject* OpenNewObjectL( TDes& aNewName );
       
   127         
       
   128     private:  // Constructors and destructor
       
   129 
       
   130         /**
       
   131          * C++ default constructor.
       
   132          */
       
   133         CMmVoiceLineTsy();
       
   134 
       
   135         /**
       
   136          * By default Symbian 2nd phase constructor is private.
       
   137          */
       
   138         void ConstructL();
       
   139 
       
   140     private:  // Functions from base classes
       
   141 
       
   142         /**
       
   143          * Creates a call object for the call that has been initiated bypassing 
       
   144          * TSY
       
   145          *          
       
   146          *
       
   147          * @param aCallId Call id of the new call
       
   148          * @param aCallMode Call mode
       
   149          * @param aCallStatus Call status
       
   150          * @return Pointer to created call object
       
   151          */
       
   152         CMmCallTsy* CreateGhostCallObject( TInt aCallId, 
       
   153             RMobilePhone::TMobileService /*aCallMode*/,
       
   154             RMobileCall::TMobileCallStatus aCallStatus );
       
   155       
       
   156         /**
       
   157          * Initialises miscellaneous internal attributes
       
   158          *          
       
   159          *
       
   160          */
       
   161         void InitInternalAttributesL();
       
   162 
       
   163         /**
       
   164          * Creates and stores a Call object for incoming call
       
   165          *          
       
   166          *
       
   167          * @return Success/failure value
       
   168          */
       
   169         TInt CreateCallObjectForIncomingCall();
       
   170 
       
   171     private:    // Data
       
   172 
       
   173         /**
       
   174          * Swap status
       
   175          */         
       
   176         TSwapStatus iSwapStatus;
       
   177         
       
   178 	    /**
       
   179 	     * Pointer to the Telephony Audio Control instance
       
   180 	     */
       
   181 	    MTelephonyAudioControl* iTelephonyAudioControl;
       
   182 
       
   183     };
       
   184 
       
   185 #endif      // CMMVOICELINETSY_H
       
   186             
       
   187 // End of File