242
242
If ConsoleKit support is enabled, the variables
243
<literal>CK_NUM_SEATS</literal> (number of seats),
244
<literal>CK_NUM_SESSIONS</literal> (number of sessions),
243
245
<literal>CK_SEATS</literal> (tab sep. list of seat-id's),
244
246
<literal>CK_SEAT_seat-id</literal> (tab sep. list of session-id's for a seat),
247
<literal>CK_SEAT_NUM_SESSIONS_seat-id</literal> (number of sessions on a seat),
248
<literal>CK_SESSION_SEAT_session-id</literal> (the seat that a session belongs to) and
245
249
<literal>CK_SESSION_IS_ACTIVE_session-id</literal> (whether a given session is active) and
246
<literal>CK_SESSION_UID_session-id</literal> (the user of the session)
250
<literal>CK_SESSION_UID_session-id</literal> (the user of the session) and
247
251
<literal>CK_SESSION_IS_LOCAL_session-id</literal> (whether a session is local),
248
will be exported as well.
252
<literal>CK_SESSION_HOSTNAME_session-id</literal> (host name of session's display if it's not local),
253
will be exported as well. Example:
260
CK_SEAT_Seat1=Session1 Session3
261
CK_SEAT_NUM_SESSIONS_Seat1=2
262
CK_SESSION_IS_ACTIVE_Session1=true
263
CK_SESSION_IS_ACTIVE_Session3=false
264
CK_SESSION_IS_LOCAL_Session1=true
265
CK_SESSION_IS_LOCAL_Session3=true
266
CK_SESSION_SEAT_Session1=Seat1
267
CK_SESSION_SEAT_Session3=Seat1
268
CK_SESSION_UID_Session1=500
269
CK_SESSION_UID_Session3=501
273
Note that all ConsoleKit object paths given are just base
274
names; the real D-Bus object path can be reconstructed by
275
appending <literal>/org/freedesktop/ConsoleKit/</literal>
276
prepended to the given identifer.
251
280
The HAL daemon is not suspended while callouts are executing. Thus,
252
281
callouts can communicate with the HAL daemon using the D-BUS network
408
<sect2 id="device-properties-info-method-calls">
437
<sect2 id="device-properties-info-singleton-addons">
438
<title>Singleton Addons</title>
441
Singleton Addons are programs that are started by HAL to
442
handle a set of devices. They are identified by the command line
443
used to start them. They MUST implement the
444
<link linkend="interface-singleton-addon">
445
<literal>org.freedesktop.Hal.SingletonAddon</literal>
447
interface. on the path
448
<literal>/org/freedesktop/Hal/Singleton</literal> path on
449
the direct connection to the HAL daemon.
452
When a device is added with an <literal>info.addons.singleton</literal>
453
string list key, the elements of that key are used as the command line
454
to start the singleton if the singleton is not already running.
455
Once the singleton has called <literal>SingletonAddonIsReady</literal> on
456
<link linkend="interface-manager">
457
<literal>org.freedesktop.Hal.Manager</literal>
458
</link> interface, it will receive
459
<literal>DeviceAdded</literal> calls on its
460
<link linkend="interface-singleton-addon">
461
<literal>org.freedesktop.Hal.SingletonAddon</literal>
463
interface for all devices that have
464
its commandline in <literal>info.addons.singletona</literal>.
467
If a device is added and the singleton specified in
468
<literal>info.addons.singleton</literal> is already running, the
469
singleton will recieve <literal>DeviceAdded</literal> on its
470
<link linkend="interface-singleton-addon">
471
<literal>org.freedesktop.Hal.SingletonAddon</literal>
473
interface for that new device. </para>
475
When a device is removed that is being handled by a singleton, the
476
singleton will recieve <literal>DeviceRemoved</literal> on
477
<link linkend="interface-singleton-addon">
478
<literal>org.freedesktop.Hal.SingletonAddon</literal>
480
When it is no longer handling any more devices it should exit cleanly.
487
<entry>Key (type)</entry>
488
<entry>Values</entry>
489
<entry>Mandatory</entry>
490
<entry>Description</entry>
496
<literal>info.addons.singleton</literal> (strlist)
501
A list of commandlines for singleton addons which should
510
<sect2 id="device-properties-info-method-calls">
409
511
<title>Method calls</title>
443
545
<literal>HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME</literal>
444
546
(the unique system bus connection name of the caller) are
445
set (If HAL, or a HAL addon, is invoking a method, then these
446
variables will both assume the value 0.)
547
set. Additionally, if HAL is built with ConsoleKit support,
548
<literal>HAL_METHOD_INVOKED_BY_PID</literal> and
549
<literal>HAL_METHOD_INVOKED_BY_SELINUX_CONTEXT</literal> (but
550
only if the running system have SELinux enabled) will be
551
set. If HAL itself, or a HAL addon, is invoking a method, then
552
these variables will not be present. Here's an example
556
HAL_METHOD_INVOKED_BY_UID=500
557
HAL_METHOD_INVOKED_BY_PID=22553
558
HAL_METHOD_INVOKED_BY_SELINUX_CONTEXT=user_u:system_r:unconfined_t
559
HAL_METHOD_INVOKED_BY_SYSTEMBUS_CONNECTION_NAME=:1.138
563
In addition, with ConsoleKit
564
support, <literal>HAL_METHOD_INVOKED_BY_SESSION</literal> will
565
be set to (the basename) of the ConsoleKit session object path
566
but only if the caller is in a session. The method handler can
567
then use the previously
568
mentioned <literal>CK_SESSION_*</literal> to learn everything
569
about the context of the caller.
450
574
<tgroup cols="2">
2518
2642
</informaltable>
2645
<sect2 id="device-properties-bluetooth_hci">
2646
<title>bluetooth_hci namespace</title>
2648
Device objects representing a Bluetooth Host Controller Interface.
2654
<entry>Key (type)</entry>
2655
<entry>Values</entry>
2656
<entry>Mandatory</entry>
2657
<entry>Description</entry>
2662
<entry><literal>bluetooth_hci.address</literal> (uint64)</entry>
2665
<entry>Address of the host controller interface.</entry>
2668
<entry><literal>bluetooth_hci.originating_device</literal> (string)</entry>
2671
<entry>The UDI of the physical device (e.g. an USB interface) that provides the HCI hardware.</entry>
2678
<sect2 id="device-properties-bluetooth_acl">
2679
<title>bluetooth_acl namespace</title>
2681
Device objects representing Asynchronous Connection-oriented Links.
2687
<entry>Key (type)</entry>
2688
<entry>Values</entry>
2689
<entry>Mandatory</entry>
2690
<entry>Description</entry>
2695
<entry><literal>bluetooth_acl.address</literal> (uint64)</entry>
2698
<entry>Address of the device at the other end of the connection.</entry>
2701
<entry><literal>bluetooth_acl.originating_device</literal> (string)</entry>
2704
<entry>The UDI of the Bluetooth HCI (of
2705
capability <literal>bluetooth_hci</literal>) that the
2706
connection is made through.
2714
<sect2 id="device-properties-bluetooth_sco">
2715
<title>bluetooth_sco namespace</title>
2717
Device objects representing Synchronous Connection-Oriented links.
2723
<entry>Key (type)</entry>
2724
<entry>Values</entry>
2725
<entry>Mandatory</entry>
2726
<entry>Description</entry>
2731
<entry><literal>bluetooth_sco.address</literal> (uint64)</entry>
2734
<entry>Address of the device at the other end of the connection.</entry>
2737
<entry><literal>bluetooth_sco.originating_device</literal> (string)</entry>
2740
<entry>The UDI of the Bluetooth HCI (of
2741
capability <literal>bluetooth_hci</literal>) that the
2742
connection is made through.
2522
2752
<sect1 id="properties-functional">
3951
4215
</informaltable>
4217
<sect2 id="device-properties-storage-linux-raid">
4219
storage.linux_raid namespace
4222
This namespace is used to describe logical Software RAID
4223
devices under Linux using the <literal>md</literal> driver. By
4224
and large, all the same properties under
4225
the <literal>storage</literal> name space applies except
4226
that <literal>storage.serial</literal> is set to the UUID of
4227
the RAID set, <literal>storage.firmware_version</literal> is
4228
set to the version of the <literal>md</literal> driver and the
4229
value of <literal>storage.hotpluggable</literal> is taken from
4230
the enclosing drive of the first RAID component
4231
encountered. In addition, the following properties are
4238
<entry>Key (type)</entry>
4239
<entry>Values</entry>
4240
<entry>Mandatory</entry>
4241
<entry>Description</entry>
4247
<literal>storage.linux_raid.level</literal> (string)
4251
<entry>the RAID level of the device as reported by the kernel (linear, raid0, raid1, raid4, raid5, raid6, raid10)</entry>
4255
<literal>storage.linux_raid.sysfs_path</literal> (string)
4259
<entry>sysfs path of device, e.g. /sys/block/md0</entry>
4263
<literal>storage.linux_raid.num_components</literal> (int)
4267
<entry>Number of components in the RAID array</entry>
4271
<literal>storage.linux_raid.num_components_active</literal> (int)
4276
Number of active components in the RAID array. If less
4277
than <literal>storage.linux_raid.num_components</literal>
4278
it means that the RAID array is running in degraded
4284
<literal>storage.linux_raid.components</literal> (strlist)
4288
<entry>UDI's of the volumes constituting the array.</entry>
4292
<literal>storage.linux_raid.is_syncing</literal> (bool)
4296
<entry>TRUE if, and only if, the array is currently syncing</entry>
4300
<literal>storage.linux_raid.sync.action</literal> (string)
4303
<entry>only if <literal>.is_syncing</literal> is TRUE</entry>
4304
<entry>The syncing mechanism as reported by the kernel (idle, resync, check, repair, recover)</entry>
4308
<literal>storage.linux_raid.sync.progress</literal> (double)
4311
<entry>only if <literal>.is_syncing</literal> is TRUE</entry>
4312
<entry>Number between 0 and 1 representing progress of the sync operation. This is updated regulary when syncing is happening.</entry>
4316
<literal>storage.linux_raid.sync.speed</literal> (uint64)
4319
<entry>only if <literal>.is_syncing</literal> is TRUE</entry>
4320
<entry>Speed of the sync operation, in kB/s. This is updated regulary when syncing is happening.</entry>
3953
4326
<sect2 id="device-properties-net">
4518
<sect2 id="device-properties-net-bluetooth">
4520
net.bluetooth namespace
4523
Bluetooth ethernet networking devices is described in this namespace
4524
for device objects with the capability
4525
<literal>net.bluetooth</literal>.
4527
objects can only have the <literal>net.bluetooth</literal> capability
4528
if they already have the capability <literal>net</literal>.
4534
<entry>Key (type)</entry>
4535
<entry>Values</entry>
4536
<entry>Mandatory</entry>
4537
<entry>Description</entry>
4543
<literal>net.bluetooth.mac_address</literal> (uint64)
4545
<entry>example: 0x0010605d8ef4</entry>
4547
Only if the <literal>net.bluetooth</literal> capability is set
4549
<entry>48-bit address</entry>
4553
<literal>net.bluetooth.name</literal> (string)
4555
<entry>example: Network Access Point Service</entry>
4557
Only if the <literal>net.bluetooth</literal> capability is set and Bluez is being used.
4559
<entry>Displayable Name for network connection</entry>
4563
<literal>net.bluetooth.uuid</literal> (string)
4565
<entry>example: 00001116-0000-1000-8000-00805f9b34fb</entry>
4567
Only if the <literal>net.bluetooth</literal> capability is set and Bluez is being used.
4569
<entry>Universal Unique Identifier for network connection</entry>
4144
4577
<sect2 id="device-properties-net-irda">
4146
4579
net.irda namespace
4200
4633
<entry>Yes</entry>
4201
4634
<entry>Special device file for recieving input events</entry>
4638
<literal>input.x11_driver</literal> (string)
4640
<entry>e.g. "evdev"</entry>
4642
<entry>X11 input driver to use</entry>
4648
<sect2 id="device-properties-input-keys">
4650
input.keys namespace
4653
The input device have keys that can be pressed. No namespace
4654
specific properties.
4657
<sect2 id="device-properties-input-keypad">
4659
input.keypad namespace
4662
The input device have keypad keys. No namespace
4663
specific properties.
4666
<sect2 id="device-properties-input-keyboard">
4668
input.keyboard namespace
4671
The input device is a normal keyboard. No namespace specific
4675
<sect2 id="device-properties-input-mouse">
4677
input.mouse namespace
4680
The input device is a mouse. No namespace specific
4684
<sect2 id="device-properties-input-switch">
4686
input.switch namespace
4689
The input device is a switch, e.g. it has buttons with
4690
state. No namespace specific properties.
4693
<sect2 id="device-properties-input-joystick">
4695
input.joystick namespace
4698
The input device is a joystick. No namespace specific
4702
<sect2 id="device-properties-input-tablet">
4704
input.tablet namespace
4707
The input device is a tablet. No namespace specific
4711
<sect2 id="device-properties-input-keymap">
4713
input.keymap namespace
4716
Device objects with the capability <literal>input.keymap</literal>
4717
provide facilities to remap keyboard buttons.
4723
<entry>Key (type)</entry>
4724
<entry>Values</entry>
4725
<entry>Mandatory</entry>
4726
<entry>Description</entry>
4732
<literal>input.keymap.data</literal> (strlist)
4734
<entry>e.g. "e017:brightnessup"</entry>
4737
The scancode is represented in hex and the keycode name as
4738
as string. The keycode name is not case sensitive.
4739
On Linux, the keycode name should be the same constant as
4740
present in /usr/include/linux/input.h with the 'KEY_'
4741
prefix removed, e.g. 'KEY_SLEEP' -> 'sleep'.
4742
You can append as many <literal>input.keymap.data</literal>
4743
values as there are keys to remap.
4750
<sect2 id="device-properties-input-xkb">
4755
Device objects with the capability <literal>input.keys</literal>
4756
can provide information about their physical layout.
4762
<entry>Key (type)</entry>
4763
<entry>Values</entry>
4764
<entry>Mandatory</entry>
4765
<entry>Description</entry>
4771
<literal>input.xkb.rules</literal> (string)
4773
<entry>e.g. "base"</entry>
4776
XKB rules file to use; 'base' is standard, but 'xorg'
4777
or 'xfree86' may be needed for backwards compatibility
4778
with very old versions of XKB data.
4783
<literal>input.xkb.model</literal> (string)
4785
<entry>e.g. "logicdp"</entry>
4788
Physical keyboard model (e.g. Logitech Cordless Freedom
4789
Pro), as given to XKB.
4794
<literal>input.xkb.layout</literal> (string)
4796
<entry>e.g. "us"</entry>
4799
Keyboard layout (as engraved on the keys).
4804
<literal>input.xkb.variant</literal> (string)
4806
<entry>e.g. "nodeadkeys"</entry>
4809
Variant of the XKB layout (if any) to use.
4814
<literal>input.xkb.options</literal> (strlist)
4816
<entry>e.g. "ctrl:nocaps"</entry>
4819
Options to be provided to XKB.
4205
4824
</informaltable>
4342
<literal>portable_audio_player.access_method</literal> (string)
4961
<literal>portable_audio_player.access_method.protocols</literal> (strlist)
4963
<entry>example: storage ipod mtp pde iriver karma</entry>
4966
Indicates transfer protocols that this device can speak.
4967
<literal>storage</literal> indicates USB Mass Storage (UMS) is an access
4968
protocol. <literal>ipod</literal> indicates UMS plus an iTunes-style database.
4969
<literal>mtp</literal> indicates a device using Microsoft's Media Transfer Protocol.
4970
Arbitrary values for newer or obscure protocols are allowed but
4971
entities providing this information should try to ensure that
4972
they are not duplicating protocols under a different name.
4977
<literal>portable_audio_player.access_method.drivers</literal> (strlist)
4979
<entry>example: libgpod, libmtp, libnjb, libifp, libkarma</entry>
4982
Indicates installed device driver libraries that can
4983
handle this device. These drivers can export information
4984
in <literal>portable_audio_player.[drivername]</literal> sub-namespaces.
4985
Can also be used by libraries or programs providing extra device information
4986
to indicate the presence of this information in the appropriate sub-namespace.
4991
<literal>portable_audio_player.[drivername].protocol</literal> (strlist)
4993
<entry>example: mtp</entry>
4345
4994
<entry>Yes</entry>
4346
<entry>This property defines how the device is accessed </entry>
4350
<entry>storage</entry>
4353
The device is accessed as a Mass Storage device
4354
through a kernel driver. Application Developers
4355
should descent down the device object tree to find the
4356
device object of capability
4357
<literal>storage</literal> in order to access the
4366
The device is accessed from userspace through
4996
This entry is required for drivers listed in
4997
<literal>portable_audio_player.access_method.drivers</literal>. Indicates which
4998
protocol in <literal>portable_audio_player.access_method.protocols</literal>
4999
a particular driver will use. If the driver is providing information only, this
5000
should be set to <literal>information</literal>.
6861
<literal>access_control.type</literal> (string)
6863
<entry>Example: cdrom</entry>
6866
Type of access - only makes sense when PolicyKit
6867
support is enabled; it's used by PolicyKit to compute
6868
what privilege to check for by
6869
prepending <literal>hal-device-file-</literal> to the
6200
6875
<literal>access_control.grant_user</literal> (strlist)
6202
6877
<entry>Example: "gdm, flumotion"</entry>
6226
<literal>access_control.grant_local_session</literal> (bool)
6231
If true, access to this device should be granted to local sessions.
6232
(NOTE NOTE NOTE: this property is experimental and may disappear in the future).
6237
<literal>access_control.grant_local_active_session</literal> (bool)
6242
If true, access to this device should be granted to active local sessions.
6243
(NOTE NOTE NOTE: this property is experimental and may disappear in the future).
6248
6901
</informaltable>
6903
See also <xref linkend="interface-device-accesscontrol"/>.
6279
6935
<entry>Renamed to something more abstract, available until removed.</entry>
6938
<entry><literal>portable_audio_player.access_method</literal> (string)</entry>
6939
<entry><literal>portable_audio_player.access_method.[drivers, protocols]</literal> (strlist)</entry>
6940
<entry>2008-05-03</entry>
6941
<entry>Original entry can only indicate UMS or userspace driver devices, while some devices can be both. New structure doesn't have this limitation.</entry>
6944
<entry><literal>portable_audio_player.type</literal> (string)</entry>
6945
<entry><literal>portable_audio_player.access_method.[drivers, protocols]</literal> (strlist)</entry>
6946
<entry>2008-05-03</entry>
6947
<entry>New structure allows for better definition of access protocols and handlers.</entry>
6282
6950
<entry><literal>power_management.can_suspend_to_ram</literal> (bool)</entry>
6283
6951
<entry><literal>power_management.can_suspend</literal></entry>
6284
6952
<entry>2007-05-01</entry>