1 /*
2  * Copyright (C) the libgit2 contributors. All rights reserved.
3  *
4  * This file is part of libgit2, distributed under the GNU GPL v2 with
5  * a Linking Exception. For full terms see the included COPYING file.
6  */
7 module libgit2_d.net;
8 
9 
10 private static import libgit2_d.oid;
11 
12 /**
13  * @file git2/net.h
14  * @brief Git networking declarations
15  * @ingroup Git
16  * @{
17  */
18 extern (C):
19 nothrow @nogc:
20 public:
21 
22 enum GIT_DEFAULT_PORT = "9418";
23 
24 /**
25  * Direction of the connection.
26  *
27  * We need this because we need to know whether we should call
28  * git-upload-pack or git-receive-pack on the remote end when get_refs
29  * gets called.
30  */
31 enum git_direction
32 {
33 	GIT_DIRECTION_FETCH = 0,
34 	GIT_DIRECTION_PUSH = 1,
35 }
36 
37 //Declaration name in C language
38 enum
39 {
40 	GIT_DIRECTION_FETCH = .git_direction.GIT_DIRECTION_FETCH,
41 	GIT_DIRECTION_PUSH = .git_direction.GIT_DIRECTION_PUSH,
42 }
43 
44 /**
45  * Description of a reference advertised by a remote server, given out
46  * on `ls` calls.
47  */
48 struct git_remote_head
49 {
50 	/**
51 	 * available locally
52 	 */
53 	int local;
54 
55 	libgit2_d.oid.git_oid oid;
56 	libgit2_d.oid.git_oid loid;
57 	char* name;
58 
59 	/**
60 	 * If the server send a symref mapping for this ref, this will
61 	 * point to the target.
62 	 */
63 	char* symref_target;
64 }
65 
66 /** @} */