summaryrefslogtreecommitdiff
path: root/src/checkpoint.h
blob: d0d094868f547deb076cac4ba1781cc893ff2d92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef _CHECKPOINT_H_
#define _CHECKPOINT_H_

#include <pool.h>

/* checkpoint_save() stores states to a checkponint file (pathname) */
int checkpoint_save(const char *pathname, int dir, char *remote_host, pool *path_pool,
		    pool *chunk_pool);

/* checkpoint_load_meta() reads a checkpoint file (pathname) and returns
 * remote host string to *remote and transfer direction to *dir.
 */
int checkpoint_load_remote(const char *pathname, char *remote, size_t len, int *dir);

/* checkpoint_load_paths() reads a checkpoint file (pathname) and
 * fills path_pool and chunk_pool.
 */
int checkpoint_load_paths(const char *pathname, pool *path_pool, pool *chunk_pool);

#endif /* _CHECKPOINT_H_ */