1.1 --- a/epoc32/include/bacntf.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/bacntf.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,63 @@
1.4 -bacntf.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +// Started by BLB, October 1996
1.21 +#if !defined(__BACNTF_H__)
1.22 +#define __BACNTF_H__
1.23 +
1.24 +#include <e32base.h>
1.25 +
1.26 +
1.27 +class CEnvironmentChangeNotifier : public CActive
1.28 +/** Environment change notifier. This is an active object and can be used to handle
1.29 +environment change events.
1.30 +@publishedAll
1.31 +@released
1.32 +*/
1.33 + {
1.34 +public:
1.35 + IMPORT_C static CEnvironmentChangeNotifier* NewL(TInt aPriority,const TCallBack& aCallBack);
1.36 + IMPORT_C ~CEnvironmentChangeNotifier();
1.37 + IMPORT_C void Start();
1.38 + IMPORT_C TInt Set(const TCallBack& aCallBack);
1.39 + inline TInt Change() const;
1.40 +private:
1.41 + inline CEnvironmentChangeNotifier(TInt aPriority);
1.42 + void RunL();
1.43 + void DoCancel();
1.44 +private:
1.45 + TInt iChange;
1.46 + TCallBack iCallBack;
1.47 + RChangeNotifier iChangeNotifier;
1.48 + };
1.49 +
1.50 +
1.51 +
1.52 +inline TInt CEnvironmentChangeNotifier::Change() const
1.53 + /** Returns the last set of change events.
1.54 +
1.55 + If the last outstanding request completed normally, the function returns a
1.56 + bit pattern where each bit value corresponds to one of the enumerators defined
1.57 + by TChanges. A set bit indicates that the corresponding change event occurred.
1.58 +
1.59 + For example, if the bit value TChanges::EChangesMidnightCrossover is set,
1.60 + then the system time has passed midnight.
1.61 +
1.62 + @return A set of bits consisting of one or more of the values defined by TChanges,
1.63 + or KErrCancel if the last outstanding request was cancelled.
1.64 + @see TChanges */
1.65 + {return iChange;}
1.66 +
1.67 +#endif