[tracker/miner-flickr-network-aware: 2/5] libtracker-common: Add config file Vala bindings



commit 4e914e39de86f2017ecc48229b827de6ba9fc970
Author: Adrien Bustany <abustany gnome org>
Date:   Mon May 31 10:16:13 2010 -0400

    libtracker-common: Add config file Vala bindings
    
    This commit adds bindings for both TrackerConfigFile and
    TrackerKeyfileObject in libtracker-common.vapi

 src/libtracker-common/libtracker-common.vapi |   30 ++++++++++++++++++++++++++
 src/libtracker-data/Makefile.am              |    2 +-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-common/libtracker-common.vapi b/src/libtracker-common/libtracker-common.vapi
index d737529..6424007 100644
--- a/src/libtracker-common/libtracker-common.vapi
+++ b/src/libtracker-common/libtracker-common.vapi
@@ -27,5 +27,35 @@ namespace Tracker {
 		OFFSET,
 		INVALID_ISO8601
 	}
+
+	[CCode (cheader_filename = "libtracker-common/tracker-common.h")]
+	public class ConfigFile : GLib.Object {
+		[NoAccessorMethod]
+		public string domain { get; construct; }
+		public bool save ();
+		public virtual signal void changed ();
+		public GLib.File file;
+		public GLib.FileMonitor monitor;
+		public bool file_exists;
+		public GLib.KeyFile key_file;
+	}
+
+	[CCode (cheader_filename = "libtracker-common/tracker-common.h")]
+	public class KeyfileObject {
+		public static string blurb (void *object, string property);
+		public static bool default_boolean (void *object, string property);
+		public static int  default_int (void *object, string property);
+		public static bool validate_int (void *object, string propery, int value);
+		public static void load_int (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void load_boolean (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void load_string (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void load_string_list (void *object, string property, GLib.KeyFile key_file, string group, string key, out GLib.SList return_instead);
+		public static void load_directory_list (void *object, string property, GLib.KeyFile key_file, string group, string key, bool is_recursive, out GLib.SList return_instead);
+		public static void save_int (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void save_boolean (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void save_string (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void save_string_list (void *object, string property, GLib.KeyFile key_file, string group, string key);
+		public static void save_directory_list (void *object, string property, GLib.KeyFile key_file, string group, string key);
+	}
 }
 
diff --git a/src/libtracker-data/Makefile.am b/src/libtracker-data/Makefile.am
index b53cae9..e4af783 100644
--- a/src/libtracker-data/Makefile.am
+++ b/src/libtracker-data/Makefile.am
@@ -60,7 +60,7 @@ vapi_sources =								\
 	libtracker-data.vapi
 
 libtracker-data.vala.stamp: $(libtracker_data_la_VALASOURCES) $(vapi_sources)
-	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) -H tracker-sparql-query.h $^
+	$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) -H tracker-sparql-query.h --pkg gio-2.0 $^
 	touch $@
 
 libtracker_data_la_LDFLAGS =						\



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