1 /* 2 * ggit-reflog.h 3 * This file is part of libgit2-glib 4 * 5 * Copyright (C) 2012 - Garrett Regier 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_REFLOG_H__ 22 #define __GGIT_REFLOG_H__ 23 24 #include <glib-object.h> 25 #include <git2.h> 26 #include "ggit-types.h" 27 #include "ggit-ref.h" 28 #include "ggit-signature.h" 29 30 G_BEGIN_DECLS 31 32 #define GGIT_TYPE_REFLOG (ggit_reflog_get_type ()) 33 #define GGIT_REFLOG(obj) ((GgitReflog *)obj) 34 35 GType ggit_reflog_get_type (void) G_GNUC_CONST; 36 37 GgitReflog *_ggit_reflog_wrap (GgitRef *ref, 38 git_reflog *reflog); 39 40 GgitReflog *ggit_reflog_ref (GgitReflog *reflog); 41 void ggit_reflog_unref (GgitReflog *reflog); 42 43 guint ggit_reflog_get_entry_count (GgitReflog *reflog); 44 GgitReflogEntry *ggit_reflog_get_entry_from_index (GgitReflog *reflog, 45 guint idx); 46 47 gboolean ggit_reflog_write (GgitReflog *reflog, 48 GError **error); 49 50 gboolean ggit_reflog_rename (GgitReflog *reflog, 51 const gchar *new_name, 52 GError **error); 53 54 gboolean ggit_reflog_append (GgitReflog *reflog, 55 GgitOId *oid, 56 GgitSignature *committer, 57 const gchar *message, 58 GError **error); 59 60 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GgitReflog, ggit_reflog_unref) 61 62 G_END_DECLS 63 64 #endif /* __GGIT_REFLOG_H__ */ 65 66 /* ex:set ts=8 noet: */ 67