diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
commit | 29b5ab554790bb57337a3b6ab9dcd963cf69d22e (patch) | |
tree | be1456d2bc6c1fb078695fad7bc8f6b212062d3c /include/git2/transport.h | |
parent | Initial commit. (diff) | |
download | libgit2-upstream/1.7.2+ds.tar.xz libgit2-upstream/1.7.2+ds.zip |
Adding upstream version 1.7.2+ds.upstream/1.7.2+ds
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | include/git2/transport.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/git2/transport.h b/include/git2/transport.h new file mode 100644 index 0000000..5a27de9 --- /dev/null +++ b/include/git2/transport.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_git_transport_h__ +#define INCLUDE_git_transport_h__ + +#include "indexer.h" +#include "net.h" +#include "types.h" +#include "cert.h" +#include "credential.h" + +/** + * @file git2/transport.h + * @brief Git transport interfaces and functions + * @defgroup git_transport interfaces and functions + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +/** + * Callback for messages received by the transport. + * + * Return a negative value to cancel the network operation. + * + * @param str The message from the transport + * @param len The length of the message + * @param payload Payload provided by the caller + */ +typedef int GIT_CALLBACK(git_transport_message_cb)(const char *str, int len, void *payload); + +/** Signature of a function which creates a transport */ +typedef int GIT_CALLBACK(git_transport_cb)(git_transport **out, git_remote *owner, void *param); + +/** @} */ +GIT_END_DECL + +#endif |