2 This file is part of GNUnet.
3 (C) 2009-2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file gns/gnunet-service-gns_shorten.h
22 * @brief GNUnet GNS shortening API
23 * @author Martin Schanzenbach
28 #include "gnunet_dht_service.h"
29 #include "gnunet_namestore_service.h"
33 * Initialize the shorten subsystem.
34 * MUST be called before #GNS_shorten_start.
36 * @param nh handle to the namestore
37 * @param dht handle to the dht
40 GNS_shorten_init (struct GNUNET_NAMESTORE_Handle *nh,
41 struct GNUNET_DHT_Handle *dht);
45 * Cleanup shorten: Terminate pending lookups
48 GNS_shorten_done (void);
52 * Start shortening algorithm, try to allocate a nice short
53 * canonical name for @a pub in @a shorten_zone, using
54 * @a original_label as one possible suggestion.
56 * @param original_label original label for the zone
57 * @param pub public key of the zone to shorten
58 * @param shorten_zone private key of the target zone for the new record
61 GNS_shorten_start (const char *original_label,
62 const struct GNUNET_CRYPTO_EccPublicSignKey *pub,
63 const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone);