Re: Re: send_action_list vala



On Fr, 2012-02-10 at 00:09 +0100, andrea zambon wrote:
> Thanks for the patch. I added the "out" and works well.
> Now I'm trying GetProtocolInfo but i get any results. The list values is empty.
> 
> var in_names = new List<string> ();
> var in_values = new List<Value?> ();
> 
> var out_names = new List<string> ();
> var out_types = new List<Type> ();
> var out_values = new List<Value?> ();

Yes, despite the name, out_names and out_types are _input_ values. You
need
out_names.append ("SourceProtocolInfo");
out_names.append ("SinkProtocolInfo");

out_types.append (typeof (string));
out_types.append (typeof (string));

Btw, the varargs versions work fine from Vala, why don't you use those?

> 
> try {
>    proxy.send_action_list("GetProtocolInfo",in_names,in_values,out_names,out_types,out
> out_values);
> } catch (Error err) {
>    stdout.printf ("%s\n",err.message);
> }	
> 
> foreach (Value? element in out_values) {
>     stdout.printf ("ProtocolInfo: %s\n",(string)element);
> }
> 
> I do not know where to look.
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]