Beginner DBus question(s)
linux at alteeve.com
Fri Mar 17 09:50:59 PST 2006
I have decided to re-write a backup program I had been working on for
a couple of years now from the ground up. This got me looking at new
ways to do things and it looks like DBus is exactly what I want. I have
read the Net::DBus tutorials (what there is of them) and have tried to
read the other various docs I could find but I have hit something of a
road block and was hoping for some help. I write mostly in Perl but am
not adverse to learning C is there is a compelling reason to use it.
By the way, I am not asking anyone to make what I want work, just a
little bit of a push in the right direction with perhaps a small sample
script I could play with/build on. :)
What I am trying to do is listen for messages about:
- Disk (USB/Firewire/etc) being connected, mounted or unmounted
- Optical drives when media is ejected or inserted (and what type)
- Possibly tape drive events, but this is low priority.
Can I use DBus to query a device? For example, when a disk is added
could I query DBus to get info like how many partitions are available,
if/where they were mounted, their total and used capacity and so on?
Thanks muchly in advance!!
More information about the dbus