lowlevellibsandfws/apputils/inc/BACNTF.H
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 1997-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 // Started by BLB, October 1996
       
    17 #if !defined(__BACNTF_H__)
       
    18 #define __BACNTF_H__
       
    19 
       
    20 #include <e32base.h>
       
    21 
       
    22 
       
    23 class CEnvironmentChangeNotifier : public CActive
       
    24 /** Environment change notifier. This is an active object and can be used to handle 
       
    25 environment change events. 
       
    26 @publishedAll
       
    27 @released
       
    28 */
       
    29 	{
       
    30 public:
       
    31 	IMPORT_C static CEnvironmentChangeNotifier* NewL(TInt aPriority,const TCallBack& aCallBack);
       
    32 	IMPORT_C ~CEnvironmentChangeNotifier();
       
    33 	IMPORT_C void Start();
       
    34 	IMPORT_C TInt Set(const TCallBack& aCallBack);
       
    35 	inline TInt Change() const;
       
    36 private:
       
    37 	inline CEnvironmentChangeNotifier(TInt aPriority);
       
    38 	void RunL();
       
    39 	void DoCancel();
       
    40 private:
       
    41 	TInt iChange;
       
    42 	TCallBack iCallBack;
       
    43 	RChangeNotifier iChangeNotifier;
       
    44 	};
       
    45 
       
    46 
       
    47 
       
    48 inline TInt CEnvironmentChangeNotifier::Change() const
       
    49 	/** Returns the last set of change events.
       
    50 	
       
    51 	If the last outstanding request completed normally, the function returns a 
       
    52 	bit pattern where each bit value corresponds to one of the enumerators defined 
       
    53 	by TChanges. A set bit indicates that the corresponding change event occurred.
       
    54 	
       
    55 	For example, if the bit value TChanges::EChangesMidnightCrossover is set, 
       
    56 	then the system time has passed midnight.
       
    57 	
       
    58 	@return A set of bits consisting of one or more of the values defined by TChanges, 
       
    59 	or KErrCancel if the last outstanding request was cancelled. 
       
    60 	@see TChanges */
       
    61 	{return iChange;}
       
    62 
       
    63 #endif
       
    64 
       
    65