[Vala] asynchronous call with DBus




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all:

I'm working with DBus and Vala, and I've been able to call to a method
in UDisks; but now I want to do that call in an asynchronous manner,
because it needs some time to be completed (format a disk).

I tried something like this:

[DBus (name = "org.freedesktop.UDisks.Device")]
interface Device_if : GLib.Object {
    public abstract async void FilesystemCreate(string type, string[]
options) throws IOError;
}

Device_if my_device = Bus.get_proxy_sync<Device_if> (BusType.SYSTEM,
"org.freedesktop.UDisks","device_name");
my_device.FilesystemCreate("reiserfs",null);

and it worked; the problem is that I don't know how to know when the
call ended. In the documentation I can't find any signal to connect to.

Can somebody help me?

Thanks.

- -- 
Nos leemos
                 RASTER    (Linux user #228804)
raster rastersoft com              http://www.rastersoft.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5ZFSYACgkQXEZvyfy1ha8mpwCfVKDor1NK1ODcw4WOKW/ZHQ9p
TmgAnAhd4WPrVHIGwdFRt+MCalCycJPj
=Gk1F
-----END PGP SIGNATURE-----




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