From e42a4ff3031aa1c1aaf27aa34d9395fec185924b Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 13 Dec 2009 14:36:33 +0100 Subject: Error system transformation to GError --- common/tuxcmd-vfs.h | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) (limited to 'common/tuxcmd-vfs.h') diff --git a/common/tuxcmd-vfs.h b/common/tuxcmd-vfs.h index 2ced1b1..309b43c 100644 --- a/common/tuxcmd-vfs.h +++ b/common/tuxcmd-vfs.h @@ -27,10 +27,8 @@ extern "C" { #endif - #include -typedef int TVFSResult; /* Compatible with gio/GAskPasswordFlags */ typedef enum { @@ -43,6 +41,7 @@ typedef enum { VFS_ASK_PASSWORD_ARCHIVE_MODE = 1 << 15 } TVFSAskPasswordFlags; + /* Compatible with gio/GPasswordSave */ typedef enum { VFS_PASSWORD_SAVE_NEVER, @@ -50,6 +49,7 @@ typedef enum { VFS_PASSWORD_SAVE_PERMANENTLY } TVFSPasswordSave; + /* Module capability flags */ typedef enum { VFS_CAP_HANDLES_MULTIPLE_REQUESTS = 1 << 0, /* Multiple (background) operations; usually unsuitable for archives */ @@ -59,6 +59,7 @@ typedef enum { } TVFSModuleCapabilities; + typedef void (* TVFSLogFunc) (const char *s); typedef void * TVFSFileDes; @@ -66,7 +67,7 @@ typedef void * TVFSFileDes; /* Return FALSE to break the operation */ typedef gboolean (* TVFSProgressCallback) (guint64 position, - guint64 max, + GError *error, void *user_data); /* Return index of the choice selected or negative number when dialog has been cancelled */ @@ -94,24 +95,6 @@ typedef gboolean (* TVFSAskPasswordCallback) /* current version of the VFS API */ static const int cVFSVersion = 5; -/* error codes (TVFSResult) */ -enum { - cVFS_OK = 0, - cVFS_Failed = 1, /* also No such file */ - cVFS_Cancelled = 2, - cVFS_Not_Supported = 3, - cVFS_No_More_Files = 4, - cVFS_ReadErr = 5, - cVFS_WriteErr = 6, /* also Readonly FileSystem */ - cVFS_LoginFailed = 7, - cVFS_PermissionDenied = 8, - cVFS_NoSpaceLeft = 9, - cVFS_mallocFailed = 10, - cVFS_BadPassword = 11, - cVFS_MissingVolume = 12, - cVFS_CorruptedArchive = 13 -}; - /* open modes */ enum { -- cgit v1.2.3