]> git.proxmox.com Git - libgit2.git/blob - src/tree-cache.h
Join typedef and struct definitions in single file.
[libgit2.git] / src / tree-cache.h
1 /*
2 * Copyright (C) the libgit2 contributors. All rights reserved.
3 *
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.
6 */
7
8 #ifndef INCLUDE_tree_cache_h__
9 #define INCLUDE_tree_cache_h__
10
11 #include "common.h"
12 #include "git2/oid.h"
13
14 typedef struct {
15 struct git_tree_cache *parent;
16 struct git_tree_cache **children;
17 size_t children_count;
18
19 ssize_t entries;
20 git_oid oid;
21 size_t namelen;
22 char name[GIT_FLEX_ARRAY];
23 } git_tree_cache;
24
25 int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer_size);
26 void git_tree_cache_invalidate_path(git_tree_cache *tree, const char *path);
27 const git_tree_cache *git_tree_cache_get(const git_tree_cache *tree, const char *path);
28 void git_tree_cache_free(git_tree_cache *tree);
29
30 #endif