diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-05 22:16:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-05 22:16:16 +0000 |
commit | 2386d0b653cfabc856a8639504d6dcc82022cc1b (patch) | |
tree | 8baceca2d1d1c8c4f96edd63890d0ddb73c841ba /src/include/gnunet_plugin_lib.h | |
parent | 755a13bfb425dc9d91aeb691e65e281fed89eb1d (diff) | |
download | gnunet-2386d0b653cfabc856a8639504d6dcc82022cc1b.tar.gz gnunet-2386d0b653cfabc856a8639504d6dcc82022cc1b.zip |
add API to test for plugin's existence
Diffstat (limited to 'src/include/gnunet_plugin_lib.h')
-rw-r--r-- | src/include/gnunet_plugin_lib.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/gnunet_plugin_lib.h b/src/include/gnunet_plugin_lib.h index b8c7b99fe..9608abd4c 100644 --- a/src/include/gnunet_plugin_lib.h +++ b/src/include/gnunet_plugin_lib.h | |||
@@ -51,6 +51,17 @@ typedef void *(*GNUNET_PLUGIN_Callback) (void *arg); | |||
51 | 51 | ||
52 | 52 | ||
53 | /** | 53 | /** |
54 | * Test if a plugin exists. | ||
55 | * | ||
56 | * Note that the library must export a symbol called | ||
57 | * "library_name_init" for the test to succeed. | ||
58 | * | ||
59 | * @param library_name name of the plugin to test if it is installed | ||
60 | * @return GNUNET_YES if the plugin exists, GNUNET_NO if not | ||
61 | */ | ||
62 | int GNUNET_PLUGIN_test (const char *library_name); | ||
63 | |||
64 | /** | ||
54 | * Setup plugin (runs the "init" callback and returns whatever "init" | 65 | * Setup plugin (runs the "init" callback and returns whatever "init" |
55 | * returned). If "init" returns NULL, the plugin is unloaded. | 66 | * returned). If "init" returns NULL, the plugin is unloaded. |
56 | * | 67 | * |