On Monday 08 September 2014 09:46:44 Ruchi Sharma wrote: > Hi All, > > I am working on Tizen IVI March release. > I am trying to get USB insertion/removal events through dbus APIs. I am > using UDisks service. Below is the snapshot of code: > > connection = dbus_g_bus_get(DBUS_BUS_SYSTEM,NULL); > proxy=dbus_g_proxy_new_for_name(connection,"org.freedesktop.UDisks","/org/fr > eedesktop/UDisks","org.freedesktop.UDisks"); > > dbus_g_proxy_add_signal(proxy,"DeviceAdded",DBUS_TYPE_G_OBJECT_PATH, > G_TYPE_INVALID); > dbus_g_proxy_connect_signal(proxy,"DeviceAdded",(GCallback)device_added,NUL > L,NULL); > > dbus_g_proxy_add_signal(proxy,"DeviceRemoved",DBUS_TYPE_G_OBJECT_PATH, > G_TYPE_INVALID); > dbus_g_proxy_connect_signal(proxy,"DeviceRemoved",(GCallback)device_removed > ,NULL,NULL); > > I am checking "connection" and "proxy" and they are not null.
First of all, please do not write any new code using dbus-glib. It's maintainer has publicly asked that people don't do that. That library is entirely deprecated and code should move off it as soon as possible. > But still I am not able to call callbacks on insertion and on removal of > USB. > > The above mentioned code works on ubuntu fine. I have checked that > udisks-daemon is running on ubuntu. Have you verified that udisks-daemon is running on Tizen? Run dbus-monitor -- system and see if the signals are emitted when you insert a USB device and see if udisksctl dump shows the device after it's been inserted. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Information > contained and transmitted by this e-mail is confidential and proprietary to > IGATE and its affiliates and is intended for use only by the recipient. If > you are not the intended recipient, you are hereby notified that any > dissemination, distribution, copying or use of this e-mail is strictly > prohibited and you are requested to delete this e-mail immediately and > notify the originator or [email protected] <mailto:[email protected]>. > IGATE does not enter into any agreement with any party by e-mail. Any views > expressed by an individual do not necessarily reflect the view of IGATE. > IGATE is not responsible for the consequences of any actions taken on the > basis of information provided, through this email. The contents of an > attachment to this e-mail may contain software viruses, which could damage > your own computer system. While IGATE has taken every reasonable precaution > to minimise this risk, we cannot accept liability for any damage which you > sustain as a result of software viruses. You should carry out your own > virus checks before opening an attachment. To know more about IGATE please > visit www.igate.com <http://www.igate.com>. Please ask your IT admins to remove the message above. Your email is not confidential, since it was sent to the entire world to see. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ IVI mailing list [email protected] https://lists.tizen.org/listinfo/ivi
