aboutsummaryrefslogtreecommitdiff
path: root/libs/archive/thirdparty/CPP/7zip/IPassword.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/archive/thirdparty/CPP/7zip/IPassword.h')
-rw-r--r--libs/archive/thirdparty/CPP/7zip/IPassword.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/libs/archive/thirdparty/CPP/7zip/IPassword.h b/libs/archive/thirdparty/CPP/7zip/IPassword.h
new file mode 100644
index 0000000..689f08c
--- /dev/null
+++ b/libs/archive/thirdparty/CPP/7zip/IPassword.h
@@ -0,0 +1,54 @@
+// IPassword.h
+
+#ifndef ZIP7_INC_IPASSWORD_H
+#define ZIP7_INC_IPASSWORD_H
+
+#include "../Common/MyTypes.h"
+
+#include "IDecl.h"
+
+Z7_PURE_INTERFACES_BEGIN
+
+#define Z7_IFACE_CONSTR_PASSWORD(i, n) \
+ Z7_DECL_IFACE_7ZIP(i, 5, n) \
+ { Z7_IFACE_COM7_PURE(i) };
+
+/*
+How to use output parameter (BSTR *password):
+
+in: The caller is required to set BSTR value as NULL (no string).
+ The callee (in 7-Zip code) ignores the input value stored in BSTR variable,
+
+out: The callee rewrites BSTR variable (*password) with new allocated string pointer.
+ The caller must free BSTR string with function SysFreeString();
+*/
+
+#define Z7_IFACEM_ICryptoGetTextPassword(x) \
+ x(CryptoGetTextPassword(BSTR *password))
+Z7_IFACE_CONSTR_PASSWORD(ICryptoGetTextPassword, 0x10)
+
+
+/*
+CryptoGetTextPassword2()
+in:
+ The caller is required to set BSTR value as NULL (no string).
+ The caller is not required to set (*passwordIsDefined) value.
+
+out:
+ Return code: != S_OK : error code
+ Return code: S_OK : success
+
+ if (*passwordIsDefined == 1), the variable (*password) contains password string
+
+ if (*passwordIsDefined == 0), the password is not defined,
+ but the callee still could set (*password) to some allocated string, for example, as empty string.
+
+ The caller must free BSTR string with function SysFreeString()
+*/
+
+#define Z7_IFACEM_ICryptoGetTextPassword2(x) \
+ x(CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password))
+Z7_IFACE_CONSTR_PASSWORD(ICryptoGetTextPassword2, 0x11)
+
+Z7_PURE_INTERFACES_END
+#endif