notes-cache.h 541 Bytes
Newer Older
1 2 3 4 5
#ifndef NOTES_CACHE_H
#define NOTES_CACHE_H

#include "notes.h"

6 7
struct repository;

8 9 10 11 12
struct notes_cache {
	struct notes_tree tree;
	char *validity;
};

13 14
void notes_cache_init(struct repository *r, struct notes_cache *c,
		      const char *name, const char *validity);
15 16
int notes_cache_write(struct notes_cache *c);

17
char *notes_cache_get(struct notes_cache *c, struct object_id *oid, size_t
18
		      *outsize);
19
int notes_cache_put(struct notes_cache *c, struct object_id *oid,
20 21 22
		    const char *data, size_t size);

#endif /* NOTES_CACHE_H */