[Sugar-devel] Dbus signal when ebook switch is activated
Sascha Silbe
sascha-ml-reply-to-2010-3 at silbe.org
Thu Oct 14 04:27:00 EDT 2010
Excerpts from Gonzalo Odiard's message of Wed Oct 13 17:33:50 +0200 2010:
> bus.add_signal_receiver(my_func,
> dbus_interface="org.freedesktop.Hal.Device",
> signal_name="PropertyModified")
HAL has been deprecated [1] and will not be available anymore at some
point in the future, so I advise against relying on it.
I don't know what the best way to listen to an ebook switch is. acpid
might be worth a look:
>> In addition to rule files, acpid also accepts connections on a UNIX
>> domain socket (/var/run/acpid.socket by default). Any application may
>> connect to this socket. Once connected, acpid will send the text of all
>> ACPI events to the client. The client has the responsibility of
>> filtering for messages about which it cares. acpid will not close the
>> client socket except in the case of a SIGHUP or acpid exiting.
Asking for advice on devkit-devel [2] might be a good idea as well.
UPower already has a LidIsClosed property (and sends property change
notifications [4]) so it might be straightforward to add support for
ebook switches.
Sascha
[1] http://lists.freedesktop.org/archives/hal/2008-May/011560.html
[2] http://lists.freedesktop.org/mailman/listinfo/devkit-devel
[3] http://upower.freedesktop.org/docs/UPower.html#UPower:LidIsClosed
[4] http://upower.freedesktop.org/docs/UPower.html#UPower::Changed
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101014/7c0f5931/attachment.pgp>
More information about the Sugar-devel
mailing list