-not sure I see how this test can work, disabling for now
[oweals/gnunet.git] / src / gns / gnunet-service-gns_shorten.h
1 /*
2      This file is part of GNUnet.
3      (C) 2009-2013 Christian Grothoff (and other contributing authors)
4
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.
9
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.
14
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.
19 */
20 /**
21  * @file gns/gnunet-service-gns_shorten.h
22  * @brief GNUnet GNS shortening API
23  * @author Martin Schanzenbach
24  */
25 #ifndef GNS_SHORTEN_H
26 #define GNS_SHORTEN_H
27 #include "gns.h"
28 #include "gnunet_dht_service.h"
29 #include "gnunet_namestore_service.h"
30
31
32 /**
33  * Initialize the shorten subsystem.
34  * MUST be called before #GNS_shorten_start.
35  *
36  * @param nh handle to the namestore
37  * @param dht handle to the dht
38  */
39 void
40 GNS_shorten_init (struct GNUNET_NAMESTORE_Handle *nh,
41                   struct GNUNET_DHT_Handle *dht);
42
43
44 /**
45  * Cleanup shorten: Terminate pending lookups
46  */
47 void
48 GNS_shorten_done (void);
49
50
51 /**
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.
55  *
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
59  */
60 void
61 GNS_shorten_start (const char *original_label,
62                    const struct GNUNET_CRYPTO_EccPublicSignKey *pub,
63                    const struct GNUNET_CRYPTO_EccPrivateKey *shorten_zone);
64
65
66 #endif