1 module deimos.git2.types;
2 
3 import deimos.git2.common;
4 import deimos.git2.util;
5 import std.conv;
6 import core.stdc.stdint;
7 
8 extern (C):
9 
10 alias int32_t = core.stdc.stdint.int32_t;
11 alias int64_t = core.stdc.stdint.int64_t;
12 alias uint16_t = core.stdc.stdint.uint16_t;
13 alias uint32_t = core.stdc.stdint.uint32_t;
14 
15 alias off64_t = long;
16 alias __time64_t = long;
17 alias __int64 = long;
18 alias __haiku_std_int64 = long;
19 
20 alias git_off_t = long;
21 alias git_time_t = long;
22 
23 enum git_otype
24 {
25 	GIT_OBJ_ANY = -2,
26 	GIT_OBJ_BAD = -1,
27 	GIT_OBJ__EXT1 = 0,
28 	GIT_OBJ_COMMIT = 1,
29 	GIT_OBJ_TREE = 2,
30 	GIT_OBJ_BLOB = 3,
31 	GIT_OBJ_TAG = 4,
32 	GIT_OBJ__EXT2 = 5,
33 	GIT_OBJ_OFS_DELTA = 6,
34 	GIT_OBJ_REF_DELTA = 7,
35 }
36 mixin _ExportEnumMembers!git_otype;
37 
38 struct git_odb
39 {
40     @disable this();
41     @disable this(this);
42 }
43 
44 struct git_odb_object
45 {
46     @disable this();
47     @disable this(this);
48 }
49 
50 struct git_refdb
51 {
52     @disable this();
53     @disable this(this);
54 }
55 
56 struct git_repository
57 {
58     @disable this();
59     @disable this(this);
60 }
61 
62 struct git_object
63 {
64     @disable this();
65     @disable this(this);
66 }
67 
68 struct git_revwalk
69 {
70     @disable this();
71     @disable this(this);
72 }
73 
74 struct git_tag
75 {
76     @disable this();
77     @disable this(this);
78 }
79 
80 struct git_blob
81 {
82     @disable this();
83     @disable this(this);
84 }
85 
86 struct git_commit
87 {
88     @disable this();
89     @disable this(this);
90 }
91 
92 struct git_tree_entry
93 {
94     @disable this();
95     @disable this(this);
96 }
97 
98 struct git_tree
99 {
100     @disable this();
101     @disable this(this);
102 }
103 
104 struct git_treebuilder
105 {
106     @disable this();
107     @disable this(this);
108 }
109 
110 struct git_index
111 {
112     @disable this();
113     @disable this(this);
114 }
115 
116 struct git_index_conflict_iterator
117 {
118     @disable this();
119     @disable this(this);
120 }
121 
122 struct git_config
123 {
124     @disable this();
125     @disable this(this);
126 }
127 
128 struct git_reflog_entry
129 {
130     @disable this();
131     @disable this(this);
132 }
133 
134 struct git_reflog
135 {
136     @disable this();
137     @disable this(this);
138 }
139 
140 struct git_note
141 {
142     @disable this();
143     @disable this(this);
144 }
145 
146 struct git_packbuilder
147 {
148     @disable this();
149     @disable this(this);
150 }
151 
152 struct git_time
153 {
154 	git_time_t time;
155 	int offset;
156 }
157 
158 struct git_signature
159 {
160 	char *name;
161 	char *email;
162 	git_time when;
163 }
164 
165 struct git_reference
166 {
167     @disable this();
168     @disable this(this);
169 }
170 
171 struct git_merge_head
172 {
173     @disable this();
174     @disable this(this);
175 }
176 
177 struct git_merge_result
178 {
179     @disable this();
180     @disable this(this);
181 }
182 
183 struct git_status_list
184 {
185     @disable this();
186     @disable this(this);
187 }
188 
189 enum git_ref_t
190 {
191 	GIT_REF_INVALID = 0,
192 	GIT_REF_OID = 1,
193 	GIT_REF_SYMBOLIC = 2,
194 	GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC,
195 }
196 mixin _ExportEnumMembers!git_ref_t;
197 
198 enum git_branch_t
199 {
200 	GIT_BRANCH_LOCAL = 1,
201 	GIT_BRANCH_REMOTE = 2,
202 }
203 mixin _ExportEnumMembers!git_branch_t;
204 
205 enum git_filemode_t
206 {
207 	GIT_FILEMODE_NEW					= octal!0,
208 	GIT_FILEMODE_TREE					= octal!40000,
209 	GIT_FILEMODE_BLOB					= octal!100644,
210 	GIT_FILEMODE_BLOB_EXECUTABLE		= octal!100755,
211 	GIT_FILEMODE_LINK					= octal!120000,
212 	GIT_FILEMODE_COMMIT					= octal!160000,
213 }
214 mixin _ExportEnumMembers!git_filemode_t;
215 
216 struct git_refspec
217 {
218     @disable this();
219     @disable this(this);
220 }
221 
222 struct git_remote
223 {
224     @disable this();
225     @disable this(this);
226 }
227 
228 struct git_push
229 {
230     @disable this();
231     @disable this(this);
232 }
233 
234 struct git_transfer_progress
235 {
236 	uint total_objects;
237 	uint indexed_objects;
238 	uint received_objects;
239     uint local_objects;
240     uint total_deltas;
241     uint indexed_deltas;
242 	size_t received_bytes;
243 }
244 
245 alias git_transfer_progress_callback = int function(const(git_transfer_progress)* stats, void* payload);
246 
247 struct git_submodule
248 {
249     @disable this();
250     @disable this(this);
251 }
252 
253 enum git_submodule_update_t {
254     GIT_SUBMODULE_UPDATE_RESET    = -1,
255 
256     GIT_SUBMODULE_UPDATE_CHECKOUT = 1,
257     GIT_SUBMODULE_UPDATE_REBASE   = 2,
258     GIT_SUBMODULE_UPDATE_MERGE    = 3,
259     GIT_SUBMODULE_UPDATE_NONE     = 4,
260 
261     GIT_SUBMODULE_UPDATE_DEFAULT  = 0
262 }
263 
264 enum git_submodule_ignore_t {
265     GIT_SUBMODULE_IGNORE_RESET     = -1,
266 
267     GIT_SUBMODULE_IGNORE_NONE      = 1,
268     GIT_SUBMODULE_IGNORE_UNTRACKED = 2,
269     GIT_SUBMODULE_IGNORE_DIRTY     = 3,
270     GIT_SUBMODULE_IGNORE_ALL       = 4,
271 
272     GIT_SUBMODULE_IGNORE_DEFAULT   = 0
273 }