1 #ifndef INCLUDED_TTHSUM_H
2 #define INCLUDED_TTHSUM_H
3 /* vim: set ts=8 sts=4 sw=4 tw=80 noet: */
4 /*======================================================================
5 Copyright (C) 2004,2005,2009 Walter Doekes <walter+tthsum@wjd.nu>
6 This file is part of tthsum.
7 
8 tthsum is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 tthsum is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with tthsum.  If not, see <http://www.gnu.org/licenses/>.
20 ======================================================================*/
21 
22 /**
23  * The tthsum application.
24  */
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 /**
31  * Option flags.
32  */
33 struct tthsum_options {
34     int has_locale;
35     unsigned progress_every_mib;
36     int use_mmap;
37     int verbose;
38     int warn;
39 };
40 
41 /**
42  * Generate a tthsum digest.
43  */
44 int tthsum_generate_roots(const char** filenames, int files,
45 	const struct tthsum_options* opt);
46 
47 /**
48  * Check a tthsum digest.
49  */
50 int tthsum_check_digest(const char* filenames,
51 	const struct tthsum_options* opt);
52 
53 #ifdef __cplusplus
54 } /* extern "C" */
55 #endif /* __cplusplus */
56 
57 #endif /* INCLUDED_TTHSUM_H */
58