mmshplugins/mmshaoplugin/inc/muscallmonitor.h
changeset 0 f0cf47e981f9
child 22 73a1feb507fb
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Monitors the multimediasharing property.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MUSAOCALLMONITOR_H
       
    21 #define MUSAOCALLMONITOR_H
       
    22 
       
    23 #include "musunittesting.h"
       
    24 #include "mustsypropertymonitor.h"
       
    25 #include <etelmm.h>
       
    26 #include <e32base.h>
       
    27 
       
    28 class CMusCallConferenceMonitor;
       
    29 class CMusCallStatusMonitor;
       
    30 class CMusCallEventMonitor;
       
    31 
       
    32 /**
       
    33  * Monitor, which observes status of current cs call  
       
    34  *
       
    35  * @lib musaoplugin.dll
       
    36  */
       
    37 class CMusCallMonitor : public CBase
       
    38     {
       
    39 
       
    40     public: // constructors and destructor
       
    41 
       
    42         /**
       
    43          * Two-phased constructor. Leaves on failure.
       
    44          */
       
    45         static CMusCallMonitor* NewL(  TName& aCallName,TBool aPttCallExist );
       
    46 
       
    47         /**
       
    48          * Destructor.
       
    49          */
       
    50         ~CMusCallMonitor();
       
    51 
       
    52     public:
       
    53 
       
    54         /**
       
    55          * Starts to monitor call status,event and conference.
       
    56          */
       
    57         void StartMonitorL( RMobileLine& aLine, MMusTsyPropertyObserver& aObserver );
       
    58 
       
    59         /**
       
    60          * Stops monitoring call status,event and conference.
       
    61          */
       
    62         void StopMonitor();
       
    63 
       
    64         /**
       
    65          * Compares the name of the call.
       
    66          */
       
    67         TBool IsEqual(TName& aName);
       
    68 
       
    69         /**
       
    70          * Returns the CallName.
       
    71          */
       
    72         const TName Name();
       
    73 
       
    74         /**
       
    75          * ETrue if monitoring stared already. Else otherwise
       
    76          */
       
    77         TBool IsMonitored();
       
    78 
       
    79         /*
       
    80          * Returns the name of last call occured
       
    81          */
       
    82         TName LastCallNameL(RMobileLine& aLine);
       
    83                 
       
    84         /**
       
    85          * Call CMusCallMonitorBase::SetStateL to set 
       
    86          * state of call status monitor and
       
    87          * state of call event monitor
       
    88          */
       
    89         void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);
       
    90         
       
    91         
       
    92     private:
       
    93 
       
    94         /**
       
    95          * C++ constructor.
       
    96          */
       
    97         CMusCallMonitor(  TBool aPttCallExist  );
       
    98 
       
    99         /**
       
   100          * Symbian 2nd-phase constructor.
       
   101          */
       
   102         void ConstructL( TName& aCallName);
       
   103 
       
   104         /*
       
   105          * Sets the call count based on callmonitors.
       
   106          * ETrue to increase. EFalse to decrease. 
       
   107          */        
       
   108         void SetCallCountL(TBool aIncrease);
       
   109 
       
   110     private:            
       
   111 
       
   112         /**
       
   113          * Call status monitor, owned.
       
   114          */
       
   115         CMusCallStatusMonitor* iCallStatusMonitor;
       
   116 
       
   117         /**
       
   118          * Call event monitor, owned.
       
   119          */
       
   120         CMusCallEventMonitor* iCallEventMonitor;
       
   121 
       
   122         /**
       
   123          * RMobilePhone handle.
       
   124          */
       
   125         RMobileCall iCall;
       
   126 
       
   127         /**
       
   128          * Name of the call.
       
   129          */
       
   130         TName iCallName;
       
   131 
       
   132         /**
       
   133          * Existence of Ptt call when this cs call started.
       
   134          */
       
   135         TBool iPttCallExist;
       
   136 
       
   137         MUS_UNITTEST( UT_CMusCallMonitor )
       
   138 
       
   139     };
       
   140 
       
   141 #endif // MUSAOCALLMONITOR_H