summaryrefslogtreecommitdiff
path: root/lib/backupstore/StoreStructure.h
blob: 094c0deb97d939906266784cfc8bb58cd38bd1c0 (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
// --------------------------------------------------------------------------
//
// File
//		Name:    StoreStructure.h
//		Purpose: Functions for placing files in the store
//		Created: 11/12/03
//
// --------------------------------------------------------------------------

#ifndef STORESTRUCTURE__H
#define STORESTRUCTURE__H

#include <string>

#ifdef NDEBUG
	#define STORE_ID_SEGMENT_LENGTH		8
	#define STORE_ID_SEGMENT_MASK		0xff
#else
	// Debug we'll use lots and lots of directories to stress things
	#define STORE_ID_SEGMENT_LENGTH		2
	#define STORE_ID_SEGMENT_MASK		0x03
#endif


namespace StoreStructure
{
	void MakeObjectFilename(int64_t ObjectID, const std::string &rStoreRoot, int DiscSet, std::string &rFilenameOut, bool EnsureDirectoryExists);
	void MakeWriteLockFilename(const std::string &rStoreRoot, int DiscSet, std::string &rFilenameOut);
};

#endif // STORESTRUCTURE__H