Re: [Vala] Register object in SYSTEM bus




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

Hi:

Ok, finally I found it. They are at /etc/dbus-1/system.d

Thanks!

El 08/11/12 00:06, rastersoft escribió:

Hi again:

I'm unable to find documentation about how to create a DBus interface
file. Is it the XML that describes the interfaces? I supposed that it
was needed only to write bindings...

Thanks.

El 07/11/12 23:51, Matthias Klumpp escribió:
Hi!
Have you created a DBus interface file? Are you running that stuff as
root?
Cheers,
Matthias

2012/11/7 rastersoft <raster rastersoft com>:
Hi all:

I'm trying to register an object in dbus'SYSTEM bus, but I'm unable to
do so. I try with:


[DBus (name = "com.rastersoft.gamed")]

public class dbus_class: Object {

public void set_priority(int new_priority) {

k.do_check(new_priority);

}

}

void on_bus_aquired (DBusConnection conn) {



GLib.stdout.printf ("Registering bus\n");

try {

var l=conn.register_object<dbus_class> ("/com/rastersoft/gamed", new
dbus_class());

GLib.stdout.printf ("Registered bus %d\n",(int)l);

} catch (IOError e) {

GLib.stderr.printf ("Could not register service\n");

Posix.exit(-1);

}

}



Bus.own_name (BusType.SYSTEM, "com.rastersoft.gamed",
BusNameOwnerFlags.NONE, on_bus_aquired , () => {

GLib.stdout.printf ("Catched bus\n");

}, () => {

GLib.stderr.printf ("Bus lost\n");

Posix.exit(-1);

});



But always get "Bus lost". If I replace BusType.SYSTEM with
BusType.SESSION, it works fine. What am I doing incorrect?

Thanks!

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

_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list



_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list

- -- 
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://www.enigmail.net/

iEYEARECAAYFAlCa69sACgkQXEZvyfy1ha9vXACg0FvQNJLILbWtctnKW0+DpbrE
e/wAnR5uPRV7+AfBsLaRiym8CZWtrPq9
=/5Po
-----END PGP SIGNATURE-----



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