pool.h 896 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#ifndef REPREPRO_POOL_H
#define REPREPRO_POOL_H

#ifndef REPREPRO_ERROR_H
#include "error.h"
#endif
#ifndef REPREPRO_DATABASE_H
#include "database.h"
#endif

extern bool pool_havedereferenced;

13
/* called from references.c to note the file lost a reference */
14
retvalue pool_dereferenced(const char *);
15 16 17 18 19
/* called from files.c to note the file was added or forgotten */
retvalue pool_markadded(const char *);
retvalue pool_markdeleted(const char *);

/* Remove all files that lost their last reference, or only count them */
Bernhard Link's avatar
Bernhard Link committed
20
retvalue pool_removeunreferenced(bool /*delete*/);
21 22

/* Delete all added files that are not used, or only count them */
23
void pool_tidyadded(bool deletenew);
24 25

/* delete and forget a single file */
26
retvalue pool_delete(const char *);
27

Bernhard Link's avatar
Bernhard Link committed
28 29 30
/* notify outhook of new files */
void pool_sendnewfiles(void);

31 32
/* free all memory, to make valgrind happier */
void pool_free(void);
33
#endif