sipplugins/sippsystemstatemonitor/inc/sipvpnmonitorao.h
branchRCL_3
changeset 2 1e1cc61f56c3
equal deleted inserted replaced
1:dd3853b8dc3f 2:1e1cc61f56c3
       
     1 /*
       
     2 * Copyright (c) 2010 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 : P&S key monitor for communication between SIP Profile 
       
    15 *               server and VPN client
       
    16 * Name        : sipvpnmonitorao.cpp
       
    17 * Part of     : Sip System State Monitor
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 #ifndef SIPVPNMONITORAO_H
       
    23 #define SIPVPNMONITORAO_H
       
    24 
       
    25 // INCLUDES
       
    26 #include <e32base.h>
       
    27 #include <e32std.h>
       
    28 #include <e32property.h>
       
    29 #include <e32cmn.h>
       
    30 #include <sipsystemstatemonitor.h>
       
    31 
       
    32 class CSipVpnMonitorAo : public CActive
       
    33     {
       
    34     public: // Constructors and destructor
       
    35         static CSipVpnMonitorAo* NewL();    
       
    36         ~CSipVpnMonitorAo();
       
    37         
       
    38     private: // Constructors
       
    39         CSipVpnMonitorAo();
       
    40         void ConstructL();
       
    41         
       
    42     public: // New Functions
       
    43         CSipSystemStateMonitor::TVpnState State() const;
       
    44         void AddObserverL( MSipSystemStateObserver& aObserver );
       
    45         void RemoveObserver( MSipSystemStateObserver& aObserver );
       
    46         void EventProcessingCompleted(MSipSystemStateObserver& aObserver);
       
    47         TBool MappedState(TInt aState);
       
    48         static TInt TimerExpired(TAny* aSelf);
       
    49         
       
    50     private:
       
    51         void NotifyObservers();
       
    52         void EventProcessingCompleted();
       
    53     private: // From CActive
       
    54         void RunL();
       
    55         TInt RunError( TInt aError );
       
    56         void DoCancel();
       
    57 
       
    58     private: // Data
       
    59         TInt                                        iCount;
       
    60         // Observers not owned
       
    61         RPointerArray<MSipSystemStateObserver> iObservers;
       
    62         RProperty iProperty;
       
    63         CSipSystemStateMonitor::TVpnState iState;
       
    64         CPeriodic* iGuardTimer;
       
    65 		        
       
    66     private: // For testing purposes  
       
    67         friend class CSipVpnMonitorAoTestApp;
       
    68     };
       
    69 #endif /* SIPVPNMONITORAO_H */