From: Ryan Lortie Date: Wed, 2 Sep 2009 16:08:47 +0000 (-0400) Subject: add dconf vapi (hand-written) X-Git-Tag: 0.7.6~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9076f6b3f959872d79ce9e25e73b49ff5bd3bbf;p=thirdparty%2Fvala.git add dconf vapi (hand-written) --- diff --git a/vapi/Makefile.am b/vapi/Makefile.am index f8dab9ddb..65f9a1078 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -17,6 +17,7 @@ dist_vapi_DATA = \ cogl-1.0.vapi \ cogl-1.0.deps \ curses.vapi \ + dconf.vapi \ dbus-glib-1.vapi \ enchant.vapi \ fuse.deps \ diff --git a/vapi/dconf.vapi b/vapi/dconf.vapi new file mode 100644 index 000000000..7c0841012 --- /dev/null +++ b/vapi/dconf.vapi @@ -0,0 +1,48 @@ +/* + * Copyright © 2009 Codethink Limited + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * licence, or (at your option) any later version. + * + * See the included COPYING file for more information. + * + * Author: + * Ryan Lortie + */ + +[CCode (cname_prefix = "dconf_", cheader_filename = "dconf.h")] +namespace DConf { + public delegate void AsyncReadyCallback (AsyncResult result); + public struct AsyncResult { } + + public bool is_key (string key); + public bool is_path (string path); + public bool match (string left, string right); + + public GLib.Variant? get (string key); + public string[] list (string path); + public bool get_writable (string path); + public bool get_locked (string path); + + public void set (string key, GLib.Variant value, out string event_id = null) throws GLib.Error; + public void set_async (string key, GLib.Variant value, DConf.AsyncReadyCallback callback); + public void set_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public void set_locked (string key, bool value) throws GLib.Error; + public void set_locked_async (string key, bool value, DConf.AsyncReadyCallback callback); + public void set_locked_finish (DConf.AsyncResult result) throws GLib.Error; + + public void reset (string key, out string event_id = null) throws GLib.Error; + public void reset_async (string key, DConf.AsyncReadyCallback callback); + public void reset_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public void merge (string prefix, GLib.Tree tree, out string event_id = null) throws GLib.Error; + public void merge_async (string prefix, GLib.Tree tree, DConf.AsyncReadyCallback callback); + public void merge_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error; + + public delegate void WatchFunc (string prefix, string[] items, string event_id); + public void watch (string path, WatchFunc callback); + public void unwatch (string path, WatchFunc callback); +}