]>
git.proxmox.com Git - libgit2.git/blob - src/config_file.h
2 * Copyright (C) 2012 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_config_file_h__
8 #define INCLUDE_config_file_h__
10 #include "git2/config.h"
12 GIT_INLINE(int) git_config_file_open(git_config_backend
*cfg
, unsigned int level
)
14 return cfg
->open(cfg
, level
);
17 GIT_INLINE(void) git_config_file_free(git_config_backend
*cfg
)
22 GIT_INLINE(int) git_config_file_get_string(
23 const git_config_entry
**out
, git_config_backend
*cfg
, const char *name
)
25 return cfg
->get(cfg
, name
, out
);
28 GIT_INLINE(int) git_config_file_set_string(
29 git_config_backend
*cfg
, const char *name
, const char *value
)
31 return cfg
->set(cfg
, name
, value
);
34 GIT_INLINE(int) git_config_file_delete(
35 git_config_backend
*cfg
, const char *name
)
37 return cfg
->del(cfg
, name
);
40 GIT_INLINE(int) git_config_file_foreach(
41 git_config_backend
*cfg
,
42 int (*fn
)(const git_config_entry
*entry
, void *data
),
45 return cfg
->foreach(cfg
, NULL
, fn
, data
);
48 GIT_INLINE(int) git_config_file_foreach_match(
49 git_config_backend
*cfg
,
51 int (*fn
)(const git_config_entry
*entry
, void *data
),
54 return cfg
->foreach(cfg
, regexp
, fn
, data
);