emailservices/nmailagent/inc/ssastartupwatcher.h
changeset 23 2dc6caa42ec3
equal deleted inserted replaced
20:ecc8def7944a 23:2dc6caa42ec3
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __SSASTARTUPWATCHER_H__
       
    19 #define __SSASTARTUPWATCHER_H__
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <startup.hrh>          // For start-up states
       
    23 #include <startupdomaindefs.h>  // For start-up domains
       
    24 #include <domaindefs.h>
       
    25 #include <domainmember.h>       // For CDmDomain
       
    26 
       
    27 typedef void (*TStartupCallBack)(TInt aValue);
       
    28 
       
    29 /*!
       
    30     This class interacts with the Domain Manager to be kept aware of the current
       
    31     system startup state.
       
    32 */
       
    33 class CSSAStartupWatcher : public CDmDomain
       
    34 {
       
    35 
       
    36 public:
       
    37 	static CSSAStartupWatcher* NewL(TStartupCallBack aCallback);
       
    38 	static CSSAStartupWatcher* New(TStartupCallBack aCallback);
       
    39 	virtual ~CSSAStartupWatcher();
       
    40 
       
    41 private:
       
    42 	CSSAStartupWatcher(TDmHierarchyId aHierarchyId, 
       
    43 	    TDmDomainId aDomainId,TStartupCallBack aCallback);
       
    44 	void ConstructL();
       
    45 	
       
    46 	virtual void RunL();                   // from CActive
       
    47 	
       
    48 	void NotifyState(TInt aValue); 
       
    49 
       
    50 private:
       
    51 	
       
    52 	TStartupCallBack iCallback; 
       
    53 };
       
    54 
       
    55 #endif // __SSASTARTUPWATCHER_H__