hal/doc/spec hal-spec.xml.in,1.18,1.19
Joe Shaw
joe at freedesktop.org
Fri Sep 17 10:05:50 PDT 2004
Update of /cvs/hal/hal/doc/spec
In directory gabe:/tmp/cvs-serv18110/doc/spec
Modified Files:
hal-spec.xml.in
Log Message:
2004-09-17 Joe Shaw <joeshaw at novell.com>
* doc/spec/hal-spec.xml.in: Add the Lock and Unlock methods to the
spec.
* hald/hald_dbus.c (raise_device_not_locked,
raise_device_already_locked): New errors for the locking methods.
(device_query_capability): Change the parsing to split up caps on
spaces rather than doing a substring match.
(device_lock): Implements the Lock dbus method, which grabs an
advisory lock on a device.
(device_unlock): Implements the Unlock dbus method.
(service_deleted): Callback which releases locks when the locking
service quits.
(filter_function): Add a ServiceDeleted handler, check for Lock
and Unlock methods.
(hald_dbus_init): Add a match for the ServiceDeleted signal so we
can see when things disconnect from the bus.
* libhal/libhal.c (hal_device_lock): Added. Takes an advisory
lock for a device.
(hal_device_unlock): Releases the lock.
Index: hal-spec.xml.in
===================================================================
RCS file: /cvs/hal/hal/doc/spec/hal-spec.xml.in,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- hal-spec.xml.in 16 Sep 2004 22:04:15 -0000 1.18
+++ hal-spec.xml.in 17 Sep 2004 17:05:48 -0000 1.19
@@ -3223,6 +3223,23 @@
# @raises org.freedesktop.Hal.NoSuchDevice
#
bool QueryCapability(string capability)
+
+# Take an advisory lock on the device.
+#
+# @param reason A user-presentable reason why the device
+# is locked.
+# @raises org.freedesktop.Hal.NoSuchDevice,
+# org.freedesktop.Hal.DeviceAlreadyLocked
+#
+void Lock(string reason)
+
+# Release an advisory lock on the device.
+#
+# @raises org.freedesktop.Hal.NoSuchDevice,
+# org.freedesktop.Hal.DeviceAlreadyLocked,
+# org.freedesktop.Hal.PermissionDenied
+#
+void Unlock()
</programlisting>
<para>
More information about the hal-commit
mailing list