|  |  |  | telepathy-glib API Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
| Connection PowerSaving interfaceConnection PowerSaving interface — client-side wrappers for the PowerSaving interface | 
#include <telepathy-glib/telepathy-glib-dbus.h> TpProxyPendingCall * tp_cli_connection_interface_power_saving_call_set_power_saving (TpConnection *proxy,gint timeout_ms,gboolean in_Activate,tp_cli_connection_interface_power_saving_callback_for_set_power_saving callback,gpointer user_data,GDestroyNotify destroy,GObject *weak_object); void (*tp_cli_connection_interface_power_saving_callback_for_set_power_saving) (TpConnection *proxy,const GError *error,gpointer user_data,GObject *weak_object); TpProxySignalConnection * tp_cli_connection_interface_power_saving_connect_to_power_saving_changed (TpConnection *proxy,tp_cli_connection_interface_power_saving_signal_callback_power_saving_changed callback,gpointer user_data,GDestroyNotify destroy,GObject *weak_object,GError **error); void (*tp_cli_connection_interface_power_saving_signal_callback_power_saving_changed) (TpConnection *proxy,gboolean arg_Active,gpointer user_data,GObject *weak_object);
Some connection manager implementations can be instructed to try to save power on mobile devices by suppressing non-essential traffic, such as presence notifications. This section documents auto-generated C wrappers for the PowerSaving D-Bus interface.
TpProxyPendingCall * tp_cli_connection_interface_power_saving_call_set_power_saving (TpConnection *proxy,gint timeout_ms,gboolean in_Activate,tp_cli_connection_interface_power_saving_callback_for_set_power_saving callback,gpointer user_data,GDestroyNotify destroy,GObject *weak_object);
Start a SetPowerSaving method call.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>Turn power saving mode on or off.</p> <tp:rationale> <p>Depending on the device's activity level, the connection can have its power saving mode turned on or off.</p> </tp:rationale> <p>Errors raised by this method indicate that power saving could not be enabled, which SHOULD NOT generally be treated as fatal.</p> <tp:rationale> If the CM cannot switch modes, either because of the protocol (<code>NotImplemented</code>), or because of the service (<code>NotAvailable</code>), 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. </tp:rationale>
| 
 | the TpProxy | 
| 
 | the timeout in milliseconds, or -1 to use the default | 
| 
 | Used to pass an 'in' argument: <code>True</code> if protocol-level power saving features should be activated; <code>False</code> if they should be de-activated. | 
| 
 | called when the method call succeeds or fails;
may be NULLto make a "fire and forget" call with no
reply tracking | 
| 
 | user-supplied data passed to the callback;
must be NULLifcallbackisNULL | 
| 
 | called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be NULLifcallbackisNULL | 
| 
 | If not NULL, a GObject which will be
weakly referenced; if it is destroyed, this call
will automatically be cancelled. Must beNULLifcallbackisNULL | 
| Returns : | a TpProxyPendingCall representing the call in progress. It is borrowed from the object, and will become invalid when the callback is called, the call is cancelled or the TpProxy becomes invalid. | 
void (*tp_cli_connection_interface_power_saving_callback_for_set_power_saving) (TpConnection *proxy,const GError *error,gpointer user_data,GObject *weak_object);
Signature of the callback called when a SetPowerSaving method call succeeds or fails.
| 
 | the proxy on which the call was made | 
| 
 | NULLon success, or an error on failure | 
| 
 | user-supplied data | 
| 
 | user-supplied object | 
TpProxySignalConnection * tp_cli_connection_interface_power_saving_connect_to_power_saving_changed (TpConnection *proxy,tp_cli_connection_interface_power_saving_signal_callback_power_saving_changed callback,gpointer user_data,GDestroyNotify destroy,GObject *weak_object,GError **error);
Connect a handler to the signal PowerSavingChanged.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml"> The <tp:member-ref>PowerSavingActive</tp:member-ref> property changed.
| 
 | A TpConnection or subclass | 
| 
 | Callback to be called when the signal is received | 
| 
 | User-supplied data for the callback | 
| 
 | Destructor for the user-supplied data, which
will be called when this signal is disconnected, or
before this function returns NULL | 
| 
 | A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected | 
| 
 | If not NULL, used to raise an error ifNULLis
returned | 
| Returns : | a TpProxySignalConnection containing all of the
above, which can be used to disconnect the signal; or NULLif the proxy does not have the desired interface
or has become invalid. | 
void (*tp_cli_connection_interface_power_saving_signal_callback_power_saving_changed) (TpConnection *proxy,gboolean arg_Active,gpointer user_data,GObject *weak_object);
Represents the signature of a callback for the signal PowerSavingChanged.
| 
 | The proxy on which tp_cli_connection_interface_power_saving_connect_to_power_saving_changed()was called | 
| 
 | The new state of the power saving feature. | 
| 
 | User-supplied data | 
| 
 | User-supplied weakly referenced object |