summaryrefslogtreecommitdiff
path: root/vfs/uVFSprototypes.pas
diff options
context:
space:
mode:
Diffstat (limited to 'vfs/uVFSprototypes.pas')
-rw-r--r--vfs/uVFSprototypes.pas36
1 files changed, 36 insertions, 0 deletions
diff --git a/vfs/uVFSprototypes.pas b/vfs/uVFSprototypes.pas
index 6959a7b..18830aa 100644
--- a/vfs/uVFSprototypes.pas
+++ b/vfs/uVFSprototypes.pas
@@ -76,6 +76,17 @@ 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);
+
+ PVFSPasswordSave = ^TVFSPasswordSave;
+ TVFSPasswordSave = (VFS_PASSWORD_SAVE_NEVER,
+ VFS_PASSWORD_SAVE_FOR_SESSION,
+ VFS_PASSWORD_SAVE_PERMANENTLY);
+
TVFSItemType = (vRegular=0, vSymlink=1, vChardev=2, vBlockdev=3, vDirectory=4, vFifo=5, vSock=6, vOther=7);
{$IFDEF KYLIX}
@@ -245,9 +256,34 @@ type
//// pridat typ pluginu - jestli archive nebo protocol - prip. jeste pridat ktery protokoly je to schopno handlovat
+
+ // Return index of the choice selected or negative number when dialog has been cancelled
+ PVFSAskQuestionCallback = ^TVFSAskQuestionCallback;
+ TVFSAskQuestionCallback = procedure (const AMessage: PChar;
+ const Choices: PPChar;
+ choice: PInteger;
+ user_data: Pointer); cdecl;
+
+ PVFSAskPasswordCallback = ^TVFSAskPasswordCallback;
+ TVFSAskPasswordCallback = function (const AMessage: PChar;
+ const default_user: PChar;
+ const default_domain: PChar;
+ flags: TVFSAskPasswordFlags;
+ username: PPChar;
+ password: PPChar;
+ anonymous: PInteger;
+ domain: PPChar;
+ password_save: PVFSPasswordSave;
+ user_data: Pointer): LongBool; cdecl;
+
+ TVFSSetCallbacks = procedure (g: TVFSGlobs; ask_question_callback: PVFSAskQuestionCallback; ask_password_callback: PVFSAskPasswordCallback; Data: Pointer); cdecl;
+
+
// TODO: some function to check the CRC of the archive - it should need also some progress feedback - the processed file and percentage progress
+// Prekopat error logging - asi neco na zpusob GError, stringy se budou vracet i z pluginu
+
implementation
end.