sipplugins/sippsystemstatemonitor/inc/sipsystemstatemonitorimpl.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:44:11 +0200
branchRCL_3
changeset 9 1e1cc61f56c3
parent 0 307788aac0a8
child 12 c2e8c8b73582
permissions -rw-r--r--
Revision: 201007 Kit: 201008

/*
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  
*
*/

#ifndef CSIPSYSTEMSTATEMONITORIMPL_H
#define CSIPSYSTEMSTATEMONITORIMPL_H

// INCLUDES
#include "sipsystemstatemonitorao.h"
#include "sipsnapavailabilitymonitor.h"
#include "MSystemStateConnUsagePermissionObserver.h"
#include <sipsystemstateobserver.h>
#include <sipsystemstatemonitor.h>

// FORWARD DECLARATIONS
class CSystemStateConnUsagePermissionMonitor;
class CSipDeviceStateAware;
class CSipRfsMonitorAo;
class CSipVpnMonitorAo;

// CLASS DECLARATION
/**
* The default implementation for Sip System State Monitor.
*
* @lib sipsystemstatemonitor.lib
*/
class CSipSystemStateMonitorImpl : public CSipSystemStateMonitor
    {
    public: // Constructors and destructor

        static CSipSystemStateMonitorImpl* NewL();
        ~CSipSystemStateMonitorImpl();
        
    public: // From CSipSystemStateMonitor

		CSipSystemStateMonitor::TSystemState State() const;

        void StartMonitoringL( TSystemVariable aVariable,
                               TInt aObjectId,
                               MSipSystemStateObserver& aObserver );

        void StopMonitoring( TSystemVariable aVariable, 
                             TInt aObjectId,
                             MSipSystemStateObserver& aObserver );

        TInt CurrentValue( TSystemVariable aVariable,
                           TInt aObjectId ) const;
        
        void EventProcessingCompleted( TSystemVariable aVariable,
                            TInt aObjectId,
                            MSipSystemStateObserver& aObserver);

    private: // Constructors

        CSipSystemStateMonitorImpl();
        void ConstructL();

    private: // Private functions
    
        CSipSnapAvailabilityMonitor* FindSnapMonitorById(
            TInt aSnapId ) const;

    private: // Data
    
        CSipSystemStateMonitorAo* iMonitorAo;
        RPointerArray<CSipSnapAvailabilityMonitor> iSnapMonitors;
        CSystemStateConnUsagePermissionMonitor* iUsagePermissionMonitor;
        CSipRfsMonitorAo* iRfsMonitor;
		CSipDeviceStateAware* iSipDeviceAwareObject;
		
        // P&S monitor for SIP / VPN communication
        CSipVpnMonitorAo* iVpnMonitor;
		    
    private: // For testing purposes
    
        friend class CSipSystemStateMonitorImplTest;
    };
    

#endif // CSIPSYSTEMSTATEMONITORIMPL_H