12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /* rehash --- a decentralised hash<->hash store
- Copyright © 2020 Maxime Devos <maxime.devos@student.kuleuven.be>
- This file is part of rehash.
- rehash is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or (at
- your option) any later version.
- rehash is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with rehash. If not, see <http://www.gnu.org/licenses/>. */
- #include <gnunet/gnunet_config.h>
- #include "rehash_dht.h"
- #include "extra_gnunet_protocols.h"
- struct GNUNET_DHT_PutHandle *
- REHASH_dht_put (struct GNUNET_DHT_Handle *handle,
- const struct GNUNET_HashCode *key,
- uint32_t desired_replication_level,
- enum GNUNET_DHT_RouteOption options,
- size_t size,
- const void *data,
- struct GNUNET_TIME_Absolute exp,
- GNUNET_SCHEDULER_TaskCallback cont,
- void *cont_cls)
- {
- return GNUNET_DHT_put (handle, key, desired_replication_level, options,
- GNUNET_BLOCK_TYPE_REHASH,
- size, data, exp, cont, cont_cls);
- }
- struct GNUNET_DHT_GetHandle *
- REHASH_dht_get_start (struct GNUNET_DHT_Handle *handle,
- const struct GNUNET_HashCode *key,
- uint32_t desired_replication_level,
- enum GNUNET_DHT_RouteOption options,
- GNUNET_DHT_GetIterator iter,
- void *iter_cls)
- {
- return GNUNET_DHT_get_start (handle,
- GNUNET_BLOCK_TYPE_REHASH,
- key, desired_replication_level, options,
- NULL, 0, iter, iter_cls);
- }
|