api: clarify function and usage of the Device.Udi property

This commit is contained in:
Dan Williams 2011-03-15 12:56:19 -05:00
parent fcbaa00ed0
commit 1c3a67aaa5
2 changed files with 18 additions and 2 deletions

View file

@ -4,7 +4,18 @@
<interface name="org.freedesktop.NetworkManager.Device">
<property name="Udi" type="s" access="read">
<tp:docstring>
Unique Device Identifier.
Operating-system specific transient device hardware identifier. This
is an opaque string representing the underlying hardware for the device,
and shouldn't be used to keep track of individual devices. For some
device types (Bluetooth, Modems) it is an identifier used by the
hardware service (ie bluez or ModemManager) to refer to that device,
and client programs use it get additional information from those
services which NM does not provide. The Udi is not guaranteed to be
consistent across reboots or hotplugs of the hardware. If you're looking
for a way to uniquely track each device in your application, use the
object path. If you're looking for a way to track a specific piece of
hardware across reboot or hotplug, use a MAC address or USB serial
number.
</tp:docstring>
</property>
<property name="Interface" type="s" access="read">

View file

@ -522,7 +522,12 @@ nm_device_class_init (NMDeviceClass *device_class)
/**
* NMDevice:udi:
*
* The Unique Device Identifier of the device.
* An operating-system specific device hardware identifier; this is not
* unique to a specific hardware device across reboots or hotplugs. It
* is an opaque string which for some device types (Bluetooth, Modem)
* contains an identifier provided by the underlying hardware service daemon
* such as Bluez or ModemManager, and clients can use this property to
* request more information about the device from those services.
**/
g_object_class_install_property
(object_class, PROP_UDI,