Top |
Connection PowerSaving interfaceConnection PowerSaving interface — client-side wrappers for the PowerSaving interface |
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_saving1_call_set_power_saving (TpConnection *proxy
,gint timeout_ms
,gboolean in_Activate
,tp_cli_connection_interface_power_saving1_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>
proxy |
the TpProxy |
|
timeout_ms |
the timeout in milliseconds, or -1 to use the default |
|
in_Activate |
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. |
|
callback |
called when the method call succeeds or fails;
may be |
|
user_data |
user-supplied data passed to the callback;
must be |
|
destroy |
called with the user_data as argument, after the
call has succeeded, failed or been cancelled;
must be |
|
weak_object |
If not |
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_saving1_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.
proxy |
the proxy on which the call was made |
|
error |
|
|
user_data |
user-supplied data |
|
weak_object |
user-supplied object |
TpProxySignalConnection * tp_cli_connection_interface_power_saving1_connect_to_power_saving_changed (TpConnection *proxy
,tp_cli_connection_interface_power_saving1_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.
proxy |
A TpConnection or subclass |
|
callback |
Callback to be called when the signal is received |
|
user_data |
User-supplied data for the callback |
|
destroy |
Destructor for the user-supplied data, which
will be called when this signal is disconnected, or
before this function returns |
|
weak_object |
A GObject which will be weakly referenced; if it is destroyed, this callback will automatically be disconnected |
|
error |
a TpProxySignalConnection containing all of the
above, which can be used to disconnect the signal; or
NULL
if the proxy does not have the desired interface
or has become invalid.
void (*tp_cli_connection_interface_power_saving1_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.
proxy |
The proxy on which |
|
arg_Active |
The new state of the power saving feature. |
|
user_data |
User-supplied data |
|
weak_object |
User-supplied weakly referenced object |