sipplugins/sippsystemstatemonitor/inc/siprfsmonitorao.h
changeset 0 307788aac0a8
child 9 1e1cc61f56c3
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2008 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 #ifndef SIPRFSMONITORAO_H
       
    19 #define SIPRFSMONITORAO_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <e32std.h>
       
    24 #include <e32property.h>
       
    25 #include <e32cmn.h>
       
    26 #include <sipsystemstatemonitor.h>
       
    27 
       
    28 class CSipRfsMonitorAo : public CActive
       
    29     {
       
    30     public: // Constructors and destructor
       
    31         static CSipRfsMonitorAo* NewL();    
       
    32         ~CSipRfsMonitorAo();
       
    33         
       
    34     private: // Constructors
       
    35         CSipRfsMonitorAo();
       
    36         void ConstructL ();
       
    37         
       
    38     public: // New Functions
       
    39         CSipSystemStateMonitor::TRfsState State() const;
       
    40         void AddObserverL( MSipSystemStateObserver& aObserver );
       
    41         void RemoveObserver( MSipSystemStateObserver& aObserver );
       
    42         void EventProcessingCompleted(MSipSystemStateObserver& aObserver);
       
    43         TBool MappedState(TInt aState);
       
    44 		void EventProcessingCompleted();
       
    45         static TInt TimerExpired(TAny* aSelf);
       
    46         
       
    47     private:
       
    48         void NotifyObservers();
       
    49         
       
    50     private: // From CActive
       
    51         void RunL();
       
    52         TInt RunError( TInt aError );
       
    53         void DoCancel();
       
    54 
       
    55     private: // Data
       
    56         // Observers not owned
       
    57         TInt                                        iCount;
       
    58         RPointerArray<MSipSystemStateObserver>      iObservers;
       
    59         RProperty                                   iProperty;
       
    60         CSipSystemStateMonitor::TRfsState           iState;
       
    61         CPeriodic*                                  iGuardTimer;
       
    62         
       
    63     private: // For testing purposes  
       
    64         friend class CSipRfsMonitorAoTestApp;
       
    65     };
       
    66 #endif /* SIPRFSMONITORAO_H */