diff options
Diffstat (limited to 'doc/documentation/tutorial-examples/023.c')
-rw-r--r-- | doc/documentation/tutorial-examples/023.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/documentation/tutorial-examples/023.c b/doc/documentation/tutorial-examples/023.c new file mode 100644 index 000000000..820c38b10 --- /dev/null +++ b/doc/documentation/tutorial-examples/023.c | |||
@@ -0,0 +1,17 @@ | |||
1 | void * | ||
2 | libgnunet_plugin_block_SERVICE_init (void *cls) | ||
3 | { | ||
4 | static enum GNUNET_BLOCK_Type types[] = | ||
5 | { | ||
6 | GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE, | ||
7 | GNUNET_BLOCK_TYPE_ANY | ||
8 | }; | ||
9 | struct GNUNET_BLOCK_PluginFunctions *api; | ||
10 | |||
11 | api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions); | ||
12 | api->evaluate = &block_plugin_SERICE_evaluate; | ||
13 | api->get_key = &block_plugin_SERVICE_get_key; | ||
14 | api->types = types; | ||
15 | return api; | ||
16 | } | ||
17 | |||