summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/wavm/Include/WAVM/ObjectCache/ObjectCache.h
blob: 3549fb64485a44458205ab193f01b8feacb7ac0e (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
#pragma once

#include <memory>
#include "WAVM/Inline/BasicTypes.h"

namespace WAVM { namespace Runtime {
	struct ObjectCacheInterface;
}}

namespace WAVM { namespace ObjectCache {

	enum class OpenResult
	{
		success,
		doesNotExist,
		notDirectory,
		notAccessible,
		invalidDatabase,
		tooManyReaders,
	};

	WAVM_API OpenResult open(const char* path,
							 Uptr maxBytes,
							 U64 codeKey,
							 std::shared_ptr<Runtime::ObjectCacheInterface>& outObjectCache);
}}