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
24
Also note that other exceptions than the ones listed may be
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
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.
29
38
<sect1 id="interface-manager">
133
142
<xref linkend="locking"/> for details.
146
<entry>SingletonAddonIsReady</entry>
148
<entry>String command_line</entry>
149
<entry>PermissionDenied, SyntaxError</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.
469
<entry>IsCallerPrivileged</entry>
470
<entry>String</entry>
471
<entry>String privilege, String caller_unique_name</entry>
472
<entry>PermissionDenied, Error</entry>
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
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
489
Returns the textual representation of a PolKitResult
493
If HAL is not built with PolicyKit support, this
495
the <literal>org.freedesktop.Hal.Device.Error</literal>
449
501
<entry>IsLockedByOthers</entry>
450
502
<entry>Bool</entry>
451
503
<entry>String interface_name</entry>
760
811
<entry>SetCPUFreqGovernor</entry>
762
813
<entry>String governor</entry>
763
814
<entry>CPUFreq.UnknownGovernor</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
769
823
<entry>SetCPUFreqPerformance</entry>
771
<entry>Int percent</entry>
825
<entry>Int (1 to 100)</entry>
772
826
<entry>CPUFreq.NoSuitableGovernor</entry>
774
828
Sets the performance of the dynamic scaling
1246
<sect1 id="interface-device-accesscontrol">
1247
<title>org.freedesktop.Hal.Device.AccessControl interface</title>
1249
This interface provides a mechanism for discovering when an ACL
1250
is added or removed for a device file. The following signals are
1258
<entry>Method</entry>
1259
<entry>Parameters</entry>
1260
<entry>Description</entry>
1265
<entry>ACLAdded</entry>
1266
<entry>UInt unix_user_id</entry>
1268
Emitted when an ACL have been added for a UNIX user on a
1269
device object with the <literal>access_control</literal>
1275
<entry>ACLRemoved</entry>
1276
<entry>UInt unix_user_id</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.
1289
This interface does not export any methods.
1294
<sect1 id="interface-singleton-addon">
1295
<title><literal>org.freedesktop.Hal.SingletonAddon</literal> interface</title>
1297
This interface is provided by singleton addons to allow the Manager to
1298
request handling of new devices and removal of old ones.
1300
This differs from other HAL interface definitions in that it
1301
is provided by addon processes, rather than the HAL daemon itself.
1303
It should be exported on the path
1304
<literal>/org/freedesktop/Hal/Manager</literal>.
1311
<entry>Method</entry>
1312
<entry>Returns</entry>
1313
<entry>Parameters</entry>
1314
<entry>Throws</entry>
1315
<entry>Description</entry>
1321
<literal>DeviceAdded</literal>
1324
<para><literal>String udi</literal></para>
1325
<para><literal>Dict(String,Variant) property_set</literal></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>
1338
An addon implementing this function should start handling the
1339
device before returning, and keep track that is is handling this
1346
<literal>DeviceRemoved</literal>
1349
<para><literal>String udi</literal></para>
1350
<para><literal>Dict(String,Variant) property_set</literal></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>
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.
1376
This interface does not export any methods.
1193
1381
<sect1 id="interface-device-foo">
1194
1382
<title>org.freedesktop.Hal.Device.Foo interface</title>