VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/TextUserInterface.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-05-31 18:44:53 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:18:59 +0100
commit7ffce028d04a6b13ef762e2b89c34b688e8ca59d (patch)
treeeefedb6e94de5b26fa963675969490c641c29077 /src/Main/TextUserInterface.h
parent97011f179cfd3dcd12446ef4ccb6964c8e52c3db (diff)
downloadVeraCrypt-7ffce028d04a6b13ef762e2b89c34b688e8ca59d.tar.gz
VeraCrypt-7ffce028d04a6b13ef762e2b89c34b688e8ca59d.zip
Add TrueCrypt 7.1a MacOSX/Linux specific source files.
Diffstat (limited to 'src/Main/TextUserInterface.h')
-rw-r--r--src/Main/TextUserInterface.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/Main/TextUserInterface.h b/src/Main/TextUserInterface.h
new file mode 100644
index 00000000..942c45fd
--- /dev/null
+++ b/src/Main/TextUserInterface.h
@@ -0,0 +1,78 @@
+/*
+ Copyright (c) 2008-2009 TrueCrypt Developers Association. All rights reserved.
+
+ Governed by the TrueCrypt License 3.0 the full text of which is contained in
+ the file License.txt included in TrueCrypt binary and source code distribution
+ packages.
+*/
+
+#ifndef TC_HEADER_Main_TextUserInterface
+#define TC_HEADER_Main_TextUserInterface
+
+#include "System.h"
+#include "Main.h"
+#include "UserInterface.h"
+
+namespace TrueCrypt
+{
+ class TextUserInterface : public UserInterface
+ {
+ public:
+ TextUserInterface ();
+ virtual ~TextUserInterface ();
+
+ virtual FilePath AskFilePath (const wxString &message = wxEmptyString) const;
+ virtual shared_ptr <KeyfileList> AskKeyfiles (const wxString &message = L"") const;
+ virtual shared_ptr <VolumePassword> AskPassword (const wxString &message = L"", bool verify = false) const;
+ virtual ssize_t AskSelection (ssize_t optionCount, ssize_t defaultOption = -1) const;
+ virtual wstring AskString (const wxString &message = wxEmptyString) const;
+ virtual shared_ptr <VolumePath> AskVolumePath (const wxString &message = L"") const;
+ virtual bool AskYesNo (const wxString &message, bool defaultYes = false, bool warning = false) const;
+ virtual void BackupVolumeHeaders (shared_ptr <VolumePath> volumePath) const;
+ virtual void BeginBusyState () const { }
+ virtual void ChangePassword (shared_ptr <VolumePath> volumePath = shared_ptr <VolumePath>(), shared_ptr <VolumePassword> password = shared_ptr <VolumePassword>(), shared_ptr <KeyfileList> keyfiles = shared_ptr <KeyfileList>(), shared_ptr <VolumePassword> newPassword = shared_ptr <VolumePassword>(), shared_ptr <KeyfileList> newKeyfiles = shared_ptr <KeyfileList>(), shared_ptr <Hash> newHash = shared_ptr <Hash>()) const;
+ virtual void CreateKeyfile (shared_ptr <FilePath> keyfilePath = shared_ptr <FilePath>()) const;
+ virtual void CreateVolume (shared_ptr <VolumeCreationOptions> options) const;
+ virtual void DeleteSecurityTokenKeyfiles () const;
+ virtual void DoShowError (const wxString &message) const;
+ virtual void DoShowInfo (const wxString &message) const;
+ virtual void DoShowString (const wxString &str) const;
+ virtual void DoShowWarning (const wxString &message) const;
+ virtual void EndBusyState () const { }
+ virtual void ExportSecurityTokenKeyfile () const;
+ virtual shared_ptr <GetStringFunctor> GetAdminPasswordRequestHandler ();
+ virtual void ImportSecurityTokenKeyfiles () const;
+#ifndef TC_NO_GUI
+ virtual bool Initialize (int &argc, wxChar **argv) { return wxAppBase::Initialize(argc, argv); }
+#endif
+ virtual void InitSecurityTokenLibrary () const;
+ virtual void ListSecurityTokenKeyfiles () const;
+ virtual VolumeInfoList MountAllDeviceHostedVolumes (MountOptions &options) const;
+ virtual shared_ptr <VolumeInfo> MountVolume (MountOptions &options) const;
+ virtual bool OnInit ();
+#ifndef TC_NO_GUI
+ virtual bool OnInitGui () { return true; }
+#endif
+ virtual int OnRun();
+ virtual void RestoreVolumeHeaders (shared_ptr <VolumePath> volumePath) const;
+ static void SetTerminalEcho (bool enable);
+ virtual void UserEnrichRandomPool () const;
+ virtual void Yield () const { }
+
+ protected:
+ static void OnSignal (int signal);
+ virtual void ReadInputStreamLine (wxString &line) const;
+ virtual wxString ReadInputStreamLine () const;
+
+ auto_ptr <wxFFileInputStream> FInputStream;
+ auto_ptr <wxTextInputStream> TextInputStream;
+
+ private:
+ TextUserInterface (const TextUserInterface &);
+ TextUserInterface &operator= (const TextUserInterface &);
+ };
+
+ extern wxMessageOutput *DefaultMessageOutput;
+}
+
+#endif // TC_HEADER_Main_TextUserInterface