Hi all,<br><br>i am trying to call a method with args as string and a GValue.<br><br>and that method is expecting a uint16 value within GValue.<br><br>below is the piece of code<br><br>uint time_out=15;<br>GValue val=G_VALUE_INIT;<br>
g_value_init(&val,G_TYPE_UINT);<br>GError *error=NULL;<br>g_value_set_uint(&val,time_out);<br> if(!dbus_g_proxy_call (proxy, <method-name>, &error, G_TYPE_STRING,<string>, G_TYPE_VALUE,&val, G_TYPE_INVALID, G_TYPE_INVALID))<br>
{<br> g_print("failed\n %s ",error->message);<br> }<br><br><br>if i execute the above piece of code i am getting error ->"Invalid arguments in method call"<br><br>i tried to search the data types what it is expecting , and i got with numbers 117 and 113<br>
g_print("\n arg type %d %d \n" ,dbus_message_iter_get_arg_type(&var),DBUS_TYPE_UINT16)<br><br><br>when i checked the number references i found <br>UINT16 113 (ASCII 'q')<br><br>how to add an unint16 value to a GValue ?<br>
<br>and how to send a unint16 values through proxy call?<br><br>Thanks,<br>sk<br>