using GLib;
using DBus;

namespace Foo
{

  [DBus (name = "org.example.Service")]
  public interface Service : GLib.Object
  {
    public async abstract uint get_value (string arg) throws DBus.Error;
  }
  
  public async delegate uint UIntGetter (string arg);
  
  public class ServiceImpl : GLib.Object, Service
  {
  	private UIntGetter uint_getter;
  	
  	public ServiceImpl()
  	{
  	  uint_getter = default_uint_getter;
  	}
  	
  	public async uint get_value (string arg)
  	{
  	  uint reply = yield uint_getter(arg);
      return reply;
  	}
  	
  	private async uint default_uint_getter (string arg)
  	{
  		return 27;
  	}
  }
  
  public static void main (string[] args)
  {
  	debug ("Hello");
  }
}
