1 /* 2 * ggit-checkout-options.h 3 * This file is part of libgit2-glib 4 * 5 * Copyright (C) 2013 - Ignacio Casal Quinteiro 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_CHECKOUT_OPTIONS_H__ 22 #define __GGIT_CHECKOUT_OPTIONS_H__ 23 24 #include <glib-object.h> 25 #include <git2.h> 26 27 #include "ggit-types.h" 28 #include "ggit-tree.h" 29 30 G_BEGIN_DECLS 31 32 #define GGIT_TYPE_CHECKOUT_OPTIONS (ggit_checkout_options_get_type ()) 33 G_DECLARE_DERIVABLE_TYPE (GgitCheckoutOptions, ggit_checkout_options, GGIT, CHECKOUT_OPTIONS, GObject) 34 35 struct _GgitCheckoutOptionsClass 36 { 37 GObjectClass parent_class; 38 39 gint (*notify) (GgitCheckoutOptions *options, 40 GgitCheckoutNotifyFlags why, 41 const gchar *path, 42 GgitDiffFile *baseline, 43 GgitDiffFile *target, 44 GgitDiffFile *workdir); 45 46 void (*progress) (GgitCheckoutOptions *options, 47 const gchar *path, 48 gsize completed_steps, 49 gsize total_steps); 50 }; 51 52 const git_checkout_options * 53 _ggit_checkout_options_get_checkout_options ( 54 GgitCheckoutOptions *options); 55 56 GgitCheckoutOptions *ggit_checkout_options_new (void); 57 58 GgitCheckoutStrategy ggit_checkout_options_get_strategy (GgitCheckoutOptions *options); 59 void ggit_checkout_options_set_strategy (GgitCheckoutOptions *options, 60 GgitCheckoutStrategy strategy); 61 62 gboolean ggit_checkout_options_get_disable_filters ( 63 GgitCheckoutOptions *options); 64 65 void ggit_checkout_options_set_disable_filters ( 66 GgitCheckoutOptions *options, 67 gboolean disable); 68 69 guint ggit_checkout_options_get_dir_mode (GgitCheckoutOptions *options); 70 void ggit_checkout_options_set_dir_mode (GgitCheckoutOptions *options, 71 guint dir_mode); 72 73 guint ggit_checkout_options_get_file_mode (GgitCheckoutOptions *options); 74 void ggit_checkout_options_set_file_mode (GgitCheckoutOptions *options, 75 guint file_mode); 76 77 gint ggit_checkout_options_get_file_open_flags ( 78 GgitCheckoutOptions *options); 79 void ggit_checkout_options_set_file_open_flags ( 80 GgitCheckoutOptions *options, 81 gint flags); 82 83 GgitCheckoutNotifyFlags 84 ggit_checkout_options_get_notify_flags ( 85 GgitCheckoutOptions *options); 86 void ggit_checkout_options_set_notify_flags ( 87 GgitCheckoutOptions *options, 88 GgitCheckoutNotifyFlags flags); 89 90 const gchar * const *ggit_checkout_options_get_paths (GgitCheckoutOptions *options); 91 void ggit_checkout_options_set_paths (GgitCheckoutOptions *options, 92 const gchar * const *paths); 93 94 GgitTree *ggit_checkout_options_get_baseline (GgitCheckoutOptions *options); 95 void ggit_checkout_options_set_baseline (GgitCheckoutOptions *options, 96 GgitTree *tree); 97 98 const gchar *ggit_checkout_options_get_target_directory ( 99 GgitCheckoutOptions *options); 100 void ggit_checkout_options_set_target_directory ( 101 GgitCheckoutOptions *options, 102 const gchar *directory); 103 104 const gchar *ggit_checkout_options_get_ancestor_label ( 105 GgitCheckoutOptions *options); 106 void ggit_checkout_options_set_ancestor_label ( 107 GgitCheckoutOptions *options, 108 const gchar *label); 109 110 const gchar *ggit_checkout_options_get_our_label (GgitCheckoutOptions *options); 111 void ggit_checkout_options_set_our_label (GgitCheckoutOptions *options, 112 const gchar *label); 113 114 const gchar *ggit_checkout_options_get_their_label ( 115 GgitCheckoutOptions *options); 116 void ggit_checkout_options_set_their_label ( 117 GgitCheckoutOptions *options, 118 const gchar *label); 119 120 G_END_DECLS 121 122 #endif /* __GGIT_CHECKOUT_OPTIONS_H__ */ 123 124 /* ex:set ts=8 noet: */ 125