diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-15 18:59:15 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-15 19:06:27 +0200 |
commit | 6d03efa0ab1d4540e604848576e9ca077bf1c6ca (patch) | |
tree | 158cc618aa1147638d1a823f975347045561aa09 | |
parent | 8da9c87d56c45c0b4fedd84e91018a6ab09185ed (diff) | |
download | vala-wip/tintou/libarchive-v3.tar.gz |
libarchive: Bind __LA_MODE_T as FileTypewip/tintou/libarchive-v3
-rw-r--r-- | vapi/libarchive.vapi | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/vapi/libarchive.vapi b/vapi/libarchive.vapi index 3afc422b3..ad3f7efaa 100644 --- a/vapi/libarchive.vapi +++ b/vapi/libarchive.vapi @@ -355,6 +355,18 @@ namespace Archive { ); } + [CCode (cheader_filename = "archive_entry.h" cprefix = "AE_", cname = "__LA_MODE_T", has_type_id = false)] + public enum FileType { + IFMT, + IFREG, + IFLNK, + IFSOCK, + IFCHR, + IFBLK, + IFDIR, + IFIFO + } + [Compact] [CCode (cname = "struct archive_entry", cheader_filename = "archive_entry.h")] public class Entry { @@ -372,13 +384,13 @@ namespace Archive { public int64_t dev (); public int64_t devmajor (); public int64_t devminor (); - public Posix.mode_t filetype (); + public FileType filetype (); public unowned string fflags_text (); public int64_t gid (); public unowned string gname (); public unowned string hardlink (); public int64_t ino (); - public Posix.mode_t mode (); + public FileType mode (); public time_t mtime (); public long mtime_nsec (); public bool mtime_is_set (); @@ -413,13 +425,13 @@ namespace Archive { public void set_ino (ulong ino); public void set_link (string link); public Result update_link_utf8 (string link); - public void set_mode (Posix.mode_t mode); + public void set_mode (FileType mode); public void set_mtime (time_t mtime, long blah); public void unset_mtime (); public void set_nlink (uint nlink); public void set_pathname (string pathname); public Result update_pathname_utf8 (string pathname); - public void set_perm (Posix.mode_t mode); + public void set_perm (FileType mode); public void set_rdev (int64_t dev); public void set_rdevmajor (int64_t devmajor); public void set_rdevminor (int64_t devminor); |