]> git.proxmox.com Git - libgit2.git/blame - include/git2/transport.h
New upstream version 1.3.0+dfsg.1
[libgit2.git] / include / git2 / transport.h
CommitLineData
41fb1ca0 1/*
359fc2d2 2 * Copyright (C) the libgit2 contributors. All rights reserved.
41fb1ca0
PK
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"
613d5eb9 12#include "types.h"
22a2d3d5
UG
13#include "cert.h"
14#include "credential.h"
41fb1ca0
PK
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 */
23GIT_BEGIN_DECL
24
57af0b92 25/**
c25aa7cd 26 * Callback for messages received by the transport.
57af0b92 27 *
22a2d3d5 28 * Return a negative value to cancel the network operation.
57af0b92 29 *
22a2d3d5
UG
30 * @param str The message from the transport
31 * @param len The length of the message
32 * @param payload Payload provided by the caller
57af0b92 33 */
22a2d3d5 34typedef int GIT_CALLBACK(git_transport_message_cb)(const char *str, int len, void *payload);
57af0b92 35
22a2d3d5
UG
36/** Signature of a function which creates a transport */
37typedef int GIT_CALLBACK(git_transport_cb)(git_transport **out, git_remote *owner, void *param);
091361f5 38
41fb1ca0
PK
39/** @} */
40GIT_END_DECL
22a2d3d5 41
41fb1ca0 42#endif