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_cert 166 { 167 git_cert_t cert_type; 168 } 169 170 struct git_reference 171 { 172 @disable this(); 173 @disable this(this); 174 } 175 176 struct git_merge_head 177 { 178 @disable this(); 179 @disable this(this); 180 } 181 182 struct git_transaction 183 { 184 @disable this(); 185 @disable this(this); 186 } 187 188 struct git_annotated_commit 189 { 190 @disable this(); 191 @disable this(this); 192 } 193 194 struct git_merge_result 195 { 196 @disable this(); 197 @disable this(this); 198 } 199 200 struct git_status_list 201 { 202 @disable this(); 203 @disable this(this); 204 } 205 206 enum git_cert_t 207 { 208 GIT_CERT_NONE, 209 GIT_CERT_X509, 210 GIT_CERT_HOSTKEY_LIBSSH2, 211 GIT_CERT_STRARRAY, 212 } 213 mixin _ExportEnumMembers!git_cert_t; 214 215 struct git_rebase 216 { 217 @disable this(); 218 @disable this(this); 219 } 220 221 enum git_ref_t 222 { 223 GIT_REF_INVALID = 0, 224 GIT_REF_OID = 1, 225 GIT_REF_SYMBOLIC = 2, 226 GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC, 227 } 228 mixin _ExportEnumMembers!git_ref_t; 229 230 enum git_branch_t 231 { 232 GIT_BRANCH_LOCAL = 1, 233 GIT_BRANCH_REMOTE = 2, 234 GIT_BRANCH_ALL = GIT_BRANCH_LOCAL | GIT_BRANCH_REMOTE, 235 } 236 mixin _ExportEnumMembers!git_branch_t; 237 238 enum git_filemode_t 239 { 240 GIT_FILEMODE_UNREADABLE = octal!0, 241 GIT_FILEMODE_TREE = octal!40000, 242 GIT_FILEMODE_BLOB = octal!100644, 243 GIT_FILEMODE_BLOB_EXECUTABLE = octal!100755, 244 GIT_FILEMODE_LINK = octal!120000, 245 GIT_FILEMODE_COMMIT = octal!160000, 246 } 247 mixin _ExportEnumMembers!git_filemode_t; 248 249 struct git_refspec 250 { 251 @disable this(); 252 @disable this(this); 253 } 254 255 struct git_remote 256 { 257 @disable this(); 258 @disable this(this); 259 } 260 261 struct git_transport 262 { 263 @disable this(); 264 @disable this(this); 265 } 266 267 struct git_push 268 { 269 @disable this(); 270 @disable this(this); 271 } 272 273 struct git_transfer_progress 274 { 275 uint total_objects; 276 uint indexed_objects; 277 uint received_objects; 278 uint local_objects; 279 uint total_deltas; 280 uint indexed_deltas; 281 size_t received_bytes; 282 } 283 284 alias git_transfer_progress_cb = int function(const(git_transfer_progress) *stats, void *payload); 285 alias git_transport_message_cb = int function(const(char) *str, int len, void *payload); 286 alias git_transport_certificate_check_cb = int function(git_cert *cert, int valid, const(char) *host, void *payload); 287 288 struct git_submodule 289 { 290 @disable this(); 291 @disable this(this); 292 } 293 294 struct git_writestream 295 { 296 int function(git_writestream *stream, const(char) *buffer, size_t len) write; 297 int function(git_writestream *stream) close; 298 void function(git_writestream *stream) free; 299 } 300 301 enum git_submodule_update_t { 302 GIT_SUBMODULE_UPDATE_CHECKOUT = 1, 303 GIT_SUBMODULE_UPDATE_REBASE = 2, 304 GIT_SUBMODULE_UPDATE_MERGE = 3, 305 GIT_SUBMODULE_UPDATE_NONE = 4, 306 307 GIT_SUBMODULE_UPDATE_DEFAULT = 0 308 } 309 310 enum git_submodule_ignore_t { 311 GIT_SUBMODULE_IGNORE_UNSPECIFIED = -1, 312 GIT_SUBMODULE_IGNORE_DEFAULT = 0, 313 GIT_SUBMODULE_IGNORE_NONE = 1, 314 GIT_SUBMODULE_IGNORE_UNTRACKED = 2, 315 GIT_SUBMODULE_IGNORE_DIRTY = 3, 316 GIT_SUBMODULE_IGNORE_ALL = 4, 317 } 318 319 enum git_submodule_recurse_t { 320 GIT_SUBMODULE_RECURSE_NO = 0, 321 GIT_SUBMODULE_RECURSE_YES = 1, 322 GIT_SUBMODULE_RECURSE_ONDEMAND = 2, 323 }