summaryrefslogtreecommitdiff
path: root/vfs/uVFSprototypes.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 15:50:20 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-10-12 15:50:20 +0200
commitf35af507573469b7c1692f01922d323bd1000fbc (patch)
tree619e72d4aa486bc97974293cf045f263e98263b6 /vfs/uVFSprototypes.pas
parentb417ac914af5e3dfeb27eb5bde6210f88c5b9ec4 (diff)
downloadtuxcmd-f35af507573469b7c1692f01922d323bd1000fbc.tar.xz
Connection Manager password callback improvements
Diffstat (limited to 'vfs/uVFSprototypes.pas')
-rw-r--r--vfs/uVFSprototypes.pas15
1 files changed, 10 insertions, 5 deletions
diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas
index 18830aa..7cff78b 100644
--- a/vfs/uVFSprototypes.pas
+++ b/vfs/uVFSprototypes.pas
@@ -64,6 +64,12 @@ const
cVFS_OpenWrite = 1;
cVFS_OpenAppend = 2;
+ VFS_ASK_PASSWORD_NEED_PASSWORD = 1 shl 0;
+ VFS_ASK_PASSWORD_NEED_USERNAME = 1 shl 1;
+ VFS_ASK_PASSWORD_NEED_DOMAIN = 1 shl 2;
+ VFS_ASK_PASSWORD_SAVING_SUPPORTED = 1 shl 3; // Plugin reports if gnome-keyring is available
+ VFS_ASK_PASSWORD_ANONYMOUS_SUPPORTED = 1 shl 4;
+ VFS_ASK_PASSWORD_SAVE_INTERNAL = 1 shl 15; // Save password into internal Connection Manager
type
@@ -76,13 +82,10 @@ type
// File descriptor for Open, Read, Write, Close, Seek operations
TVFSFileDes = Pointer;
- TVFSAskPasswordFlags = (VFS_ASK_PASSWORD_NEED_PASSWORD = 1 shl 0,
- VFS_ASK_PASSWORD_NEED_USERNAME = 1 shl 1,
- VFS_ASK_PASSWORD_NEED_DOMAIN = 1 shl 2,
- VFS_ASK_PASSWORD_SAVING_SUPPORTED = 1 shl 3,
- VFS_ASK_PASSWORD_ANONYMOUS_SUPPORTED = 1 shl 4);
+ TVFSAskPasswordFlags = Longint;
PVFSPasswordSave = ^TVFSPasswordSave;
+ // Let plugin save the password, usually to gnome-keyring
TVFSPasswordSave = (VFS_PASSWORD_SAVE_NEVER,
VFS_PASSWORD_SAVE_FOR_SESSION,
VFS_PASSWORD_SAVE_PERMANENTLY);
@@ -173,6 +176,7 @@ type
TVFSOpen = function (g:TVFSGlobs; const sName: PChar): TVFSResult; cdecl;
// TODO: Opens the location (file or URI/URL)
+ // In case of URI, do not supply password encoded in the string; plugin will automatically spawn the TVFSAskPasswordCallback callback
TVFSLogin = function (g:TVFSGlobs; const User, Pass: PChar): TVFSResult; cdecl;
// TODO: Performs login to the server
TVFSClose = function (g:TVFSGlobs): TVFSResult; cdecl;
@@ -265,6 +269,7 @@ type
user_data: Pointer); cdecl;
PVFSAskPasswordCallback = ^TVFSAskPasswordCallback;
+ // Remember to allocate passed strings separately (use strdup() when setting reply)
TVFSAskPasswordCallback = function (const AMessage: PChar;
const default_user: PChar;
const default_domain: PChar;