~ubuntu-branches/debian/sid/hal/sid

« back to all changes in this revision

Viewing changes to doc/spec/hal-spec-interfaces.xml

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-10-23 12:33:58 UTC
  • Revision ID: james.westby@ubuntu.com-20071023123358-xaf8mjc5n84d5gtz
Tags: upstream-0.5.10
ImportĀ upstreamĀ versionĀ 0.5.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    (ie. methods and signals) the given hal device object
19
19
    supports. For brevity, the <literal>org.freedesktop.Hal</literal>
20
20
    prefix have been stripped from the exceptions listed in the
21
 
    following sections. Also note that other exceptions than the ones
22
 
    listed may be thrown; for example
 
21
    following sections.
 
22
  </para>
 
23
  <para>
 
24
    Also note that other exceptions than the ones listed may be
 
25
    thrown; for example
23
26
    the <literal>org.freedesktop.Hal.Device.InterfaceLocked</literal>
24
27
    exception may be thrown regardless of how the interface is
25
 
    implemented depending on if some other process is holding a lock
26
 
    on the device cf. <xref linkend="locking"/>.
 
28
    implemented (depending on if some other process is holding a lock
 
29
    on the device cf. <xref linkend="locking"/>); if PolicyKit support
 
30
    is enabled,
 
31
    the <literal>org.freedesktop.Hal.Device.PermissionDeniedByPolicy</literal>
 
32
    exception may be thrown (the two first words in the exception
 
33
    detail is resp. a) the privilege the caller didn't have; b) the
 
34
    textual result code from PolicyKit specifying if the caller can
 
35
    obtain the privilege) if the caller is not privileged and so on.
27
36
  </para>
28
37
 
29
38
  <sect1 id="interface-manager">
133
142
              <xref linkend="locking"/> for details.
134
143
            </entry>
135
144
          </row>
136
 
 
 
145
          <row>
 
146
            <entry>SingletonAddonIsReady</entry>
 
147
            <entry></entry>
 
148
            <entry>String command_line</entry>
 
149
            <entry>PermissionDenied, SyntaxError</entry>
 
150
            <entry>
 
151
              Called by singleton addons to signal that they are
 
152
              ready to handle devices.  A singleton addon should
 
153
              implement the <link linkend="interface-singleton-addon">
 
154
                org.freedesktop.Hal.Singleton</link> interface.
 
155
            </entry>
 
156
          </row>
137
157
        </tbody>
138
158
      </tgroup>
139
159
    </informaltable>
446
466
            </entry>
447
467
          </row>
448
468
          <row>
 
469
            <entry>IsCallerPrivileged</entry>
 
470
            <entry>String</entry>
 
471
            <entry>String privilege, String caller_unique_name</entry>
 
472
            <entry>PermissionDenied, Error</entry>
 
473
            <entry>
 
474
              <para>
 
475
                Determines whether a given process on the system
 
476
                message bus is authorized according to PolicyKit on a
 
477
                specific device for a specific PolicyKit
 
478
                privilege. Unprivileged callers (e.g. with a non-zero
 
479
                uid) can only ask
 
480
                about <literal>caller_unique_name</literal> that
 
481
                matches their own uid; if this is violated
 
482
                <literal>PermissionDenied</literal> will be
 
483
                thrown. This can be used ahead of time to see if a
 
484
                given call will succeed or if it requires privilege
 
485
                elevation (TODO: clarify this once PolicyKit can auth
 
486
                over D-Bus).
 
487
              </para>
 
488
              <para>
 
489
                Returns the textual representation of a PolKitResult
 
490
                value on success. 
 
491
              </para>
 
492
              <para>
 
493
                If HAL is not built with PolicyKit support, this
 
494
                method always throws
 
495
                the <literal>org.freedesktop.Hal.Device.Error</literal>
 
496
                exception.
 
497
              </para>
 
498
            </entry>
 
499
          </row>
 
500
          <row>
449
501
            <entry>IsLockedByOthers</entry>
450
502
            <entry>Bool</entry>
451
503
            <entry>String interface_name</entry>
602
654
    </informaltable>
603
655
  </sect1>
604
656
 
605
 
 
606
657
  <sect1 id="interface-device-systempower">
607
658
    <title>org.freedesktop.Hal.Device.SystemPowerManagement interface</title>
608
659
    <para>
758
809
          </row>
759
810
          <row>
760
811
            <entry>SetCPUFreqGovernor</entry>
761
 
            <entry>Int</entry>
 
812
            <entry>Void</entry>
762
813
            <entry>String governor</entry>
763
814
            <entry>CPUFreq.UnknownGovernor</entry>
764
815
            <entry>
765
 
              Selects a CPU Frequency governor to use.
 
816
              Selects a CPU frequency scaling governor for all CPUFreq
 
817
              interfaces the kernel provides. If the userspace governor is
 
818
              set, this interface also contains a proper scaling
 
819
              mechanism.
766
820
            </entry>
767
821
          </row>
768
822
          <row>
769
823
            <entry>SetCPUFreqPerformance</entry>
770
 
            <entry>Int</entry>
771
 
            <entry>Int percent</entry>
 
824
            <entry>Void</entry>
 
825
            <entry>Int (1 to 100)</entry>
772
826
            <entry>CPUFreq.NoSuitableGovernor</entry>
773
827
            <entry>
774
828
              Sets the performance of the dynamic scaling
793
847
          </row>
794
848
          <row>
795
849
            <entry>SetCPUFreqConsiderNice</entry>
796
 
            <entry>Int</entry>
 
850
            <entry>Void</entry>
797
851
            <entry>Bool consider_niced_processes</entry>
798
852
            <entry>CPUFreq.NoSuitableGovernor</entry>
799
853
            <entry>
806
860
            </entry>
807
861
          </row>
808
862
          <row>
809
 
            <entry>SetCPUFreqConsiderNice</entry>
 
863
            <entry>GetCPUFreqConsiderNice</entry>
810
864
            <entry>Bool</entry>
811
865
            <entry></entry>
812
866
            <entry>CPUFreq.NoSuitableGovernor</entry>
1189
1243
 
1190
1244
  </sect1>
1191
1245
 
 
1246
  <sect1 id="interface-device-accesscontrol">
 
1247
    <title>org.freedesktop.Hal.Device.AccessControl interface</title>
 
1248
    <para>
 
1249
      This interface provides a mechanism for discovering when an ACL
 
1250
      is added or removed for a device file. The following signals are
 
1251
      available:
 
1252
    </para>
 
1253
 
 
1254
    <informaltable>
 
1255
      <tgroup cols="2">
 
1256
        <thead>
 
1257
          <row>
 
1258
            <entry>Method</entry>
 
1259
            <entry>Parameters</entry>
 
1260
            <entry>Description</entry>
 
1261
          </row>
 
1262
        </thead>
 
1263
        <tbody>
 
1264
          <row>
 
1265
            <entry>ACLAdded</entry>
 
1266
            <entry>UInt unix_user_id</entry>
 
1267
            <entry>
 
1268
              Emitted when an ACL have been added for a UNIX user on a
 
1269
              device object with the <literal>access_control</literal>
 
1270
              capability.
 
1271
            </entry>
 
1272
          </row>
 
1273
 
 
1274
          <row>
 
1275
            <entry>ACLRemoved</entry>
 
1276
            <entry>UInt unix_user_id</entry>
 
1277
            <entry>
 
1278
              Emitted when an ACL have been removed for a UNIX user on
 
1279
              a device object with
 
1280
              the <literal>access_control</literal> capability.
 
1281
            </entry>
 
1282
          </row>
 
1283
 
 
1284
        </tbody>
 
1285
      </tgroup>
 
1286
    </informaltable>
 
1287
 
 
1288
    <para>
 
1289
      This interface does not export any methods.
 
1290
    </para>
 
1291
 
 
1292
  </sect1>
 
1293
 
 
1294
  <sect1 id="interface-singleton-addon">
 
1295
    <title><literal>org.freedesktop.Hal.SingletonAddon</literal> interface</title>
 
1296
    <para>
 
1297
      This interface is provided by singleton addons to allow the Manager to
 
1298
      request handling of new devices and removal of old ones.
 
1299
 
 
1300
      This differs from other HAL interface definitions in that it
 
1301
      is provided by addon processes, rather than the HAL daemon itself.
 
1302
 
 
1303
      It should be exported on the path
 
1304
      <literal>/org/freedesktop/Hal/Manager</literal>.
 
1305
    </para>
 
1306
 
 
1307
    <informaltable>
 
1308
      <tgroup cols="2">
 
1309
        <thead>
 
1310
          <row>
 
1311
            <entry>Method</entry>
 
1312
            <entry>Returns</entry>
 
1313
            <entry>Parameters</entry>
 
1314
            <entry>Throws</entry>
 
1315
            <entry>Description</entry>
 
1316
          </row>
 
1317
        </thead>
 
1318
        <tbody>
 
1319
          <row>
 
1320
            <entry>
 
1321
              <literal>DeviceAdded</literal>
 
1322
            </entry>
 
1323
            <entry>
 
1324
              <para><literal>String udi</literal></para>
 
1325
              <para><literal>Dict(String,Variant) property_set</literal></para>
 
1326
            </entry>
 
1327
            <entry></entry>
 
1328
            <entry></entry>
 
1329
            <entry>
 
1330
              <para>
 
1331
                Called by the HAL Manager when a device is added that has
 
1332
                this singleton listed in
 
1333
                <link linkend="device-properties-info-singleton-addons">
 
1334
                  <literal>info.addons.singleton</literal>
 
1335
                </link>
 
1336
              </para>
 
1337
              <para>
 
1338
                An addon implementing this function should start handling the
 
1339
                device before returning, and keep track that is is handling this
 
1340
                udi.
 
1341
              </para>
 
1342
            </entry>
 
1343
          </row>
 
1344
          <row>
 
1345
            <entry>
 
1346
              <literal>DeviceRemoved</literal>
 
1347
            </entry>
 
1348
            <entry>
 
1349
              <para><literal>String udi</literal></para>
 
1350
              <para><literal>Dict(String,Variant) property_set</literal></para>
 
1351
            </entry>
 
1352
            <entry></entry>
 
1353
            <entry></entry>
 
1354
            <entry>
 
1355
              <para>
 
1356
                Called by the HAL Manager when a device is added that has
 
1357
                this singleton listed in
 
1358
                <link linkend="device-properties-info-singleton-addons">
 
1359
                  <literal>info.addons.singleton</literal>
 
1360
                </link>
 
1361
              </para>
 
1362
              <para>
 
1363
                The implementer of this function should keep track of
 
1364
                which devices it is still handling and exit when no longer
 
1365
                handling any devices.
 
1366
              </para>
 
1367
            </entry>
 
1368
          </row>
 
1369
 
 
1370
 
 
1371
        </tbody>
 
1372
      </tgroup>
 
1373
    </informaltable>
 
1374
 
 
1375
    <para>
 
1376
      This interface does not export any methods.
 
1377
    </para>
 
1378
  </sect1>
 
1379
 
1192
1380
<!--
1193
1381
  <sect1 id="interface-device-foo">
1194
1382
    <title>org.freedesktop.Hal.Device.Foo interface</title>