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