Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RChangeNotifier

RChangeNotifier

Support

Supported from 5.0

Description

A handle to a change notifier. The change notifier itself is a Kernel object.

As with all handles, they should be closed when they are no longer required.

Derivation

RChangeNotifierA handle to a change notifier
RHandleBaseHandle to an object

Defined in RChangeNotifier:
Create(), Logon(), LogonCancel()

Inherited from RHandleBase:
Close(), Duplicate(), Handle(), SetHandle()

See also:


Member functions


Create()

TInt Create();

Description

Creates a change notifier, and opens this handle to that change notifier.

Visibility of the change notifier is restricted to the current thread; i.e. the change notifier is local to the thread creating it and no other thread can open a handle to the same change notifier.

In addition, ownership of this change notifier is vested in the current thread.

Return value

TInt

KErrNone if successful otherwise another of the system-wide error codes.


Logon()

TInt Logon(TRequestStatus& aStatus) const;

Description

Logon to the change notifier represented by this handle.

Logging on makes an asynchronous request that changes in the environment, such as a switch in locale or crossing over past midnight, be reported.

When a change in the environment occurs, the request completes and TRquestStatus contains one or more of the bit values defines by the TChanges enum.

Alternatively, if an outstanding logon request is cancelled by a call to this handle's LogonCancel() member function, then the request completes with a KErrCancel.

Note:

If this is the first logon request after creation of the change notifier, this request completes immediately.

Parameters

TRequestStatus& aStatus

A reference to the request status object. If the request is cancelled, this is set to KErrCancel. If the request completes normally, this is set to one or more of the enumerator values defined by the TChanges enum.

Return value

TInt

KErrInUse if already logged on, KErrNone otherwise.

See also:


LogonCancel()

TInt LogonCancel() const;

Description

Cancels an outstanding logon request to the change notifier.

A logon request made by calling this handle's Logon() member function must previously have been made, otherwise the function returns KErrGeneral.

Return value

TInt

KErrGeneral if there is no outstanding logon request, KErrNone otherwise.