Interface Connection.Interface.PowerSaving

Interface Index (Compact) | Summary | Description | Methods | Signals | Properties

Methods

SetPowerSaving (b: Activate) nothing

Signals

PowerSavingChanged (b: Active)

Properties

PowerSavingActive b Read only
Added in 0.21.UNRELEASED. (as stable API)

Description

Some protocols support mechanisms for reducing bandwidth usage—and hence power usage, on mobile devices—when the user is not directly interacting with their IM client. For instance, Google Talk's XMPP server supports queueing incoming presence updates at the client's instruction; the client can instruct the server to deliver all outstanding presence updates at a later time. This interface may be used to instruct the connection manager to enable and disable such protocol-level features when a screensaver is activated, the device screen is locked, and so on, by calling the SetPowerSaving method.

Enabling power saving SHOULD NOT change behaviour in any way that is noticable to a user not actively interacting with their client. For example, delaying presence updates somewhat is unlikely to be noticed by a user not staring at their device waiting for a contact to come online; on the other hand, requesting that the server queue incoming messages would be noticable by the user, so is not an acceptable effect of calling SetPowerSaving.

Methods

(Permalink)

SetPowerSaving (b: Activate) → nothing

Parameters

  • Activate — b
  • True if protocol-level power saving features should be activated; False if they should be de-activated.

Turn power saving mode on or off.

Rationale:

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.

Rationale:
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.

Possible Errors

  • Not Available
  • The current connection has no power saving features.
  • Not Implemented
  • Raised when the requested method, channel, etc is not available on this connection.

Signals

(Permalink)

PowerSavingChanged (b: Active)

Parameters

  • Active — b
  • The new state of the power saving feature.
The PowerSavingActive property changed.

Properties

Accessed using the org.freedesktop.DBus.Properties interface.
(Permalink)

PowerSavingActive — b

Read only

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.