Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers
looking for help with dbus_g_proxy_call
 

Index | Next | Previous | View Flat


jfwfreo at tpgi

Oct 26, 2011, 2:58 AM


Views: 183
Permalink
looking for help with dbus_g_proxy_call

This code:
#define PHONE_SIM_SERVICE "com.nokia.phone.SIM"
#define PHONE_SIM_PATH "/com/nokia/phone/SIM"
#define PHONE_SIM_IFACE "Phone.Sim"
#define GET_SERVICE_PROVIDER_NAME "get_service_provider_name"

DBusGProxy *dbus_g_proxy = NULL;
dbus_g_proxy = dbus_g_proxy_new_for_name(plugin->priv->dbus_conn,
PHONE_SIM_SERVICE, PHONE_SIM_PATH, PHONE_SIM_IFACE);
if(dbus_g_proxy)
{
gchar *operator_name = NULL;
guint32 val1;
guint32 val2;
gint32 val3;
if(dbus_g_proxy_call(dbus_g_proxy, GET_SERVICE_PROVIDER_NAME, NULL,
G_TYPE_INVALID, G_TYPE_STRING, &operator_name, G_TYPE_UINT, &val1,
G_TYPE_UINT, &val2, G_TYPE_INT, &val3))
{
if ((operator_name != 0) && (operator_name[0] != 0))
{
free(plugin->priv->operator_name);
plugin->priv->operator_name = strdup(operator_name);
g_free(operator_name);
g_object_unref(dbus_g_proxy);
return;
}
}
g_object_unref(dbus_g_proxy);
}

should be doing the same as this:
dbus-send --system --type=method_call --print-reply
--dest=com.nokia.phone.SIM /com/nokia/phone/SIM
Phone.Sim.get_service_provider_name

dbus_g_proxy is initialized to a valid value but the dbus_g_proxy_call call
is failing. I can confirm that the dbus-send command outputs valid output
on my device, I just cant figure out why my dbus_g_proxy_call call is failing.


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Subject User Time
looking for help with dbus_g_proxy_call jfwfreo at tpgi Oct 26, 2011, 2:58 AM
    Re: looking for help with dbus_g_proxy_call nicolaihess at web Oct 26, 2011, 3:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.