PDA

View Full Version : How to retrieve the device property?



vjsharma_30
24th February 2010, 19:24
Hi All,
i want to retrieve the property name of a external device connected to the system using DBUS and HAL.
This is what i am doing

this is main window constructor

hal = new HalInterface("org.freedesktop.Hal", "/org/freedesktop/Hal/Manager",
QDBusConnection::systemBus(), this);
//QDBusReply<QStringList> test = hal->FindDeviceByCapability("storage");
QDBusConnection c = QDBusConnection::sessionBus();

bool b = c.registerObject("/",this,QDBusConnection::ExportAllProperties);

b = c.registerService("org.freedesktop.Hal.devices");

Now i don't know how to retrieve the device properties like its model name etc. I have registered the object(which i am not sure i did right), and service.
On what event it will get generated and how will i retrieve these.
I have also registered the devideadded() event which gets called when any USB is plugged in.