Imported Upstream version 3.2.6
[platform/upstream/ccache.git] / conf.h
1 #ifndef CONF_H
2 #define CONF_H
3
4 #include "system.h"
5
6 struct conf {
7         char *base_dir;
8         char *cache_dir;
9         unsigned cache_dir_levels;
10         char *compiler;
11         char *compiler_check;
12         bool compression;
13         unsigned compression_level;
14         char *cpp_extension;
15         bool direct_mode;
16         bool disable;
17         char *extra_files_to_hash;
18         bool hard_link;
19         bool hash_dir;
20         char *log_file;
21         unsigned max_files;
22         uint64_t max_size;
23         char *path;
24         char *prefix_command;
25         bool read_only;
26         bool read_only_direct;
27         bool recache;
28         bool run_second_cpp;
29         unsigned sloppiness;
30         bool stats;
31         char *temporary_dir;
32         unsigned umask;
33         bool unify;
34
35         const char **item_origins;
36 };
37
38 struct conf *conf_create(void);
39 void conf_free(struct conf *conf);
40 bool conf_read(struct conf *conf, const char *path, char **errmsg);
41 bool conf_update_from_environment(struct conf *conf, char **errmsg);
42 bool conf_set_value_in_file(const char *path, const char *key,
43                             const char *value, char **errmsg);
44 bool conf_print_items(struct conf *conf,
45                       void (*printer)(const char *descr, const char *origin,
46                                       void *context),
47                       void *context);
48
49 #endif