1 /*
2  * ggit-tree-entry.h
3  * This file is part of libgit2-glib
4  *
5  * Copyright (C) 2012 - Jesse van den Kieboom
6  *
7  * libgit2-glib is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * libgit2-glib is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with libgit2-glib. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __GGIT_TREE_ENTRY_H__
22 #define __GGIT_TREE_ENTRY_H__
23 
24 #include <git2.h>
25 #include <glib-object.h>
26 #include <libgit2-glib/ggit-types.h>
27 
28 G_BEGIN_DECLS
29 
30 #define GGIT_TYPE_TREE_ENTRY       (ggit_tree_entry_get_type ())
31 #define GGIT_TREE_ENTRY(obj)       ((GgitTreeEntry *)obj)
32 
33 GType          ggit_tree_entry_get_type        (void) G_GNUC_CONST;
34 
35 GgitTreeEntry *_ggit_tree_entry_wrap           (git_tree_entry       *entry,
36                                                 gboolean              free_entry);
37 GgitTreeEntry *ggit_tree_entry_ref             (GgitTreeEntry        *entry);
38 void           ggit_tree_entry_unref           (GgitTreeEntry        *entry);
39 
40 GgitFileMode   ggit_tree_entry_get_file_mode   (GgitTreeEntry        *entry);
41 GgitOId       *ggit_tree_entry_get_id          (GgitTreeEntry        *entry);
42 const gchar *  ggit_tree_entry_get_name        (GgitTreeEntry        *entry);
43 
44 GType          ggit_tree_entry_get_object_type (GgitTreeEntry        *entry);
45 
46 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GgitTreeEntry, ggit_tree_entry_unref)
47 
48 G_END_DECLS
49 
50 #endif /* __GGIT_TREE_ENTRY_H__ */
51 
52 /* ex:set ts=8 noet: */
53