Tp::Service::ConnectionInterfacePowerSavingAdaptor Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ConnectionInterfacePowerSavingAdaptor Class Reference
Connection service implementation

`#include <TelepathyQt/_gen/svc-connection.h>`

Inherits Tp::AbstractAdaptor.

## Public Slots
void | SetPowerSaving (bool activate, const QDBusMessage &dbusMessage)

## Signals
void | PowerSavingChanged (bool active)

## Public Member Functions
bool | PowerSavingActive () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const

## Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Connection.Interface.PowerSaving".

## Member Function Documentation

bool Tp::Service::ConnectionInterfacePowerSavingAdaptor::PowerSavingActive | ( |  | ) | const

Return the value of the exported D-Bus object property `PowerSavingActive` of type `bool`.

Adaptees should export this property as a Qt property named 'powerSavingActive' with type bool.

`True` if protocol-level power saving features are currently activated. This property can be changed using the SetPowerSaving() method; change notifications is via the PowerSavingChanged() signal.

Returns
  The value of exported property `PowerSavingActive`.

void Tp::Service::ConnectionInterfacePowerSavingAdaptor::SetPowerSaving | ( | bool | activate,
|  | const QDBusMessage & | dbusMessage
| ) |  |
| slot

Begins a call to the exported D-Bus method `SetPowerSaving` on this object.

Adaptees should export this method as a Qt slot with the following signature: void setPowerSaving(bool activate, const Tp::Service::ConnectionInterfacePowerSavingAdaptor::SetPowerSavingContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Turn power saving mode on or off.

Depending on the device's activity level, the connection can have its power saving mode turned on or off.

Errors raised by this method indicate that power saving could not be enabled, which SHOULD NOT generally be treated as fatal.

If the CM cannot switch modes, either because of the protocol (`NotImplemented`), or because of the service (`NotAvailable`), Mission Control (or whoever manages this) should be made aware. The error could be ignored or, in the extreme, be fascist and disconnect the account.

Parameters

  activate |
      True if protocol-level power saving features should be activated;
      False if they should be de-activated.

void Tp::Service::ConnectionInterfacePowerSavingAdaptor::PowerSavingChanged | ( | bool | active | ) |
| signal

Represents the exported D-Bus signal `PowerSavingChanged` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void powerSavingChanged(bool active);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  active |
      The new state of the power saving feature.