]> git.proxmox.com Git - libgit2.git/blob - include/git2/transport.h
New upstream version 1.1.0+dfsg.1
[libgit2.git] / include / git2 / transport.h
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 #ifndef INCLUDE_git_transport_h__
8 #define INCLUDE_git_transport_h__
9
10 #include "indexer.h"
11 #include "net.h"
12 #include "types.h"
13 #include "cert.h"
14 #include "credential.h"
15
16 /**
17 * @file git2/transport.h
18 * @brief Git transport interfaces and functions
19 * @defgroup git_transport interfaces and functions
20 * @ingroup Git
21 * @{
22 */
23 GIT_BEGIN_DECL
24
25 /**
26 * Callback for messages recieved by the transport.
27 *
28 * Return a negative value to cancel the network operation.
29 *
30 * @param str The message from the transport
31 * @param len The length of the message
32 * @param payload Payload provided by the caller
33 */
34 typedef int GIT_CALLBACK(git_transport_message_cb)(const char *str, int len, void *payload);
35
36 /** Signature of a function which creates a transport */
37 typedef int GIT_CALLBACK(git_transport_cb)(git_transport **out, git_remote *owner, void *param);
38
39 /** @} */
40 GIT_END_DECL
41
42 #endif