Re: [Vala] Tidy way to have dbus client and server in the same project?



On Sun, Nov 20, 2011 at 1:01 AM, Dylan McCall <dylanmccall gmail com> wrote:

I have a project where my settings application uses dbus to talk to a
daemon, which is part of the same codebase, to collect runtime
information. Right now I have some code belonging to the settings
application that describes the daemon's dbus interface, and some other
code for the daemon that implements it.

What I would like to do is something like this:

[DBus (name = "org.brainbreak.Helper")]
public interface BreakHelperRemote : Object {
       public abstract string get_status_for_break(string break_name)
throws IOError;
       public abstract void trigger_break(string break_name) throws
IOError;
}

[DBus (name = "org.brainbreak.Helper")]
private class BreakHelperServer : BreakHelperRemote, Object {
       public string get_status_for_break(string break_name) {
               // blah
       }

       public void trigger_break(string break_name) {
               // blah
       }
}


What's the problem in dropping the DBus attribute of the implementation?

-- 
www.debian.org - The Universal Operating System


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