how to use conditions through dbus?

Dmitry Baryshev ksquirrel.iv at gmail.com
Wed May 28 00:52:47 PDT 2008


Hi.

I'm quite new in HAL and trying to write a simple client. Everything
works fine, except recieving conditions, like VolumeMount or
VolumeUnmout. I use Qt. For example:

cHAL::cHAL()
{
   QDBusConnection sys = QDBusConnection::systemBus();

   sys.connect("org.freedesktop.Hal",
                "/org/freedesktop/Hal/Manager",
                "org.freedesktop.Hal.Device",
                "Condition",
                this,
                SLOT(slotCond(const char *, const char *, const
QDBusMessage&)));
}

void cHAL::slotCond(const char *udi, const char *cond, const QDBusMessage &det)
{
    printf("CONDITION %s %s %d\n", udi, cond, det.arguments().size());
}

-------------

But when I mount or unmount any device with "/bin/mount", no condition
is recieved.  How to recieve conditions through dbus?

Thanks in advance.


More information about the hal mailing list