GNUnet 0.22.2
gnunet_plugin_lib.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20
21#if ! defined (__GNUNET_UTIL_LIB_H_INSIDE__)
22#error "Only <gnunet_util_lib.h> can be included directly."
23#endif
24
40#ifndef GNUNET_PLUGIN_LIB_H
41#define GNUNET_PLUGIN_LIB_H
42
43#ifdef __cplusplus
44extern "C"
45{
46#if 0 /* keep Emacsens' auto-indent happy */
47}
48#endif
49#endif
50
51
60typedef void *
61(*GNUNET_PLUGIN_Callback) (void *arg);
62
63
76 const char *library_name);
77
78
92void *
94 const char *library_name,
95 void *arg);
96
97
108typedef void
109(*GNUNET_PLUGIN_LoaderCallback) (void *cls,
110 const char *library_name,
111 void *lib_ret);
112
113
127void
129 const char *basename,
130 void *arg,
132 void *cb_cls);
133
134
144void *
145GNUNET_PLUGIN_unload (const char *library_name,
146 void *arg);
147
148
149#if 0 /* keep Emacsens' auto-indent happy */
150{
151#endif
152#ifdef __cplusplus
153}
154#endif
155
156/* ifndef GNUNET_PLUGIN_LIB_H */
157#endif
158 /* end of group */
160 /* end of group addition */
162
163/* end of gnunet_plugin_lib.h */
GNUNET_GenericReturnValue
Named constants for return values.
void * GNUNET_PLUGIN_load(const struct GNUNET_OS_ProjectData *pd, const char *library_name, void *arg)
Setup plugin (runs the "init" callback and returns whatever "init" returned).
Definition: plugin.c:221
enum GNUNET_GenericReturnValue GNUNET_PLUGIN_test(const struct GNUNET_OS_ProjectData *pd, const char *library_name)
Test if a plugin exists.
Definition: plugin.c:172
void GNUNET_PLUGIN_load_all(const struct GNUNET_OS_ProjectData *pd, const char *basename, void *arg, GNUNET_PLUGIN_LoaderCallback cb, void *cb_cls)
Load all compatible plugins with the given base name.
Definition: plugin.c:401
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
Definition: plugin.c:277
void(* GNUNET_PLUGIN_LoaderCallback)(void *cls, const char *library_name, void *lib_ret)
Signature of a function called by GNUNET_PLUGIN_load_all().
Project-specific data used to help the OS subsystem find installation paths.