Re: Introspection with GUPnP

On 11.02.2015 20:15, Nick Glencross wrote:
sub action_callback
    my ($service_proxy, $service_proxy_action) = @_;

    print "Action complete\n";

    # In newer GUPnP I think this can be undef
    my $error =  Glib::File::Error->new ('io', '');

    my ($success, $out_values) = $service_proxy->end_action_list
         [ ], [ ]

It looks like the annotations for that function are not correct in
 The error parameter should be marked as an "out" parameter.

But even with that fixed, I think you would still get an error because
we don't currently support marshalling errors from C to Perl.  Like
gobject-introspection itself, the assumption is that
error-out-parameters are the last parameters of a function, in which
case the function is marked as "throws" in the .gir file.  We convert
these kinds of error-out-parameters to Perl exceptions.

That said, I think it would be fairly easy to implement the GError->SV
conversion with gperl_sv_from_gerror.

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