]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gnome-vfs-2.0: GnomeVFS.FileSize binding fixes
authorMark Lee <marklee@src.gnome.org>
Thu, 21 May 2009 06:47:52 +0000 (23:47 -0700)
committerJürg Billeter <j@bitron.ch>
Mon, 1 Jun 2009 08:25:46 +0000 (10:25 +0200)
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
vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0-custom.vala [new file with mode: 0644]
vapi/packages/gnome-vfs-2.0/gnome-vfs-2.0.metadata

index 457ed0413e18dc5d24e4f9246c0c462c1debe762..0127e60c55c13b73a8465fc21993c7aba249c01b 100644 (file)
@@ -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 (file)
index 0000000..aae7ef6
--- /dev/null
@@ -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 :
index cefb1addd082153b8cc5702e2a62dbffcdd368e2..de932d97b30f4dd5b8736c84a65a8278095314bb 100644 (file)
@@ -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"