mmshplugins/mmshaoplugin/inc/mustsypropertymonitor.h
branchRCL_3
changeset 22 73a1feb507fb
parent 0 f0cf47e981f9
child 23 bc78a40cd63c
equal deleted inserted replaced
21:33a5d2bbf6fc 22:73a1feb507fb
    14 * Description:  Monitor that observes the Line and create call monitor
    14 * Description:  Monitor that observes the Line and create call monitor
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
       
    20 #ifndef MUSTSYPROPERTYMONITOR_H
    19 #ifndef MUSTSYPROPERTYMONITOR_H
    21 #define MUSTSYPROPERTYMONITOR_H
    20 #define MUSTSYPROPERTYMONITOR_H
       
    21 
       
    22 // Enable the below line if Kodiak Ptt has to be monitered
       
    23 // #include "mmusptteventobserver.h"
       
    24 #include <etel.h>
       
    25 #include <etelmm.h>
       
    26 #include <e32base.h>
       
    27 #include <e32property.h>
       
    28 #include <ctsydomainpskeys.h>
    22 
    29 
    23 #include "musunittesting.h"
    30 #include "musunittesting.h"
    24 #include "mussesseioninformationapi.h"
    31 #include "mussesseioninformationapi.h"
    25 #include "mmustsypropertyobserver.h"
    32 #include "mmustsypropertyobserver.h"
    26 // Enable the below line if Kodiak Ptt has to be monitered
    33 #include "mmuscallstateobserver.h"
    27 // #include "mmusptteventobserver.h"
       
    28 #include <etelmm.h>
       
    29 #include <e32base.h>
       
    30 #include <e32property.h>
       
    31 
    34 
    32 class CMusCallMonitor;
    35 class CMusCallMonitor;
       
    36 class CMusVoipCallMonitor;
    33 class CMusPTTCallMonitor;
    37 class CMusPTTCallMonitor;
    34 class CMusCallConferenceMonitor;
    38 class CMusCallConferenceMonitor;
    35 class CMusClirMonitor;
       
    36 
    39 
    37 /**
    40 /**
    38  * This class monitors the line event,if call is connected
    41  * This class monitors the line event,if call is connected
    39  * it creats new call event monitor . If call is disconnected
    42  * it creats new call event monitor . If call is disconnected
    40  * it removes the call monitor . Also it responds to Ptt Events.
    43  * it removes the call monitor . Also it responds to Ptt Events.
    51     public: // constructors and destructor
    54     public: // constructors and destructor
    52 
    55 
    53         /**
    56         /**
    54          * Two-phased constructor.
    57          * Two-phased constructor.
    55          */
    58          */
    56         static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone );
    59         static CMusTsyPropertyMonitor* NewL( RMobilePhone& aPhone, 
       
    60                                              MMusCallStateObserver& aCallStateObserver );
    57 
    61 
    58         /**
    62         /**
    59          * Destructor.
    63          * Destructor.
    60          */
    64          */
    61         ~CMusTsyPropertyMonitor();
    65         ~CMusTsyPropertyMonitor();
    68         
    72         
    69         /**
    73         /**
    70          * Function from MMusTsyPropertyObserver
    74          * Function from MMusTsyPropertyObserver
    71          */
    75          */
    72         void NotifyCallStateChanged(NMusSessionInformationApi::TMusCallEvent aVal, TName& aCallName);
    76         void NotifyCallStateChanged(NMusSessionInformationApi::TMusCallEvent aVal, TName& aCallName);
       
    77         
       
    78         /**
       
    79          * Checks from the corresponding monitors if the data is ready.
       
    80          */
       
    81         TBool IsDataReadyL();
    73 
    82 
    74     private:
    83     private:
    75 
    84 
    76         /**
    85         /**
    77          * C++ constructor.
    86          * C++ constructor.
    78          */
    87          */
    79         CMusTsyPropertyMonitor( RMobilePhone& aPhone );
    88         CMusTsyPropertyMonitor( RMobilePhone& aPhone, MMusCallStateObserver& aCallStateObserve );
    80 
    89 
    81         /**
    90         /**
    82          * Symbian 2nd-phase constructor.
    91          * Symbian 2nd-phase constructor.
    83          */
    92          */
    84         void ConstructL();
    93         void ConstructL();
    85 
    94         
    86 
    95 
    87     private: // functions from base class CActive
    96     private: // functions from base class CActive
    88 
    97 
    89         /**
    98         /**
    90          * Handles an active object's request completion event.
    99          * Handles an active object's request completion event.
   133         void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);          
   142         void SetStateL(NMusSessionInformationApi::TMusCallEvent aVal);          
   134 
   143 
   135         /**
   144         /**
   136           * Add / Remove Call Monitors based on Mus criteria          
   145           * Add / Remove Call Monitors based on Mus criteria          
   137           */
   146           */
   138         void MonitorCallL();
   147         void MonitorCallL(const TPSCTsyCallState& aCallState,
       
   148                 const TPSCTsyCallType& aCallType);
       
   149         
       
   150         /**
       
   151           * Add / Remove Call Monitors based on Mus criteria          
       
   152           */
       
   153         void MonitorCSCallL();
       
   154         
       
   155     private: // Voip related 
       
   156         /*
       
   157          * If the call Monitor doesnt exist then it creats one new
       
   158          * CMusCallMonitor class and add into array. 
       
   159          * Leavs if objects creation fails.
       
   160          */
       
   161         void AddVoipCallMonitorL( TName& aCallName );
       
   162 
       
   163         /*
       
   164          * It removs the CMusCallMonitor object from array
       
   165          * based on the call name.         
       
   166          */
       
   167 
       
   168         void RemoveVoipCallMonitor( TName& aCallName );
       
   169         
       
   170         /**
       
   171          * Add / Remove Call Monitors based on Mus criteria          
       
   172          */
       
   173        void MonitorVoipCallL(const TPSCTsyCallState& aCallState);
       
   174 
       
   175         /**
       
   176          * Removes and reset the voip call monitor array
       
   177          */
       
   178        void RemoveAllVoipCallMonitors( );
       
   179        
       
   180         /**
       
   181          * Checks multimediasharing call criteria's
       
   182          */
       
   183        void CheckCallCriteriaL();
       
   184 
   139 
   185 
   140          /**
   186          /**
   141           * Delete all call monitor        
   187           * Delete all call monitor        
   142           */
   188           */
   143         void RemoveAllCallMonitor();
   189         void RemoveAllCallMonitor();
   182          * Array of Call Monitors.
   228          * Array of Call Monitors.
   183          */
   229          */
   184         RPointerArray<CMusCallMonitor> iCallMonitorArray;
   230         RPointerArray<CMusCallMonitor> iCallMonitorArray;
   185 
   231 
   186         /**
   232         /**
       
   233          * Array of voip Call Monitors.
       
   234          */
       
   235         RPointerArray<CMusVoipCallMonitor> iVoipCallMonitorArray;
       
   236         
       
   237         /**
   187          * Conference call monitor, owned.
   238          * Conference call monitor, owned.
   188          */
   239          */
   189         CMusCallConferenceMonitor* iConferenceMonitor;
   240         CMusCallConferenceMonitor* iConferenceMonitor;
   190         
   241         
   191         /**
   242         /**
   192          * Instance of RProperty.
   243          * Instance of RProperty.
   193          */
   244          */
   194         RProperty iPropertyEvent;
   245         RProperty iPropertyEvent;  
   195         
   246         
   196         CMusClirMonitor* iClirMonitor;
   247         /*
   197         
   248          * Reference of callstate observer not owned
       
   249          */
       
   250         MMusCallStateObserver& iCallStateObserver;
   198 
   251 
   199         MUS_UNITTEST( UT_CMusTsyPropertyMonitor )
   252         MUS_UNITTEST( UT_CMusTsyPropertyMonitor )
   200 
   253         MUS_UNITTEST( UT_CMusAoPlugin )
       
   254         
   201     };
   255     };
   202 
   256 
   203 #endif // MUSTSYPROPERTYMONITOR_H
   257 #endif // MUSTSYPROPERTYMONITOR_H