Hi,<br>I have written a program that implement a method call.<br>I want to get an integer as the return value. <br>when I run the program the remote method is invocate and no error returned. But the returned integer remain zero(0).<br>
I have included the core code fragment below. <br><br>my xml is <br><br> <?xml version="1.0" encoding="UTF-8"?><br><br><node name="/org/dalesa/ProxyAdmin"><br> <interface name="org.dalesa.ProxyAdmin"><br>
<!-- Add more methods/signals if you want --><br> <method name="GetProxyAdmin"><br> <arg type="av" name="pa" direction="out"/><br>
</method><br> <method name="SetProxyAdmin"><br> <arg type="av" name="pa" direction="in"/><br> </method><br>
<method name="ProxyAdminStop"/><br> <method name="ProxyAdminStart"/><br> <method name="ProxyAdminSearch"><br> <arg type="s" name="pas" direction ="in"/><br>
<arg type="i" name="offset" direction ="in"/><br> <!--<arg type="a(ssuu)" name="pas" direction ="out"/> --><br>
<arg type="i" name="ret_offset" direction ="out"/><br> </method><br> <signal name="sig_0"><br> <arg type="(ss)" name="dalesa_value_changed" direction="out"/><br>
</signal><br> </interface><br></node><br>=========================================<br><br><b><u>server.c</u></b><br><br>//some code goes here<br>gboolean server_proxy_admin_search(ProxyAdmin *pa, char *search_str, int offset, gint *os, GError *err)<br>
{<br> g_type_init();<br> os = 100;<br>}<br><br>==============================================<br><b><u>client.c<br><br></u></b> gint ofst;<br> printf("ofst %i \n", ofst);<br> if (org_dalesa_ProxyAdmin_proxy_admin_search(driver_proxy, search_str, offset, &ofst, &error)) <br>
{<br> *err = DALESA_DBUS_OK;<br> printf("ofst %i \n", ofst);<br> return 0;<br> }<br><br>The printf prints zero. Can anybody guess what im doing wrong here.<br><br>My next auestion is can I return both GPtArray and integer in a single method?<br>
<br>for an example an xml is like <br><br><br> <method name="ProxyAdminSearch"><br>
<arg type="s" name="pas" direction ="in"/><br>
<arg type="i" name="offset" direction ="in"/><br>
<arg type="a(ssuu)" name="pas" direction ="out"/> <br>
<arg type="i" name="ret_offset" direction ="out"/><br>
</method><br><br><br>Thanks <br>--Nuwan gunarathna<br>