SystemSuspend Class Reference
|
Task Name | SystemSuspend |
Interfaces | SystemSuspend |
Services | Suspend |
Server components may directly use the SystemSuspend interface to enter and monitor the suspend state. Non-server based applications should use the SuspendService to do the same.
The system suspend state is expected to be a very low, but non-destructive, power saving state. As some hardware devices may need to be shutdown before or reinitialized after entry into the suspend state, integrators can provide objects that implement the SystemSuspendHandler interface that will be called before the system enters suspend and after the system leaves it.
As SystemSuspend is a server task, and not a class, components within the server must access it as such. For example, for a server component to put the device into suspend,
SystemSuspend *suspend = qtopiaTask<SystemSuspend>(); qWarning() << "About to suspend!"; if(suspend->suspendSystem()) qWarning() << "Resumed from suspend!"; else qWarning() << "Suspend failed";
As applications cannot access server tasks directly, they may use the Suspend service.
QtopiaServiceRequest req("Suspend", "suspend()"); req.send();
This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.
See also SystemSuspendHandler and SuspendService.
Request that the system be suspended. The system will block in this method until execution is resumed. The method returns true if the suspension was successful, and false otherwise.
When called, all tasks in the system that implement the SystemSuspendHandler are instantiated. If any of these tasks returns false from the SystemSuspendHandler::canSuspend() method, the suspend is canceled and the systemSuspendCanceled() signal is emitted. Otherwise, the SystemSuspendHandler::suspend() methods are called on the tasks in reverse order. That is, the task with the highest interface priority is called last. It is assumed that this last task will actually perform the hardware suspend - possibly using the standard "apm --suspend" system call.
Once all the tasks have successfully completed the suspend, the SystemSuspendHandler::wake() method is invoked on each in-order. This is done immediately after the last invokation of the SystemSuspendHandler::suspend() method, so it is important that this last handler actually suspends the device or, from the users perspective, the device will suspend and immediately resume.
Emitted whenever the system has completed resuming from suspend.
Emitted whenever a system suspend has been requested but a SystemSuspendHandler reported that it was not in a state to suspend. The suspendSystem() call that requested the suspend will return false.
Emitted whenever the system begins suspending. This is emitted after the SystemSuspendHandlers have all reported that the system is in a state to suspend.
Following the systemSuspending() signal, a systemWaking() and systemActive() signals are guarenteed.
Emitted whenever the system is in the process of resuming from suspend.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com