Imported Upstream version 3.3.2
[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 *ignore_headers_in_manifest;
21         bool keep_comments_cpp;
22         float limit_multiple;
23         char *log_file;
24         unsigned max_files;
25         uint64_t max_size;
26         char *path;
27         char *prefix_command;
28         char *prefix_command_cpp;
29         bool read_only;
30         bool read_only_direct;
31         bool recache;
32         bool run_second_cpp;
33         unsigned sloppiness;
34         bool stats;
35         char *temporary_dir;
36         unsigned umask;
37         bool unify;
38
39         const char **item_origins;
40 };
41
42 struct conf *conf_create(void);
43 void conf_free(struct conf *conf);
44 bool conf_read(struct conf *conf, const char *path, char **errmsg);
45 bool conf_update_from_environment(struct conf *conf, char **errmsg);
46 bool conf_set_value_in_file(const char *path, const char *key,
47                             const char *value, char **errmsg);
48 bool conf_print_items(struct conf *conf,
49                       void (*printer)(const char *descr, const char *origin,
50                                       void *context),
51                       void *context);
52
53 #endif