GNUnet 0.21.1
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
74GNUNET_PLUGIN_test (const char *library_name);
75
76
89void *
90GNUNET_PLUGIN_load (const char *library_name,
91 void *arg);
92
93
104typedef void
105(*GNUNET_PLUGIN_LoaderCallback) (void *cls,
106 const char *library_name,
107 void *lib_ret);
108
109
122void
123GNUNET_PLUGIN_load_all (const char *basename,
124 void *arg,
126 void *cb_cls);
127
128
143void
145 const char *basename,
146 void *arg,
148 void *cb_cls);
149
150
160void *
161GNUNET_PLUGIN_unload (const char *library_name,
162 void *arg);
163
164
165#if 0 /* keep Emacsens' auto-indent happy */
166{
167#endif
168#ifdef __cplusplus
169}
170#endif
171
172/* ifndef GNUNET_PLUGIN_LIB_H */
173#endif
174 /* end of group */
176 /* end of group addition */
178
179/* end of gnunet_plugin_lib.h */
static struct GNUNET_FS_Handle * ctx
GNUNET_GenericReturnValue
Named constants for return values.
void GNUNET_PLUGIN_load_all(const char *basename, void *arg, GNUNET_PLUGIN_LoaderCallback cb, void *cb_cls)
Load all compatible plugins with the given base name.
Definition: plugin.c:359
void * GNUNET_PLUGIN_load(const char *library_name, void *arg)
Setup plugin (runs the "init" callback and returns whatever "init" returned).
Definition: plugin.c:198
void GNUNET_PLUGIN_load_all_in_context(const struct GNUNET_OS_ProjectData *ctx, const char *basename, void *arg, GNUNET_PLUGIN_LoaderCallback cb, void *cb_cls)
Load all compatible plugins with the given base name while inside the given context (i....
Definition: plugin.c:386
void * GNUNET_PLUGIN_unload(const char *library_name, void *arg)
Unload plugin (runs the "done" callback and returns whatever "done" returned).
Definition: plugin.c:242
enum GNUNET_GenericReturnValue GNUNET_PLUGIN_test(const char *library_name)
Test if a plugin exists.
Definition: plugin.c:168
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.