aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation/tutorial-examples/023.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation/tutorial-examples/023.c')
-rw-r--r--doc/documentation/tutorial-examples/023.c17
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 0000000000..820c38b10a
--- /dev/null
+++ b/doc/documentation/tutorial-examples/023.c
@@ -0,0 +1,17 @@
+void *
+libgnunet_plugin_block_SERVICE_init (void *cls)
+{
+ static enum GNUNET_BLOCK_Type types[] =
+ {
+ GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE,
+ GNUNET_BLOCK_TYPE_ANY
+ };
+ struct GNUNET_BLOCK_PluginFunctions *api;
+
+ api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions);
+ api->evaluate = &block_plugin_SERICE_evaluate;
+ api->get_key = &block_plugin_SERVICE_get_key;
+ api->types = types;
+ return api;
+}
+