summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 12:17:53 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 12:17:53 +0200
commitfc649fb9d8d2edd3eef0ba6ba54b769c956ab3cb (patch)
treebd06d1167bb04e03871eaa18bbe5ac560da83cc3 /common
parentd7f3e7e44eb7ccb2026da7006c254e5c4c60c3ce (diff)
downloadtuxcmd-modules-0.6.53.tar.xz
GVFS plugin: Implement question and password callbacksv0.6.53
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