about summary refs log tree commit diff
path: root/src/values.hh
blob: 5dd7b89c40bd9f43a7f2fd589531f71f24f1c2a8 (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
#ifndef __VALUES_H
#define __VALUES_H

#include <string>

#include "hash.hh"

using namespace std;


/* Copy a value to the nixValues directory and register it in dbRefs.
   Return the hash code of the value. */
Hash addValue(string pathName);


/* Obtain the path of a value with the given hash.  If a file with
   that hash is known to exist in the local file system (as indicated
   by the dbRefs database), we use that.  Otherwise, we attempt to
   fetch it from the network (using dbNetSources).  We verify that the
   file has the right hash. */
string queryValuePath(Hash hash);


#endif /* !__VALUES_H */