[gnome-power-manager] Remove interface docs that are no longer relevant
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] Remove interface docs that are no longer relevant
- Date: Tue, 21 Jul 2009 10:28:14 +0000 (UTC)
commit d9c3a4808de5796283af500ab0c3824eb6a23ebe
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 21 10:56:42 2009 +0100
Remove interface docs that are no longer relevant
docs/dbus-interface.html | 124 --------------
docs/dbus-interface.xml | 409 ----------------------------------------------
2 files changed, 0 insertions(+), 533 deletions(-)
---
diff --git a/docs/dbus-interface.xml b/docs/dbus-interface.xml
index 7dfeef3..aa93c80 100644
--- a/docs/dbus-interface.xml
+++ b/docs/dbus-interface.xml
@@ -97,20 +97,6 @@
<entry>Attempt to hibernate the system.</entry>
</row>
<row>
- <entry><literal>Shutdown</literal></entry>
- <entry></entry>
- <entry></entry>
- <entry><literal>PermissionDenied</literal>, <literal>NoHardwareSupport</literal></entry>
- <entry>Attempt to shutdown the system.</entry>
- </row>
- <row>
- <entry><literal>Reboot</literal></entry>
- <entry></entry>
- <entry></entry>
- <entry><literal>PermissionDenied</literal>, <literal>NoHardwareSupport</literal></entry>
- <entry>Attempt to reboot the system.</entry>
- </row>
- <row>
<entry><literal>CanSuspend</literal></entry>
<entry></entry>
<entry><literal>bool</literal> can_suspend</entry>
@@ -124,107 +110,6 @@
<entry></entry>
<entry>If the current session user is able to hibernate the system.</entry>
</row>
- <row>
- <entry><literal>CanShutdown</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> can_shutdown</entry>
- <entry></entry>
- <entry>If the current session user is able to shutdown the system.</entry>
- </row>
- <row>
- <entry><literal>CanReboot</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> can_reboot</entry>
- <entry></entry>
- <entry>If the current session user is able to reboot the system.</entry>
- </row>
- <row>
- <entry><literal>GetPowerSaveStatus</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> save_power</entry>
- <entry></entry>
- <entry>
- This may be set on AC or battery power, both, or neither
- depending on the users preference setting.
- This setting may also change with the battery level changing.
- Programs should respect this value and not perform non-essential
- tasks when we are trying to save power.
- </entry>
- </row>
- <row>
- <entry><literal>GetOnBattery</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> on_battery</entry>
- <entry></entry>
- <entry>
- Returns the system power state, i.e. if we are running on
- battery power.
- This method may still return true on AC using a desktop system
- if the computer is using backup power from a monitored UPS.
- </entry>
- </row>
- <row>
- <entry><literal>GetLowBattery</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> low_battery</entry>
- <entry></entry>
- <entry>
- Returns true if the battery is low and discharging.
- This may be measured with time remaining or percentage change,
- and the exact threshold level is an implementation detail.
- Programs that cannot deal with a low power action such as
- suspend or hibernate should not run if this method returns true.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="dbus-core-signals">
- <title>Signals emitted from interface <literal>org.freedesktop.PowerManagement</literal></title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Return Values</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>CanSuspendChanged</literal></entry>
- <entry><literal>bool</literal> can_suspend</entry>
- <entry>Signals the suspend status has changed.</entry>
- </row>
- <row>
- <entry><literal>CanHibernateChanged</literal></entry>
- <entry><literal>bool</literal> can_hibernate</entry>
- <entry>Signals the hibernate status has changed.</entry>
- </row>
- <row>
- <entry><literal>CanShutdownChanged</literal></entry>
- <entry><literal>bool</literal> can_shutdown</entry>
- <entry>Signals the shutdown status has changed.</entry>
- </row>
- <row>
- <entry><literal>CanRebootChanged</literal></entry>
- <entry><literal>bool</literal> can_reboot</entry>
- <entry>Signals the reboot status has changed.</entry>
- </row>
- <row>
- <entry><literal>PowerSaveStatusChanged</literal></entry>
- <entry><literal>bool</literal> save_power</entry>
- <entry>Signals the low power mode has changed..</entry>
- </row>
- <row>
- <entry><literal>OnBatteryChanged</literal></entry>
- <entry><literal>bool</literal> on_battery</entry>
- <entry>Signals the battery discharge state has changed.</entry>
- </row>
- <row>
- <entry><literal>LowBatteryChanged</literal></entry>
- <entry><literal>bool</literal> on_battery</entry>
- <entry>Signals the battery low power state has changed.</entry>
- </row>
</tbody>
</tgroup>
</table>
@@ -313,300 +198,6 @@
</tgroup>
</table>
</sect2>
-
- <sect2 id="dbus-widget">
- <title>Optional Widget Interface</title>
- <para>
- <emphasis>NON STANDARDISED API</emphasis>
- </para>
- <informaltable>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>DBUS Interface:</entry>
- <entry><literal>org.freedesktop.PowerManagement.Widget</literal></entry>
- </row>
- <row>
- <entry>DBUS Path:</entry>
- <entry><literal>/org/freedesktop/PowerManagement/Widget</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- The <literal>org.freedesktop.PowerManagement.Widget</literal>
- interface is optional, and allows a UI element to display the state
- of the system.
- </para>
- <para>
- Some user interface front-ends will be in a different process to that
- of any power manager and system state will have to be transmitted
- over DBUS.
- </para>
- <para>
- Only the final icon and description are exported over DBUS as
- presenting an abstract power interface is wrong for this trivial functionality.
- </para>
-
- <table id="dbus-widget-methods">
- <title>Methods on interface <literal>org.freedesktop.PowerManagement.Widget</literal></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Input Parameters</entry>
- <entry>Return Values</entry>
- <entry>Throws Error</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>GetDescription</literal></entry>
- <entry></entry>
- <entry><literal>string</literal> description</entry>
- <entry></entry>
- <entry>Returns the system state description, e.g. Laptop battery 34 minutes until charged (34%).</entry>
- </row>
- <row>
- <entry><literal>GetIcon</literal></entry>
- <entry></entry>
- <entry><literal>string</literal> icon</entry>
- <entry></entry>
- <entry>Returns the icon name, e.g. primary-080-charging</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="dbus-widget-signals">
- <title>Signals emitted from interface <literal>org.freedesktop.PowerManagement.Widget</literal></title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Return Values</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>DescriptionChanged</literal></entry>
- <entry><literal>string</literal> description</entry>
- <entry>Signals the system state description has changed.</entry>
- </row>
- <row>
- <entry><literal>IconChanged</literal></entry>
- <entry><literal>string</literal> icon</entry>
- <entry>Signals the system icon has changed.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
-
- <sect2 id="dbus-inhibit">
- <title>Optional Inhibit Interface</title>
- <para>
- <emphasis>NON STANDARDISED API</emphasis>
- </para>
- <informaltable>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>DBUS Interface:</entry>
- <entry><literal>org.freedesktop.PowerManagement.Inhibit</literal></entry>
- </row>
- <row>
- <entry>DBUS Path:</entry>
- <entry><literal>/org/freedesktop/PowerManagement/Inhibit</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- When the power manager detects an idle session and system, it can perform
- a system suspend or hibernate, known as an idle sleep action.
- We can prevent the session power manager daemon from doing this action
- using the inhibit interface.
- </para>
- <para>
- An automatic inhibit should be taken by the file manager if there is a
- slow network copy that will take many minutes to complete.
- </para>
- <para>
- A cookie is a randomly assigned 32bit unsigned integer used to identify
- the inhibit.
- It is required as the same application may want to call inhibit
- multiple times, without managing the inhibit calls itself.
- </para>
- <para>
- Inhibit and UnInhibit are easy to use, requiring only the cookie
- to be stored in the client application.
- Below is a simple python demonstration showing an inhibit action.
- </para>
-<programlisting>
-#!/usr/bin/python
-import dbus
-import time
-bus = dbus.Bus(dbus.Bus.TYPE_SESSION)
-devobj = bus.get_object('org.freedesktop.PowerManagement', '/org/freedesktop/PowerManagement')
-dev = dbus.Interface (devobj, "org.freedesktop.PowerManagement.Inhibit")
-cookie = dev.Inhibit('Nautilus', 'Copying files from /media/SANVOL')
-time.sleep(10)
-dev.UnInhibit(cookie)
-</programlisting>
- <table id="dbus-inhibit-methods">
- <title>Methods on interface <literal>org.freedesktop.PowerManagement.Inhibit</literal></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Input Parameters</entry>
- <entry>Return Values</entry>
- <entry>Throws Error</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>Inhibit</literal></entry>
- <entry><literal>string</literal> application, <literal>string</literal> reason</entry>
- <entry><literal>uint</literal> cookie</entry>
- <entry><literal>PermissionDenied</literal></entry>
- <entry>
- Inhibits the computer from performing an idle sleep action.
- Useful if you want to do an operation of long duration without the
- computer suspending.
- Reason and application should be translated strings where possible.
- </entry>
- </row>
- <row>
- <entry><literal>UnInhibit</literal></entry>
- <entry><literal>uint</literal> cookie</entry>
- <entry></entry>
- <entry><literal>CookieNotFound</literal></entry>
- <entry>
- Allows the computer to perform the idle sleep or user action if the
- number of inhibit calls is zero.
- If there are multiple cookies outstanding, clearing one cookie
- does not allow the action to happen.
- If the program holding the cookie exits from the session bus without
- calling <literal>UnInhibit()</literal> then it is automatically removed.
- </entry>
- </row>
- <row>
- <entry><literal>HasInhibit</literal></entry>
- <entry></entry>
- <entry><literal>bool</literal> has_inhibit</entry>
- <entry></entry>
- <entry>
- Returns false if we have no valid inhibits.
- This will return true if the number of inhibit cookies
- is greater than zero.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table id="dbus-inhibit-signals">
- <title>Signals emitted from interface <literal>org.freedesktop.PowerManagement.Inhibit</literal></title>
- <tgroup cols="3">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Return Values</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>HasInhibitChanged</literal></entry>
- <entry><literal>bool</literal> has_inhibit</entry>
- <entry>Signals the inhibit valid state has changed.</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
-
- <sect2 id="dbus-statistics">
- <title>Optional Statistics Interface</title>
- <para>
- <emphasis>NON STANDARDISED API</emphasis>
- </para>
- <informaltable>
- <tgroup cols="2">
- <tbody>
- <row>
- <entry>DBUS Interface:</entry>
- <entry><literal>org.freedesktop.PowerManagement.Statistics</literal></entry>
- </row>
- <row>
- <entry>DBUS Path:</entry>
- <entry><literal>/org/freedesktop/PowerManagement/Statistics</literal></entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- <para>
- Statistics data are values that can be collected by the power manager
- for review or profiling.
- These allow the user to profile power saving methods, usually shown
- to the user in the form of a graph.
- </para>
-
- <table id="dbus-statistics-methods">
- <title>Methods on interface <literal>org.freedesktop.PowerManagement.Statistics</literal></title>
- <tgroup cols="4">
- <thead>
- <row>
- <entry>Name</entry>
- <entry>Input Parameters</entry>
- <entry>Return Values</entry>
- <entry>Throws Error</entry>
- <entry>Description</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry><literal>GetDataTypes</literal></entry>
- <entry></entry>
- <entry><literal>list of strings [as]</literal> types</entry>
- <entry></entry>
- <entry>
- Gets a list of the types of data available.
- Data types are single strings that represent the complete data
- and do not indicate the axis, e.g. [ 'voltage', 'power', 'percentage' ]
- </entry>
- </row>
- <row>
- <entry><literal>GetAxisTypes</literal></entry>
- <entry><literal>string</literal> data_type</entry>
- <entry><literal>string</literal> x_axis, <literal>string</literal> y_axis</entry>
- <entry></entry>
- <entry>
- For some presentations, for example graphs we can present the data in
- many different ways.
- This method returns the type of data that is recorded for each axis,
- e.g. x_axis might return 'percentage'
- </entry>
- </row>
- <row>
- <entry><literal>GetData</literal></entry>
- <entry><literal>uint</literal> seconds, <literal>string</literal> data_type</entry>
- <entry><literal>array of 3-integers [a(iii)]</literal> data</entry>
- <entry></entry>
- <entry>
- Gets the data for a given type.
- In the return data the 3-integers represent the X value, Y value
- and data value respectively.
- The seconds parameter is how much data we should get.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- </sect2>
</sect1>
</article>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]