Blame include/git2/global.h

Packit ae9e2a
/*
Packit ae9e2a
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit ae9e2a
 *
Packit ae9e2a
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit ae9e2a
 * a Linking Exception. For full terms see the included COPYING file.
Packit ae9e2a
 */
Packit ae9e2a
#ifndef INCLUDE_git_global_h__
Packit ae9e2a
#define INCLUDE_git_global_h__
Packit ae9e2a
Packit ae9e2a
#include "common.h"
Packit ae9e2a
Packit ae9e2a
GIT_BEGIN_DECL
Packit ae9e2a
Packit ae9e2a
/**
Packit ae9e2a
 * Init the global state
Packit ae9e2a
 *
Packit ae9e2a
 * This function must be called before any other libgit2 function in
Packit ae9e2a
 * order to set up global state and threading.
Packit ae9e2a
 *
Packit ae9e2a
 * This function may be called multiple times - it will return the number
Packit ae9e2a
 * of times the initialization has been called (including this one) that have
Packit ae9e2a
 * not subsequently been shutdown.
Packit ae9e2a
 *
Packit ae9e2a
 * @return the number of initializations of the library, or an error code.
Packit ae9e2a
 */
Packit ae9e2a
GIT_EXTERN(int) git_libgit2_init(void);
Packit ae9e2a
Packit ae9e2a
/**
Packit ae9e2a
 * Shutdown the global state
Packit ae9e2a
 *
Packit ae9e2a
 * Clean up the global state and threading context after calling it as
Packit ae9e2a
 * many times as `git_libgit2_init()` was called - it will return the
Packit ae9e2a
 * number of remainining initializations that have not been shutdown
Packit ae9e2a
 * (after this one).
Packit ae9e2a
 * 
Packit ae9e2a
 * @return the number of remaining initializations of the library, or an
Packit ae9e2a
 * error code.
Packit ae9e2a
 */
Packit ae9e2a
GIT_EXTERN(int) git_libgit2_shutdown(void);
Packit ae9e2a
Packit ae9e2a
/** @} */
Packit ae9e2a
GIT_END_DECL
Packit ae9e2a
#endif
Packit ae9e2a