CServShutdownServer Class Reference
class CServShutdownServer : public CServer2
|
Constructor & Destructor Documentation
CServShutdownServer(TInt)
IMPORT_C
|
CServShutdownServer
|
(
|
TInt
|
aPriority
|
)
|
[protected]
|
Parameters
TInt
aPriority
|
The active object priority.
|
~CServShutdownServer()
IMPORT_C
|
~CServShutdownServer
|
(
|
)
|
|
Member Functions Documentation
AllSessionsHavePendingRequest()
TBool
|
AllSessionsHavePendingRequest
|
(
|
)
|
const [private]
|
CancelPowerOff()
IMPORT_C void
|
CancelPowerOff
|
(
|
)
|
|
Cancels any power off request.
ClientArrayLC()
This method creates an array of CArrayFix<TThreadId> type and appends to it the thread id-s of the all registered clients. The created CArrayFix<TThreadId> instance will be pushed on the cleanup stack.
-
leave
-
Some system-wide error codes including KErrNoMemory.
ConstructL()
IMPORT_C void
|
ConstructL
|
(
|
)
|
[virtual]
|
Completes the server construction by adding the server to the active scheduler and initializing the
CShutdownTimer
object if applicable.
-
leave
-
See
CServer2::StartL()
leave error codes.
CServer2::StartL()
-
panic
-
KErrNotSupported Incorrect patchable variables configuration.
DoSwitchOff()
void
|
DoSwitchOff
|
(
|
)
|
[private]
|
This method switches off the power using the
Power
API. If there is a defined SYSLIBS_TEST macro, the method does nothing.
GetShutdownState(TBool &, TBool &)
IMPORT_C void
|
GetShutdownState
|
(
|
TBool
&
|
aPowerOff,
|
|
TBool
&
|
aAllSessionsHavePendingRequest
|
|
)
|
const
|
This method returns an information about the shutdown status.
Parameters
TBool
& aPowerOff
|
An output parameter, where iPowerOff value will be stored. It will be non-zero, if a powerdown sequence has been initiated.
|
TBool
& aAllSessionsHavePendingRequest
|
An output parameter. It will be non-zero, if all clients has pending requests.
|
HandlePowerNotifRequest(const RThread &)
IMPORT_C void
|
HandlePowerNotifRequest
|
(
|
const
RThread
&
|
aClient
|
)
|
|
This method iterates through all session instances and checks that all they have pending requests (which means that all clients have completed their powerdown related processing and re-registered itself back to the shutdown server).. If that's true (all sessions have pending requests) and iPowerOff flag is nonzero, the method will call
SwitchOff()
- the power will be switched off.
CServShutdownServer::SwitchOff()
CServShutdownSession::HasPendingRequest()
HandleShutdownEventL(MSaveObserver::TSaveType, TBool, TPowerState)
Parameters
MSaveObserver::TSaveType
aAction
|
The type of the requested action
|
TBool
aPowerOff
|
If it is non-zero, this is the beginning of a powerdown sequence.
|
TPowerState
aEvent = EPwStandby
|
The type of the powerdown event (power off or restart)
|
IsPowerOff()
IMPORT_C
TBool
|
IsPowerOff
|
(
|
)
|
const
|
NewL()
Standard phase-one factory method for creating
CServShutdownServer
instances.
-
leave
-
Some system-wide error codes including KErrNoMemory.
NewSessionL(const TVersion &, const RMessage2 &)
This method creates a new server side session object.
-
leave
-
KErrNotSupported Unknown shutdown server version
-
leave
-
Some system-wide error codes including KErrNoMemory.
NotifySave(MSaveObserver::TSaveType)
Parameters
MSaveObserver::TSaveType
aSaveType
|
The action, which will be given to the clients, when calling their MSaveObserver::SaveL() implementations.
|
Member Data Documentation
TPowerState
iPowerEvent
TPowerState
|
iPowerEvent
|
[private]
|
TBool
iPowerOff
TBool
|
iPowerOff
|
[private]
|
CShutdownTimer * iShutdownTimer
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.