2 * Copyright © 2009 Codethink Limited
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of the
7 * licence, or (at your option) any later version.
9 * See the included COPYING file for more information.
12 * Ryan Lortie <desrt@desrt.ca>
15 [CCode (cname_prefix = "dconf_", cheader_filename = "dconf.h")]
17 public delegate void AsyncReadyCallback (AsyncResult result);
18 public struct AsyncResult { }
20 public bool is_key (string key);
21 public bool is_path (string path);
22 public bool match (string left, string right);
24 public GLib.Variant? get (string key);
25 public string[] list (string path);
26 public bool get_writable (string path);
27 public bool get_locked (string path);
29 public void set (string key, GLib.Variant value, out string event_id = null) throws GLib.Error;
30 public void set_async (string key, GLib.Variant value, DConf.AsyncReadyCallback callback);
31 public void set_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
33 public void set_locked (string key, bool value) throws GLib.Error;
34 public void set_locked_async (string key, bool value, DConf.AsyncReadyCallback callback);
35 public void set_locked_finish (DConf.AsyncResult result) throws GLib.Error;
37 public void reset (string key, out string event_id = null) throws GLib.Error;
38 public void reset_async (string key, DConf.AsyncReadyCallback callback);
39 public void reset_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
41 public void merge (string prefix, GLib.Tree tree, out string event_id = null) throws GLib.Error;
42 public void merge_async (string prefix, GLib.Tree tree, DConf.AsyncReadyCallback callback);
43 public void merge_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
45 public delegate void WatchFunc (string prefix, string[] items, string event_id);
46 public void watch (string path, WatchFunc callback);
47 public void unwatch (string path, WatchFunc callback);