Blame include/git2/net.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_git_net_h__
Packit Service 20376f
#define INCLUDE_git_net_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "oid.h"
Packit Service 20376f
#include "types.h"
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * @file git2/net.h
Packit Service 20376f
 * @brief Git networking declarations
Packit Service 20376f
 * @ingroup Git
Packit Service 20376f
 * @{
Packit Service 20376f
 */
Packit Service 20376f
GIT_BEGIN_DECL
Packit Service 20376f
Packit Service 20376f
#define GIT_DEFAULT_PORT "9418"
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Direction of the connection.
Packit Service 20376f
 *
Packit Service 20376f
 * We need this because we need to know whether we should call
Packit Service 20376f
 * git-upload-pack or git-receive-pack on the remote end when get_refs
Packit Service 20376f
 * gets called.
Packit Service 20376f
 */
Packit Service 20376f
typedef enum {
Packit Service 20376f
	GIT_DIRECTION_FETCH = 0,
Packit Service 20376f
	GIT_DIRECTION_PUSH  = 1
Packit Service 20376f
} git_direction;
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Description of a reference advertised by a remote server, given out
Packit Service 20376f
 * on `ls` calls.
Packit Service 20376f
 */
Packit Service 20376f
struct git_remote_head {
Packit Service 20376f
	int local; /* available locally */
Packit Service 20376f
	git_oid oid;
Packit Service 20376f
	git_oid loid;
Packit Service 20376f
	char *name;
Packit Service 20376f
	/**
Packit Service 20376f
	 * If the server send a symref mapping for this ref, this will
Packit Service 20376f
	 * point to the target.
Packit Service 20376f
	 */
Packit Service 20376f
	char *symref_target;
Packit Service 20376f
};
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Callback for listing the remote heads
Packit Service 20376f
 */
Packit Service 20376f
typedef int (*git_headlist_cb)(git_remote_head *rhead, void *payload);
Packit Service 20376f
Packit Service 20376f
/** @} */
Packit Service 20376f
GIT_END_DECL
Packit Service 20376f
#endif