VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core/MountOptions.h
blob: 23fc7ca2ea2ab9960a98ebd64c2bf991867511f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 Copyright (c) 2008 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_Core_MountOptions
#define TC_HEADER_Core_MountOptions

#include "Platform/Serializable.h"
#include "Volume/Keyfile.h"
#include "Volume/Volume.h"
#include "Volume/VolumeSlot.h"
#include "Volume/VolumePassword.h"

namespace TrueCrypt
{
	struct MountOptions : public Serializable
	{
		MountOptions ()
			:
			CachePassword (false),
			NoFilesystem (false),
			NoHardwareCrypto (false),
			NoKernelCrypto (false),
			PartitionInSystemEncryptionScope (false),
			PreserveTimestamps (true),
			Protection (VolumeProtection::None),
			Removable (false),
			SharedAccessAllowed (false),
			SlotNumber (0),
			UseBackupHeaders (false)
		{
		}

		MountOptions (const MountOptions &other) { CopyFrom (other); }
		virtual ~MountOptions () { }

		MountOptions &operator= (const MountOptions &other) { CopyFrom (other); return *this; }

		TC_SERIALIZABLE (MountOptions);

		bool CachePassword;
		wstring FilesystemOptions;
		wstring FilesystemType;
		shared_ptr <KeyfileList> Keyfiles;
		shared_ptr <DirectoryPath> MountPoint;
		bool NoFilesystem;
		bool NoHardwareCrypto;
		bool NoKernelCrypto;
		shared_ptr <VolumePassword> Password;
		bool PartitionInSystemEncryptionScope;
		shared_ptr <VolumePath> Path;
		bool PreserveTimestamps;
		VolumeProtection::Enum Protection;
		shared_ptr <VolumePassword> ProtectionPassword;
		shared_ptr <KeyfileList> ProtectionKeyfiles;
		bool Removable;
		bool SharedAccessAllowed;
		VolumeSlotNumber SlotNumber;
		bool UseBackupHeaders;

	protected:
		void CopyFrom (const MountOptions &other);
	};
}

#endif // TC_HEADER_Core_MountOptions
mp;b); uint64 operator+ (const uint64 &a, uint32 b); uint64 &operator+= (uint64 &a, const uint64 &b); uint64 operator- (const uint64 &a, const uint64 &b); uint64 operator- (const uint64 &a, uint32 b); uint64 &operator-= (uint64 &a, const uint64 &b); uint64 operator>> (const uint64 &a, int shiftCount); uint64 operator<< (const uint64 &a, int shiftCount); uint64 &operator++ (uint64 &a); bool operator== (const uint64 &a, const uint64 &b); bool operator> (const uint64 &a, const uint64 &b); bool operator< (const uint64 &a, const uint64 &b); bool operator>= (const uint64 &a, const uint64 &b); bool operator<= (const uint64 &a, const uint64 &b); void CopyMemory (void *source, uint16 destSegment, uint16 destOffset, uint16 blockSize); void CopyMemory (uint16 sourceSegment, uint16 sourceOffset, void *destination, uint16 blockSize); extern "C" void EraseMemory (void *memory, int size); uint32 GetLinearAddress (uint16 segment, uint16 offset); bool RegionsIntersect (const uint64 &start1, uint32 length1, const uint64 &start2, const uint64 &end2); #ifdef TC_BOOT_DEBUG_ENABLED bool TestInt64 (); #endif extern "C" void ThrowFatalException (int line); #endif // TC_HEADER_Boot_Platform