Hi All,
Thanks for your reply.
I checked that udisk daemon is running as "udisksd".
I ran "udisksctl dump" , it gives logs on USB insertion which shows it is using
"org.freedesktop.UDisks2" service.
Below is the code snapshot which I am using to get USB insertion event using
GDBus. But I am not able to get USB insertion events. Kindly let me know if I
am doing something wrong.
Thanks!!
/****************Code snapshot**************************************/
GDBusConnection *connection;
GDBusMessage* message;
GDBusProxy *proxy;
GError *error = NULL;
connection = g_bus_get_sync(DBUS_BUS_SYSTEM,NULL,NULL);
if (connection == NULL)
{
g_printerr ("Failed to open connection to bus: %s\n",error->message);
g_error_free (error);
exit (1);
}
else
{
printf("Got a connection to DBUS_BUS_SYSTEM\n");
}
proxy = g_dbus_proxy_new_sync(connection, G_DBUS_PROXY_FLAGS_NONE , NULL,
"org.freedesktop.UDisks2", "/org/freedesktop/UDisks2",
"org.freedesktop.UDisks2", NULL, NULL);
if(proxy == NULL)
{
g_printerr ("Failed To Create A proxy...: %s\n", error->message);
g_error_free (error);
exit(1);
}
else
printf("Probably got a connection to the correct interface...\n");
g_signal_connect(proxy,"g-signal",(GCallback)device_added,NULL);
g_signal_connect(proxy,"g-signal",(GCallback)device_removed,NULL);
loop=g_main_loop_new(NULL,FALSE);
g_main_loop_run (loop);
g_error_free (error);
return 0;
________________________________
From: Ruchi Sharma
Sent: 09 September 2014 18:20:03
To: [email protected]
Subject: Re: USB insertion event on Tizen through dbus
Hi,
Thanks for your reply.
I checked that udisk daemon is running as "udisksd".
I ran "udisksctl dump" , it gives logs on USB insertion which shows it is using
"org.freedesktop.UDisks2" service.
I tried to get these events through GDBus APIs but I was not able to get the
events.
Can I get some code snapshot of GDBus APIs using "org.freedesktop.UDisks2"
service ??
Thanks !!
Regards,
Ruchi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi