aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/zenstore.cpp
blob: bf0c71211ab3970d76f482ffa7057974de699982 (plain) (blame)
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
// Copyright Epic Games, Inc. All Rights Reserved.

#include "zenstore/zenstore.h"

#include <zencore/iobuffer.h>

namespace zen {

FallbackChunkResolver::FallbackChunkResolver(ChunkResolver& Primary, ChunkResolver& Fallback) : m_Primary(Primary), m_Fallback(Fallback)
{
}

IoBuffer
FallbackChunkResolver::FindChunkByCid(const IoHash& DecompressedId)
{
	if (IoBuffer Result = m_Primary.FindChunkByCid(DecompressedId))
	{
		return Result;
	}
	return m_Fallback.FindChunkByCid(DecompressedId);
}

}  // namespace zen

#if ZEN_WITH_TESTS

#	include <zenstore/blockstore.h>
#	include <zenstore/buildstore/buildstore.h>
#	include <zenstore/cache/cachepolicy.h>
#	include <zenstore/cache/structuredcachestore.h>
#	include <zenstore/projectstore.h>
#	include <zenstore/workspaces.h>
#	include <zenstore/gc.h>
#	include <zenstore/hashkeyset.h>

#	include "cas.h"
#	include "compactcas.h"
#	include "filecas.h"

namespace zen {

void
zenstore_forcelinktests()
{
	buildstore_forcelink();
	cachepolicy_forcelink();
	CAS_forcelink();
	filecas_forcelink();
	blockstore_forcelink();
	compactcas_forcelink();
	workspaces_forcelink();
	gc_forcelink();
	hashkeyset_forcelink();
	structured_cachestore_forcelink();
	prj_forcelink();
}

}  // namespace zen

#endif