~xavi-garcia-mena/ubuntu/vivid/upower/percentages-power-off

« back to all changes in this revision

Viewing changes to src/org.freedesktop.UPower.QoS.xml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-02-16 10:16:24 UTC
  • Revision ID: james.westby@ubuntu.com-20100216101624-2cmwqsr1ndftdd87
Tags: upstream-0.9.0+git20100216.72bb2
ImportĀ upstreamĀ versionĀ 0.9.0+git20100216.72bb2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE node PUBLIC
 
2
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
 
3
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" [
 
4
  <!ENTITY ERROR_GENERAL "org.freedesktop.UPower.GeneralError">
 
5
]>
 
6
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
 
7
  <interface name="org.freedesktop.UPower.QoS">
 
8
    <doc:doc>
 
9
      <doc:description>
 
10
        <doc:para>
 
11
          org.freedesktop.UPower.QoS is a DBus interface implimented
 
12
          by DeviceKit-power.
 
13
          It allows applications to request latencies, for example a couple of seconds
 
14
          for an IM application, or a few hundred microseconds for a multiplayer game.
 
15
        </doc:para>
 
16
        <doc:para>
 
17
          Use cases:
 
18
        </doc:para>
 
19
        <doc:itemizedlist>
 
20
          <doc:listitem>
 
21
            <doc:para>
 
22
              I want my IM application to request 0.5s latency for messages.
 
23
            </doc:para>
 
24
            <doc:para>
 
25
              I'm running an OpenGL simulation and want maximum performance,
 
26
              even when on battery power.
 
27
            </doc:para>
 
28
            <doc:para>
 
29
              I'm running an SQL server for a credit card company, and want the
 
30
              server to request low latency CPU and network as any delay costs money.
 
31
            </doc:para>
 
32
            <doc:para>
 
33
              I'm an admin, and want to change the power consumption vs. latency
 
34
              from cron scripts so it uses high latency during the night for
 
35
              maximum power saving, and low latency during business hours.
 
36
            </doc:para>
 
37
            <doc:para>
 
38
              I want high throughput when copying files, but want low throughput
 
39
              for downloading updates in the background.
 
40
            </doc:para>
 
41
            <doc:para>
 
42
              I want my power manager to set all latencies to lowest when on
 
43
              AC power.
 
44
            </doc:para>
 
45
            <doc:para>
 
46
              I don't want my users messing with latency settings.
 
47
            </doc:para>
 
48
            <doc:para>
 
49
              I'm and admin and I want to be able to override all latency
 
50
              settings on my machines.
 
51
            </doc:para>
 
52
          </doc:listitem>
 
53
        </doc:itemizedlist>
 
54
        <doc:para>
 
55
          Why don't applications use the PMQoS interface directly?
 
56
          By providing a framework we can override requests by policy, and also
 
57
          control requests from random services.
 
58
          You also can't set latencies unless you're the root user, which is not
 
59
          suitable for the desktop use case.
 
60
        </doc:para>
 
61
        <doc:para>
 
62
          Of course, you can do if you really want, but then you loose the
 
63
          benefits of the query interface and the policy override,
 
64
          and have to run your application as root.
 
65
        </doc:para>
 
66
      </doc:description>
 
67
    </doc:doc>
 
68
 
 
69
    <!-- ************************************************************ -->
 
70
    <method name="SetMinimumLatency">
 
71
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
72
      <arg name="type" direction="in" type="s">
 
73
        <doc:doc>
 
74
          <doc:summary>
 
75
            The type of latency to control, <doc:tt>cpu_dma</doc:tt> or
 
76
            <doc:tt>network</doc:tt>.
 
77
          </doc:summary>
 
78
        </doc:doc>
 
79
      </arg>
 
80
      <arg name="value" direction="in" type="i">
 
81
        <doc:doc>
 
82
          <doc:summary>
 
83
            The value, in microseconds or kilobits per second.
 
84
            The value <doc:tt>-1</doc:tt> means unset and the default is used.
 
85
          </doc:summary>
 
86
        </doc:doc>
 
87
      </arg>
 
88
      <doc:doc>
 
89
        <doc:description>
 
90
          <doc:para>
 
91
            Set the minimum acceptable latency of the system.
 
92
            Setting this value tells the system to not attempt latencies below this setting.
 
93
            This may be useful in a data center or server room, when you want to override the
 
94
            latency requests from applications.
 
95
            This may be required if the server room is operating outside a standard thermal
 
96
            or power envelope, and an override is required.
 
97
            You do not have to use this method during normal operation.
 
98
          </doc:para>
 
99
        </doc:description>
 
100
        <doc:permission>Callers need the <doc:tt>org.freedesktop.upower.qos.set-minimum-latency</doc:tt> authorization</doc:permission>
 
101
        <doc:errors>
 
102
          <doc:error name="&ERROR_GENERAL;">if an error occured while setting the latency</doc:error>
 
103
        </doc:errors>
 
104
      </doc:doc>
 
105
    </method>
 
106
 
 
107
    <!-- ************************************************************ -->
 
108
    <method name="RequestLatency">
 
109
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
110
      <arg name="type" direction="in" type="s">
 
111
        <doc:doc>
 
112
          <doc:summary>
 
113
            The type of latency to control, <doc:tt>cpu_dma</doc:tt> or
 
114
            <doc:tt>network</doc:tt>.
 
115
          </doc:summary>
 
116
        </doc:doc>
 
117
      </arg>
 
118
      <arg name="value" direction="in" type="i">
 
119
        <doc:doc>
 
120
          <doc:summary>
 
121
            The value, in microseconds or kilobits per second.
 
122
            The value <doc:tt>-1</doc:tt> means remove all latency requirements.
 
123
          </doc:summary>
 
124
        </doc:doc>
 
125
      </arg>
 
126
      <arg name="persistent" direction="in" type="b">
 
127
        <doc:doc>
 
128
          <doc:summary>
 
129
            If the latency request outlives the connection.
 
130
            When the application issuing the request disconnects from the system
 
131
            bus, the latency request is automatically cleaned up.
 
132
            By setting this flag to TRUE, the request is not cleaned up when
 
133
            the client disconnects, and the cookie is preserved acress reboots.
 
134
          </doc:summary>
 
135
        </doc:doc>
 
136
      </arg>
 
137
      <arg name="cookie" direction="out" type="u">
 
138
        <doc:doc>
 
139
          <doc:summary>
 
140
            A cookie that identifies the request. This allows an application or
 
141
            service to request multiple latency settings from one process, and for
 
142
            other processes to cancel requests.
 
143
          </doc:summary>
 
144
        </doc:doc>
 
145
      </arg>
 
146
      <doc:doc>
 
147
        <doc:description>
 
148
          <doc:para>
 
149
            Set the required latency of an application or service.
 
150
          </doc:para>
 
151
        </doc:description>
 
152
        <doc:permission>
 
153
          Callers need the
 
154
          <doc:tt>org.freedesktop.upower.qos.request-latency-persistent</doc:tt>
 
155
          authorization if <doc:tt>persistent</doc:tt> is TRUE, or
 
156
          <doc:tt>org.freedesktop.upower.qos.request-latency</doc:tt> otherwise.
 
157
        </doc:permission>
 
158
        <doc:errors>
 
159
          <doc:error name="&ERROR_GENERAL;">if an error occured while setting the latency</doc:error>
 
160
        </doc:errors>
 
161
      </doc:doc>
 
162
    </method>
 
163
 
 
164
    <!-- ************************************************************ -->
 
165
    <method name="CancelRequest">
 
166
      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
 
167
      <arg name="type" direction="in" type="s">
 
168
        <doc:doc>
 
169
          <doc:summary>
 
170
            The type of latency to control, <doc:tt>cpu_dma</doc:tt> or
 
171
            <doc:tt>network</doc:tt>.
 
172
          </doc:summary>
 
173
        </doc:doc>
 
174
      </arg>
 
175
      <arg name="cookie" direction="in" type="u">
 
176
        <doc:doc>
 
177
          <doc:summary>
 
178
            A cookie that identifies the request. This allows an application or
 
179
            serivice to request multiple latency settings from one process.
 
180
          </doc:summary>
 
181
        </doc:doc>
 
182
      </arg>
 
183
      <doc:doc>
 
184
        <doc:description>
 
185
          <doc:para>
 
186
            Cancel the latency request from the application or service.
 
187
          </doc:para>
 
188
        </doc:description>
 
189
        <doc:permission>
 
190
          Callers need the
 
191
          <doc:tt>org.freedesktop.upower.qos.cancel-request</doc:tt>
 
192
          authorization if they were not the one issuing the request.
 
193
        </doc:permission>
 
194
        <doc:errors>
 
195
          <doc:error name="&ERROR_GENERAL;">if an error occured while clearing the latency</doc:error>
 
196
        </doc:errors>
 
197
      </doc:doc>
 
198
    </method>
 
199
 
 
200
    <!-- ************************************************************ -->
 
201
    <method name="GetLatency">
 
202
      <arg name="type" direction="in" type="s">
 
203
        <doc:doc>
 
204
          <doc:summary>
 
205
            The type of latency to return, <doc:tt>cpu_dma</doc:tt> or
 
206
            <doc:tt>network</doc:tt>.
 
207
          </doc:summary>
 
208
        </doc:doc>
 
209
      </arg>
 
210
      <arg name="value" direction="out" type="i">
 
211
        <doc:doc>
 
212
          <doc:summary>
 
213
            The value, in microseconds or kilobits per second.
 
214
            The value <doc:tt>-1</doc:tt> means not set or unavailable.
 
215
          </doc:summary>
 
216
        </doc:doc>
 
217
      </arg>
 
218
      <doc:doc>
 
219
        <doc:description>
 
220
          <doc:para>
 
221
            Get the lowest latency state on the system at the current time.
 
222
          </doc:para>
 
223
        </doc:description>
 
224
        <doc:errors>
 
225
          <doc:error name="&ERROR_GENERAL;">if an error occured while getting the latency</doc:error>
 
226
        </doc:errors>
 
227
      </doc:doc>
 
228
    </method>
 
229
 
 
230
    <!-- ************************************************************ -->
 
231
    <signal name="LatencyChanged">
 
232
      <arg name="type" direction="out" type="s">
 
233
        <doc:doc>
 
234
          <doc:summary>
 
235
            The type of latency that changed, <doc:tt>cpu_dma</doc:tt> or
 
236
            <doc:tt>network</doc:tt>.
 
237
          </doc:summary>
 
238
        </doc:doc>
 
239
      </arg>
 
240
      <arg name="value" direction="out" type="i">
 
241
        <doc:doc>
 
242
          <doc:summary>
 
243
            The value, in microseconds or kilobits per second.
 
244
            The value <doc:tt>-1</doc:tt> means not set or unavailable.
 
245
          </doc:summary>
 
246
        </doc:doc>
 
247
      </arg>
 
248
      <doc:doc>
 
249
        <doc:description>
 
250
          <doc:para>
 
251
            Some latency value has changed.
 
252
          </doc:para>
 
253
        </doc:description>
 
254
      </doc:doc>
 
255
    </signal>
 
256
 
 
257
    <!-- ************************************************************ -->
 
258
    <method name="GetLatencyRequests">
 
259
      <arg name="requests" direction="out" type="a(uuusxbssi)">
 
260
        <doc:doc>
 
261
          <doc:summary>
 
262
            The request lists, where each application can request different
 
263
            latency types.
 
264
            <doc:list>
 
265
              <doc:item>
 
266
                <doc:term>cookie</doc:term>
 
267
                <doc:definition>
 
268
                  The random cookie that identifies the request.
 
269
                </doc:definition>
 
270
              </doc:item>
 
271
              <doc:item>
 
272
                <doc:term>uid</doc:term>
 
273
                <doc:definition>
 
274
                  The user ID that issued the request.
 
275
                </doc:definition>
 
276
              </doc:item>
 
277
              <doc:item>
 
278
                <doc:term>pid</doc:term>
 
279
                <doc:definition>
 
280
                  The process ID of the application.
 
281
                </doc:definition>
 
282
              </doc:item>
 
283
              <doc:item>
 
284
                <doc:term>exec</doc:term>
 
285
                <doc:definition>
 
286
                  The executable that issued the request.
 
287
                </doc:definition>
 
288
              </doc:item>
 
289
              <doc:item>
 
290
                <doc:term>timespec</doc:term>
 
291
                <doc:definition>
 
292
                  The number of seconds since the epoch.
 
293
                </doc:definition>
 
294
              </doc:item>
 
295
              <doc:item>
 
296
                <doc:term>persistent</doc:term>
 
297
                <doc:definition>
 
298
                  If the request is persistent and outlives the connection lifetime.
 
299
                </doc:definition>
 
300
              </doc:item>
 
301
              <doc:item>
 
302
                <doc:term>type</doc:term>
 
303
                <doc:definition>
 
304
                  The type of the request, <doc:tt>cpu_dma</doc:tt> or
 
305
                  <doc:tt>network</doc:tt>.
 
306
                </doc:definition>
 
307
              </doc:item>
 
308
              <doc:item>
 
309
                <doc:term>value</doc:term>
 
310
                <doc:definition>
 
311
                  The value, in microseconds or kilobits per second.
 
312
                </doc:definition>
 
313
              </doc:item>
 
314
            </doc:list>
 
315
        </doc:summary></doc:doc>
 
316
      </arg>
 
317
      <doc:doc>
 
318
        <doc:description>
 
319
          <doc:para>
 
320
            Gets all the system requests from all services and applications.
 
321
          </doc:para>
 
322
        </doc:description>
 
323
      </doc:doc>
 
324
    </method>
 
325
 
 
326
    <!-- ************************************************************ -->
 
327
    <signal name="RequestsChanged">
 
328
      <doc:doc>
 
329
        <doc:description>
 
330
          <doc:para>
 
331
            The latency requests on the system have changed.
 
332
          </doc:para>
 
333
        </doc:description>
 
334
      </doc:doc>
 
335
    </signal>
 
336
 
 
337
  </interface>
 
338
 
 
339
</node>