Hi!
Have you created a DBus interface file? Are you running that stuff as root?
Cheers,
   Matthias

2012/11/7 rastersoft <[email protected]>:
> 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)
> [email protected]              http://www.rastersoft.com
>
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to