sysstatemgmt/systemstatereferenceplugins/clayer/inc/ssmsimstatusobserver.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SSMSIMSTATUSOBSERVER_H__
       
    17 #define __SSMSIMSTATUSOBSERVER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <ssm/ssmutility.h>
       
    21 #include <ssm/ssmadaptationcli.h>
       
    22 #include <ssm/ssmadaptation.hrh>
       
    23 
       
    24 #include <ssm/startupdomainpskeys.h>
       
    25 
       
    26 /**
       
    27  * Observes the SIM status and publishes the current status to a property value. 
       
    28  * 
       
    29  * @internalComponent
       
    30  */
       
    31 NONSHARABLE_CLASS(CSsmSimStatusObserver) : public CActive, public MSsmUtility
       
    32 {
       
    33 public:
       
    34 	static IMPORT_C MSsmUtility* NewL();
       
    35 	
       
    36 	CSsmSimStatusObserver();
       
    37 	virtual ~CSsmSimStatusObserver();
       
    38 	
       
    39 	// From MSsmUtility
       
    40 	virtual void InitializeL();
       
    41 	virtual void StartL();
       
    42 	virtual void Release();
       
    43 		
       
    44 protected:
       
    45 	// From CActive
       
    46 	virtual void RunL();
       
    47 	virtual void DoCancel();
       
    48 	virtual TInt RunError(TInt aError);
       
    49 	
       
    50 private:
       
    51 	void RequestSimStatusChangeL(TPSSimStatus aSimStatus);
       
    52 private:
       
    53 	RProperty iSimStatusProperty;
       
    54 	RSsmSimAdaptation iSimAdaptation;
       
    55 	
       
    56 	TPckgBuf<TSsmSimEventType> iSimEventPckg;
       
    57 };
       
    58 
       
    59 #endif // __SSMSIMSTATUSOBSERVER_H__