[vala] gnome-vfs-2.0: GnomeVFS.FileSize binding fixes



commit d1f448ade8f7c4bdf9a7ed37fd8c56b6b2ce889e
Author: Mark Lee <marklee src gnome org>
Date:   Wed May 20 23:47:52 2009 -0700

    gnome-vfs-2.0: GnomeVFS.FileSize binding fixes
    
    GnomeVFSFileSize is a typedef'd uint64, not a compact class.
    gnome_vfs_read.bytes_read and gnome_vfs_write.bytes_written are
    out parameters.
---
 vapi/gnome-vfs-2.0.vapi                            |   25 ++++++++++---------
 .../gnome-vfs-2.0/gnome-vfs-2.0-custom.vala        |   25 ++++++++++++++++++++
 vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata |    3 ++
 3 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/vapi/gnome-vfs-2.0.vapi b/vapi/gnome-vfs-2.0.vapi
index 457ed04..0127e60 100644
--- a/vapi/gnome-vfs-2.0.vapi
+++ b/vapi/gnome-vfs-2.0.vapi
@@ -146,7 +146,7 @@ namespace GnomeVFS {
 	public class FileInfo {
 		public weak GnomeVFS.ACL acl;
 		public ulong atime;
-		public weak GnomeVFS.FileSize block_count;
+		public GnomeVFS.FileSize block_count;
 		public ulong ctime;
 		public GnomeVFS.FileFlags flags;
 		public uint gid;
@@ -162,7 +162,7 @@ namespace GnomeVFS {
 		public void* reserved2;
 		public void* reserved3;
 		public weak string selinux_context;
-		public weak GnomeVFS.FileSize size;
+		public GnomeVFS.FileSize size;
 		public weak string symlink_name;
 		public GnomeVFS.FileType type;
 		public uint uid;
@@ -185,10 +185,6 @@ namespace GnomeVFS {
 	}
 	[Compact]
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
-	public class FileSize {
-	}
-	[Compact]
-	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public class FindDirectoryResult {
 		public void* reserved1;
 		public void* reserved2;
@@ -547,12 +543,12 @@ namespace GnomeVFS {
 	[Compact]
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public class XferProgressInfo {
-		public weak GnomeVFS.FileSize bytes_copied;
-		public weak GnomeVFS.FileSize bytes_total;
+		public GnomeVFS.FileSize bytes_copied;
+		public GnomeVFS.FileSize bytes_total;
 		public int duplicate_count;
 		public weak string duplicate_name;
 		public ulong file_index;
-		public weak GnomeVFS.FileSize file_size;
+		public GnomeVFS.FileSize file_size;
 		public ulong files_total;
 		public GnomeVFS.XferPhase phase;
 		public void* reserved1;
@@ -561,9 +557,14 @@ namespace GnomeVFS {
 		public GnomeVFS.XferProgressStatus status;
 		public weak string target_name;
 		public bool top_level_item;
-		public weak GnomeVFS.FileSize total_bytes_copied;
+		public GnomeVFS.FileSize total_bytes_copied;
 		public GnomeVFS.Result vfs_status;
 	}
+	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
+	[SimpleType]
+	[IntegerType (rank = 0)]
+	public struct FileSize : uint64 {
+	}
 	[CCode (cprefix = "GNOME_VFS_DNS_SD_SERVICE_", has_type_id = "0", cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public enum DNSSDServiceStatus {
 		ADDED,
@@ -1377,7 +1378,7 @@ namespace GnomeVFS {
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public static void preinit (void* app, void* modinfo);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
-	public static GnomeVFS.Result read (GnomeVFS.Handle handle, void* buffer, GnomeVFS.FileSize bytes, GnomeVFS.FileSize bytes_read);
+	public static GnomeVFS.Result read (GnomeVFS.Handle handle, void* buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_read);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public static GnomeVFS.Result read_entire_file (string uri, int file_size, out unowned string file_contents);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
@@ -1433,7 +1434,7 @@ namespace GnomeVFS {
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public static GnomeVFS.Result url_show_with_env (string url, out unowned string envp);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
-	public static GnomeVFS.Result write (GnomeVFS.Handle handle, void* buffer, GnomeVFS.FileSize bytes, GnomeVFS.FileSize bytes_written);
+	public static GnomeVFS.Result write (GnomeVFS.Handle handle, void* buffer, GnomeVFS.FileSize bytes, out GnomeVFS.FileSize bytes_written);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
 	public static GnomeVFS.Result xfer_delete_list (GLib.List source_uri_list, GnomeVFS.XferErrorMode error_mode, GnomeVFS.XferOptions xfer_options, GnomeVFS.XferProgressCallback progress_callback);
 	[CCode (cheader_filename = "libgnomevfs/gnome-vfs.h")]
diff --git a/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0-custom.vala b/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0-custom.vala
new file mode 100644
index 0000000..aae7ef6
--- /dev/null
+++ b/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0-custom.vala
@@ -0,0 +1,25 @@
+/* gnome-vfs-2.0-custom.vala
+ *
+ * Copyright (C) 2009  Mark Lee <marklee src gnome org>
+ *
+ * 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 License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+namespace GnomeVFS {
+	public struct FileSize : uint64 {
+	}
+}
+
+// vim: set noet :
diff --git a/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata b/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata
index cefb1ad..de932d9 100644
--- a/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata
+++ b/vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata
@@ -2,12 +2,15 @@ GnomeVFS cheader_filename="libgnomevfs/gnome-vfs.h"
 gnome_vfs_address_new_from_sockaddr hidden="1"
 GnomeVFSDrive type_check_function="GNOME_IS_VFS_DRIVE"
 GnomeVFSFileInfo.device hidden="1"
+GnomeVFSFileSize hidden="1"
 GnomeVFSMimeApplication.priv hidden="1"
 GnomeVFSMimeApplication.requires_terminal hidden="1"
 GnomeVFSVolume type_check_function="GNOME_IS_VFS_VOLUME"
 GnomeVFSVolumeMonitor type_check_function="GNOME_IS_VFS_VOLUME_MONITOR"
 gnome_vfs_async_xfer.update_callback_data hidden="1"
 gnome_vfs_async_xfer.sync_callback_data hidden="1"
+gnome_vfs_read.bytes_read is_out="1"
+gnome_vfs_write.bytes_written is_out="1"
 gnome_vfs_xfer_delete_list.data hidden="1"
 gnome_vfs_xfer_uri.data hidden="1"
 gnome_vfs_xfer_uri_list.data hidden="1"



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