summaryrefslogtreecommitdiff
path: root/spec/Connection_Interface_Power_Saving.xml
blob: 30b25f4035edb1055d42b34b27327a06b5527137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" ?>
<node name="/Connection_Interface_Power_Saving"
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
  >
  <tp:copyright> Copyright (C) 2007 Collabora Limited </tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Library General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
  </tp:license>
  <interface
    name="org.freedesktop.Telepathy.Connection.Interface.PowerSaving.DRAFT"
    tp:causes-havoc="experimental">
    <tp:added version="0.19.12"/>
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface for telling the connection when to enter and
      leave power saving mode.</p>

      <p>Power saving mode should be used when the user is not
        directly interacting with the interface. For example, when
        the screen saver is active, or when device screen is
        locked.</p>

      <p>Connection managers should implement this feature in a way
        that is not noticeable by end users. For example, a protocol
        might allow server-side blocking presence updates from
        contacts to reduce network chatter. This would not affect the
        user, since they are not interacting with their device when it
        is in power saving mode.</p>
    </tp:docstring>

    <method name="SetPowerSaving" tp:name-for-bindings="Set_Power_Saving">
      <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 it's 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>
      </tp:docstring>

      <arg direction="in" name="Activate" type="b">
        <tp:docstring>
          True when activating power saving, false when deactivating.
        </tp:docstring>
      </arg>

      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
          <tp:docstring>
            The current connection has no power saving features.
          </tp:docstring>
        </tp:error>
        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
      </tp:possible-errors>
    </method>

    <property name="PowerSavingActive" type="b" access="read"
              tp:name-for-bindings="Power_Saving_Active">
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>The current state of power saving. Change notifications is via the
          <tp:member-ref>PowerSavingChanged</tp:member-ref> signal.</p>
      </tp:docstring>
    </property>

    <signal name="PowerSavingChanged"
            tp:name-for-bindings="Power_Saving_Changed">
      <arg name="Active" type="b">
        <tp:docstring>
          The new state of the power saving feature.
        </tp:docstring>
      </arg>
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        The <tp:member-ref>PowerSavingActive</tp:member-ref>
        property changed.
      </tp:docstring>
    </signal>
  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->