CSaveNotifier Class Reference
class CSaveNotifier : public CActive
|
This class describes an object, which can be used by the clients, which want to be notified about events like powerdown/low memory. The clients have to implement
MSaveObserver
interface. When a particular event happens, the client's implementation of
MSaveObserver::SaveL()
will be called.
MSaveObserver
Constructor & Destructor Documentation
CSaveNotifier(MSaveObserver &)
Parameters
MSaveObserver
& aObserver
|
A reference to the client's object, which implements MSaveObserver::SaveL() method.
|
~CSaveNotifier()
IMPORT_C
|
~CSaveNotifier
|
(
|
)
|
|
Member Functions Documentation
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
Standard phase-two construction method for creating
CSaveNotifier
instances. It creates a session with the shutdown server.
DelayRequeue()
IMPORT_C void
|
DelayRequeue
|
(
|
)
|
|
DoCancel()
void
|
DoCancel
|
(
|
)
|
[private, virtual]
|
The method cancels the client's registration.
HandleError(TInt)
IMPORT_C void
|
HandleError
|
(
|
TInt
|
|
)
|
|
The client will call this method if an error occurred during the powerdown processing. But it ignores the error code supplied and re-queues for further events. The server will not handle the error message from the client.
NewL(MSaveObserver &)
Standard phase one factory method for creating
CSaveNotifier
instances. The caller of this method will be automatically registered to receive powerdown/low memory notifications from the shutdown server.
MSaveObserver
class.
Parameters
MSaveObserver
& aObserver
|
A reference to the client's object, which implements MSaveObserver::SaveL() method.
|
RunL()
void
|
RunL
|
(
|
)
|
[private, virtual]
|
This method gets called when the shutdown server completes the client request for notification, registered when NotifySave() was called. It calls the implementation of
MSaveObserver::SaveL()
.
ServerPowerState(TBool &)
IMPORT_C
TInt
|
ServerPowerState
|
(
|
TBool
&
|
aPowerOff
|
)
|
[private]
|
With SYSLIBS_TEST macro defined, this method sends a request to query the power state of the server. Otherwise, it returns with KErrNotSupported.
Parameters
TBool
& aPowerOff
|
The result of the query. Non-zero if the power state of the server is off.
|
Start()
The method notifies the shutdown server tha the client wants to be notified when there is an event like powerdown/low memory (client registration).
SwitchOff(MSaveObserver::TSaveType, TBool)
With SYSLIBS_TEST macro defined, this method initiates a powerdown sequence. Otherwise, it returns with KErrNotSupported.
Parameters
MSaveObserver::TSaveType
aAction
|
The action, which will be given to the clients, when calling their MSaveObserver::SaveL() implementations.
|
TBool
aPowerOff
|
Non-zero if you want to switch the power off.
|
Member Data Documentation
MSaveObserver & iSaveObserver
RSaveSession
iSaveSession
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.