Build with vala 0.15
authorColin Walters <walters@verbum.org>
Fri, 20 Jan 2012 19:46:14 +0000 (14:46 -0500)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Fri, 17 Feb 2012 23:09:57 +0000 (15:09 -0800)
NEWS
backends/key-file/kf-persona-store.vala
configure.ac
folks/backend-store.vala
folks/object-cache.vala
tests/folks/backend-loading.vala
tests/lib/eds/backend.vala
tests/libsocialweb/aggregation.vala
tools/inspect/inspect.vala

diff --git a/NEWS b/NEWS
index 9b0753e..6bde6d8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ Bugs fixed:
 * Bug 667535 — persona created by tpf_persona_dup_for_contact() outlives its
   TpContact
 * Bug 670196 — Disable GLib deprecation warnings
+* Bug 668415 — Port to Vala 0.15.x
 
 API changes:
 * Add PostalAddress.is_empty() and Role.is_empty()
index 0d2bb53..45234d0 100644 (file)
@@ -443,16 +443,9 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore
 
       try
         {
-          /* Note: We have to use key_file_data.size () here to get its length
-           * in _bytes_ rather than _characters_. bgo#628930.
-           * In Vala >= 0.11, string.size() has been deprecated in favour of
-           * string.length (which now returns the byte length, whereas in
-           * Vala <= 0.10, it returned the character length). FIXME: We need to
-           * take this into account until we depend explicitly on
-           * Vala >= 0.11. */
-          yield this.file.replace_contents_async (key_file_data,
-              key_file_data.length, null, false, FileCreateFlags.PRIVATE,
-              cancellable);
+          yield this.file.replace_contents_async (key_file_data.data,
+              null, false, FileCreateFlags.PRIVATE,
+              cancellable, null);
         }
       catch (Error e)
         {
index 0df9011..6d32141 100644 (file)
@@ -146,7 +146,7 @@ AM_CONDITIONAL([ENABLE_LIBSOCIALWEB],
 
 GLIB_REQUIRED=2.24.0
 TP_GLIB_REQUIRED=0.13.1
-VALA_REQUIRED=0.14.0
+VALA_REQUIRED=0.15.1
 VALADOC_REQUIRED=0.3.1
 TRACKER_SPARQL_MAJOR=0.12
 TRACKER_SPARQL_REQUIRED=0.12.0
index a00bf19..9d28f9b 100644 (file)
@@ -537,10 +537,10 @@ public class Folks.BackendStore : Object {
       debug ("Searching for modules in folder '%s' ..", dir.get_path ());
 
       var attributes =
-          FILE_ATTRIBUTE_STANDARD_NAME + "," +
-          FILE_ATTRIBUTE_STANDARD_TYPE + "," +
-          FILE_ATTRIBUTE_STANDARD_IS_SYMLINK + "," +
-          FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE;
+          FileAttribute.STANDARD_NAME + "," +
+          FileAttribute.STANDARD_TYPE + "," +
+          FileAttribute.STANDARD_IS_SYMLINK + "," +
+          FileAttribute.STANDARD_CONTENT_TYPE;
 
       GLib.List<FileInfo> infos;
       try
@@ -675,7 +675,7 @@ public class Folks.BackendStore : Object {
         {
           /* Query for the MIME type; if the file doesn't exist, we'll get an
            * appropriate error back, so this also checks for existence. */
-          file_info = yield file.query_info_async (FILE_ATTRIBUTE_STANDARD_TYPE,
+          file_info = yield file.query_info_async (FileAttribute.STANDARD_TYPE,
               FileQueryInfoFlags.NONE, Priority.DEFAULT, null);
         }
       catch (Error error)
@@ -766,9 +766,9 @@ public class Folks.BackendStore : Object {
            * Vala <= 0.10, it returned the character length). FIXME: We need to
            * take this into account until we depend explicitly on
            * Vala >= 0.11. */
-          yield this._config_file.replace_contents_async (key_file_data,
-              key_file_data.length, null, false, FileCreateFlags.PRIVATE,
-              null);
+          yield this._config_file.replace_contents_async (key_file_data.data,
+              null, false, FileCreateFlags.PRIVATE,
+              null, null);
         }
       catch (Error e)
         {
index c9adb85..52f518f 100644 (file)
@@ -194,7 +194,7 @@ public abstract class Folks.ObjectCache<T> : Object
 
       try
         {
-          yield this._cache_file.load_contents_async (cancellable, out data);
+          yield this._cache_file.load_contents_async (cancellable, out data, null);
         }
       catch (Error e)
         {
@@ -372,8 +372,8 @@ public abstract class Folks.ObjectCache<T> : Object
           try
             {
               yield this._cache_file.replace_contents_async (
-                  (string) data, data.length, null, false,
-                  FileCreateFlags.PRIVATE, cancellable);
+                  data, null, false,
+                  FileCreateFlags.PRIVATE, cancellable, null);
               break;
             }
           catch (Error e)
index 1dbcddb..d8f02f8 100644 (file)
@@ -59,9 +59,9 @@ public class BackendLoadingTests : Folks.TestCase
         {
           File backend_f = File.new_for_path (kf_path);
           string data = kf.to_data ();
-          backend_f.replace_contents (data,
-              data.length, null, false, FileCreateFlags.PRIVATE,
-              null);
+          backend_f.replace_contents (data.data,
+              null, false, FileCreateFlags.PRIVATE,
+              null, null);
         }
       catch (Error e)
         {
index 7bc0ea4..b004973 100644 (file)
@@ -225,7 +225,7 @@ public class EdsTest.Backend
 
               try
                 {
-                  file.load_contents (null, out photo_content);
+                  file.load_contents (null, out photo_content, null);
 
                   var cp = new ContactPhoto ();
                   cp.type = ContactPhotoType.INLINED;
index 74e56a8..d2549b6 100644 (file)
@@ -55,9 +55,8 @@ public class AggregationTests : Folks.TestCase
       File kf_relationships_f = File.new_for_path (kf_relationships_path);
       try
         {
-          kf_relationships_f.replace_contents (kf_relationships_data,
-              kf_relationships_data.length, null, false,
-              FileCreateFlags.PRIVATE, null);
+          kf_relationships_f.replace_contents (kf_relationships_data.data, null,
+              false, FileCreateFlags.PRIVATE, null);
         }
       catch (Error e)
         {
@@ -80,9 +79,8 @@ public class AggregationTests : Folks.TestCase
         {
           File backend_f = File.new_for_path (kf_path);
           string data = kf.to_data ();
-          backend_f.replace_contents (data,
-              data.length, null, false, FileCreateFlags.PRIVATE,
-              null);
+          backend_f.replace_contents (data.data, null, false,
+              FileCreateFlags.PRIVATE, null);
         }
       catch (Error e)
         {
index c69356b..1e3eaed 100644 (file)
@@ -299,7 +299,7 @@ public class Folks.Inspect.Client : Object
     }
 }
 
-private abstract class Folks.Inspect.Command
+public abstract class Folks.Inspect.Command
 {
   protected Client client;