summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/vfs_types.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/common/vfs_types.h b/common/vfs_types.h
index 753f5c5..583ffe6 100644
--- a/common/vfs_types.h
+++ b/common/vfs_types.h
@@ -30,11 +30,47 @@
typedef int TVFSResult;
+/* Compatible with gio/GAskPasswordFlags */
+typedef enum {
+ VFS_ASK_PASSWORD_NEED_PASSWORD = 1<<0,
+ VFS_ASK_PASSWORD_NEED_USERNAME = 1<<1,
+ VFS_ASK_PASSWORD_NEED_DOMAIN = 1<<2,
+ VFS_ASK_PASSWORD_SAVING_SUPPORTED = 1<<3,
+ VFS_ASK_PASSWORD_ANONYMOUS_SUPPORTED = 1<<4
+} TVFSAskPasswordFlags;
+
+/* Compatible with gio/GPasswordSave */
+typedef enum {
+ VFS_PASSWORD_SAVE_NEVER,
+ VFS_PASSWORD_SAVE_FOR_SESSION,
+ VFS_PASSWORD_SAVE_PERMANENTLY
+} TVFSPasswordSave;
+
typedef void (* TVFSLogFunc)(char *s);
typedef int (* TVFSCopyCallBackFunc)(u_int64_t iPos, u_int64_t iMax, void *data);
typedef void *TVFSFileDes;
+/* Return index of the choice selected or negative number when dialog has been cancelled */
+typedef void (* TVFSAskQuestionCallback)
+ (const char *message,
+ const char *choices[],
+ int *choice,
+ void *user_data);
+
+typedef int (* TVFSAskPasswordCallback)
+ (const char *message,
+ const char *default_user,
+ const char *default_domain,
+ TVFSAskPasswordFlags flags,
+ char **username,
+ char **password,
+ int *anonymous,
+ char **domain,
+ TVFSPasswordSave *password_save,
+ void *user_data);
+
+
static const int cVFSVersion = 4; // current version of the VFS API
// Capabilities