[dconf] update the dconf vapi



commit eb40c8a92531b51fc6659e2f9e42402e86884047
Author: Ryan Lortie <desrt desrt ca>
Date:   Thu Aug 20 11:53:54 2009 -0400

    update the dconf vapi

 editor/Makefile.am |    2 +-
 editor/dconf.vapi  |   31 ++++++++++++++++++++++++++-----
 editor/editor.vala |   14 +++++++-------
 3 files changed, 34 insertions(+), 13 deletions(-)
---
diff --git a/editor/Makefile.am b/editor/Makefile.am
index e6d72b6..51ee3f4 100644
--- a/editor/Makefile.am
+++ b/editor/Makefile.am
@@ -21,5 +21,5 @@ dconf-editor.vala.stamp: $(dconf_editor_VALASOURCES)
 	valac -C --pkg gtk+-2.0 dconf.vapi $^
 	touch $@
 
-CLEANFILES = *.c *.h editor.vala.stamp
+CLEANFILES = *.c *.h dconf-editor.vala.stamp
 EXTRA_DIST = $(dconf_editor_VALASOURCES)
diff --git a/editor/dconf.vapi b/editor/dconf.vapi
index 31e71ec..82747f2 100644
--- a/editor/dconf.vapi
+++ b/editor/dconf.vapi
@@ -21,17 +21,38 @@ namespace GLib {
 
 [CCode (cheader_filename = "dconf.h")]
 
-namespace dconf {
-  delegate void WatchFunc (string key, string[] items, uint32 sequence);
+namespace DConf {
+  public struct AsyncResult {
+  }
+
+  public delegate void AsyncReadyCallback (AsyncResult result);
+
+  bool is_key (string key);
+  bool is_path (string path);
+  bool match (string left, string right);
 
   GLib.Variant? get (string key);
   string[] list (string path);
-  bool get_locked (string path);
   bool get_writable (string path);
+  bool get_locked (string path);
+
+  void set (string key, GLib.Variant value, out string event_id = null) throws GLib.Error;
+  void set_async (string key, GLib.Variant value, DConf.AsyncReadyCallback callback);
+  void set_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
+
+  void set_locked (string key, bool value) throws GLib.Error;
+  void set_locked_async (string key, bool value, DConf.AsyncReadyCallback callback);
+  void set_locked_finish (DConf.AsyncResult result) throws GLib.Error;
+
+  void reset (string key, out string event_id = null) throws GLib.Error;
+  void reset_async (string key, DConf.AsyncReadyCallback callback);
+  void reset_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
 
-  void set (string key, GLib.Variant value,
-            out uint32 sequence = null) throws GLib.Error;
+  void merge (string prefix, GLib.Tree tree, out string event_id = null) throws GLib.Error;
+  void merge_async (string prefix, GLib.Tree tree, DConf.AsyncReadyCallback callback);
+  void merge_finish (DConf.AsyncResult result, out string event_id = null) throws GLib.Error;
 
+  delegate void WatchFunc (string prefix, string[] items, string event_id);
   void watch (string path, WatchFunc callback);
   void unwatch (string path, WatchFunc callback);
 }
diff --git a/editor/editor.vala b/editor/editor.vala
index c375b8e..982f077 100644
--- a/editor/editor.vala
+++ b/editor/editor.vala
@@ -49,7 +49,7 @@ namespace Editor {
     public string key {
       set {
         _key = value;
-        var _value = dconf.get (_key);
+        var _value = DConf.get (_key);
 
         if (_value != null)
           text = _value.print (true);
@@ -66,7 +66,7 @@ namespace Editor {
       // XXX using _key might be wrong...
       // XXX is the most recently rendered thing the one?
       print ("  %s <= '%s'\n", _key, text);
-      dconf.set (_key, new Variant.string (text));
+      DConf.set (_key, new Variant.string (text));
     }
   }
 
@@ -131,7 +131,7 @@ namespace Editor {
       set_column_types (new GLib.Type [] { typeof (string),
                                            typeof (string) });
 
-      dconf.watch ("/", change);
+      DConf.watch ("/", change);
 
       insert (out root, null, 0);
       set (root, 0, "/");
@@ -139,10 +139,10 @@ namespace Editor {
       introduce_path ("/", root);
     }
 
-    void change (string key) {
-      var value = dconf.get (key);
+    void change (string prefix, string[] items, string event_id) {
+      var value = DConf.get (prefix);
 
-      change_value ("", key, null, value);
+      change_value ("", prefix, null, value);
     }
 
     void change_value (string path, string key, TreeIter ?iter, Variant ?value) {
@@ -190,7 +190,7 @@ namespace Editor {
     }
 
     void introduce_path (string path, TreeIter ?parent) {
-      foreach (var item in dconf.list (path)) {
+      foreach (var item in DConf.list (path)) {
         TreeIter iter;
 
         append (out iter, parent);



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