• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Solid

Solid::PowerManagement

Solid::PowerManagement Namespace Reference

This namespace allows to query the underlying system to obtain information about the hardware available. More...


Classes

class  Notifier

Enumerations

enum  SleepState { StandbyState = 1, SuspendState = 2, HibernateState = 4 }

Functions

bool appShouldConserveResources ()
int beginSuppressingSleep (const QString &reason=QString())
Notifier * notifier ()
void requestSleep (SleepState state, QObject *receiver, const char *member)
bool stopSuppressingSleep (int cookie)
QSet< SleepState > supportedSleepStates ()

Detailed Description

This namespace allows to query the underlying system to obtain information about the hardware available.

It is the single entry point for power management. Applications should use it to control or query the power management features of the system.

Note that it's implemented as a singleton and encapsulates the backend logic.

Author:
Kevin Ottens <ervin@kde.org>


Enumeration Type Documentation

enum Solid::PowerManagement::SleepState

This enum type defines the different suspend methods.

  • StandbyState: Processes are stopped, some hardware is deactivated (ACPI S1)
  • SuspendState: Most devices are deactivated, only RAM is powered (ACPI S3)
  • HibernateState: State of the machine is saved to disk, and the machine is powered down (ACPI S4)
Enumerator:
StandbyState 
SuspendState 
HibernateState 

Definition at line 50 of file powermanagement.h.


Function Documentation

bool Solid::PowerManagement::appShouldConserveResources (  ) 

Retrieves a high level indication of how applications should behave according to the power management subsystem.

For example, when on battery power, this method will return true.

Returns:
whether apps should conserve power

Definition at line 56 of file powermanagement.cpp.

int Solid::PowerManagement::beginSuppressingSleep ( const QString &  reason = QString()  ) 

Tell the power management subsystem to suppress automatic system sleep until further notice.

Parameters:
reason Give a reason for not allowing sleep, to be used in giving user feedback about why a sleep event was prevented
Returns:
a 'cookie' value representing the suppression request. Used by the power manager to track the application's outstanding suppression requests. Returns -1 if the request was denied.

Definition at line 85 of file powermanagement.cpp.

Solid::PowerManagement::Notifier * Solid::PowerManagement::notifier (  ) 

Definition at line 101 of file powermanagement.cpp.

void Solid::PowerManagement::requestSleep ( SleepState  state,
QObject *  receiver,
const char *  member 
)

Requests that the system goes to sleep.

Parameters:
state the sleep state use
receiver the object to call a slot on once the operation completes
member the slot to call

Definition at line 66 of file powermanagement.cpp.

bool Solid::PowerManagement::stopSuppressingSleep ( int  cookie  ) 

Tell the power management that a particular sleep suppression is no longer needed.

When no more suppressions are active, the system will be free to sleep automatically

Parameters:
cookie The cookie acquired when requesting sleep suppression
Returns:
true if the suppression was stopped, false if an invalid cookie was given

Definition at line 96 of file powermanagement.cpp.

QSet< Solid::PowerManagement::SleepState > Solid::PowerManagement::supportedSleepStates (  ) 

Retrieves the set of suspend methods supported by the system.

Returns:
the suspend methods supported by this system
See also:
Solid::PowerManager::SuspendMethod

Solid::PowerManager::SuspendMethods

Definition at line 61 of file powermanagement.cpp.

Solid

Skip menu "Solid"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal