X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdatastore%2Fplugin_datastore_template.c;h=fdd4fb157bf48021f41e81a23894890d486e353b;hb=2105059516320800eaa8fff1196b58f29a50ba7c;hp=cf4b2ec9914a891ba5816a917d0e98fb04546408;hpb=55182581d5e44ccc8d7495efd60a8f913d5b057d;p=oweals%2Fgnunet.git diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c index cf4b2ec99..fdd4fb157 100644 --- a/src/datastore/plugin_datastore_template.c +++ b/src/datastore/plugin_datastore_template.c @@ -1,6 +1,6 @@ /* This file is part of GNUnet - (C) 2009, 2011 Christian Grothoff (and other contributing authors) + Copyright (C) 2009, 2011 GNUnet e.V. GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ /** @@ -69,19 +69,19 @@ template_plugin_estimate_size (void *cls, unsigned long long *estimate) * @param anonymity anonymity-level for the content * @param replication replication-level for the content * @param expiration expiration time for the content - * @param msg set to error message - * @return GNUNET_OK on success + * @param cont continuation called with success or failure status + * @param cont_cls continuation closure */ -static int +static void template_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, uint32_t replication, - struct GNUNET_TIME_Absolute expiration, char **msg) + struct GNUNET_TIME_Absolute expiration, PluginPutCont cont, + void *cont_cls) { GNUNET_break (0); - *msg = GNUNET_strdup ("not implemented"); - return GNUNET_SYSERR; + cont (cont_cls, key, size, GNUNET_SYSERR, "not implemented"); } @@ -170,16 +170,16 @@ template_plugin_get_expiration (void *cls, PluginDatumProcessor proc, * @param expire new expiration time should be the * MAX of any existing expiration time and * this value - * @param msg set to error message - * @return GNUNET_OK on success + * @param cont continuation called with success or failure status + * @param cons_cls continuation closure */ -static int +static void template_plugin_update (void *cls, uint64_t uid, int delta, - struct GNUNET_TIME_Absolute expire, char **msg) + struct GNUNET_TIME_Absolute expire, + PluginUpdateCont cont, void *cont_cls) { GNUNET_break (0); - *msg = GNUNET_strdup ("not implemented"); - return GNUNET_SYSERR; + cont (cont_cls, GNUNET_SYSERR, "not implemented"); } @@ -226,6 +226,7 @@ template_get_keys (void *cls, PluginKeyProcessor proc, void *proc_cls) { + proc (proc_cls, NULL, 0); }