Lindenii Project Forge
Login

server

Lindenii Forge’s main backend daemon
Commit info
ID
a4f1c7d38c3aaf6064145398503c0b15afed350e
Author
Runxi Yu <me@runxiyu.org>
Author date
Tue, 10 Jun 2025 12:24:19 +0800
Committer
Runxi Yu <me@runxiyu.org>
Committer date
Tue, 10 Jun 2025 12:24:19 +0800
Actions
git2d: x.h include guard should be before its own includes
/*-
 * SPDX-License-Identifier: AGPL-3.0-only
 * SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
 */

#ifndef X_H
#define X_H

#include <err.h>
#include <errno.h>
#include <git2.h>
#include <pthread.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "bare.h"

#ifndef X_H
#define X_H

typedef struct {
	int fd;
} conn_io_t;


bare_error conn_read(void *buffer, void *dst, uint64_t sz);
bare_error conn_write(void *buffer, const void *src, uint64_t sz);

void * session(void *_conn);

int cmd_index(git_repository *repo, struct bare_writer *writer);
int cmd_treeraw(git_repository *repo, struct bare_reader *reader, struct bare_writer *writer);

#endif // X_H