sending uint16 variable over dbus proxy call

s s sk53901 at gmail.com
Mon Jul 12 04:40:37 PDT 2010


Hi all,

i am trying to call a method with args as string and a GValue.

and  that method is expecting a uint16 value within GValue.

below is the piece of code

uint time_out=15;
GValue val=G_VALUE_INIT;
g_value_init(&val,G_TYPE_UINT);
GError *error=NULL;
g_value_set_uint(&val,time_out);
    if(!dbus_g_proxy_call (proxy, <method-name>, &error,
G_TYPE_STRING,<string>, G_TYPE_VALUE,&val, G_TYPE_INVALID, G_TYPE_INVALID))
    {
                   g_print("failed\n %s ",error->message);
    }


if i execute the above  piece of code i am getting error ->"Invalid
arguments in method call"

i tried to search the data types what it is expecting , and i got with
numbers 117 and 113
g_print("\n arg type %d %d \n"
,dbus_message_iter_get_arg_type(&var),DBUS_TYPE_UINT16)


when i checked the number references i found
UINT16    113 (ASCII 'q')

how to add an unint16 value to a GValue ?

and how to send a unint16 values through proxy call?

Thanks,
sk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100712/4ba1292c/attachment.html>


More information about the dbus mailing list