Re: [Vala] Is there any way to iterate over signal arguments?



On Sat, 2012-07-21 at 20:30 +0200, marcin saepia net wrote:
Hi,

I need to write an application that catches all signals emitted by
certain GObjects and forwards it over HTTP.

Is there any way to do that in vala without manually specyfying all of
their arguments?

IIRC you would want to create a GLib.Closure and connect it to the
signal manually (with GLib.Signal.connect_closure).  The closure would
just have a custom GLib.ClosureMarshal which would send the data over
HTTP.

These aren't commonly used APIs in Vala, so you may run into some
bugs... if you do please let us know (via bugzilla).  I just pushed a
small patch for one issue I noticed so you'll need to use Vala from git
(or copy the updated bindings to your project).


-Evan




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