/*
This file is part of GNUnet.
- (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010, 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010, 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
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.
*/
/**
- * @file include/gnunet_hello_lib.h
- * @brief helper library for handling HELLOs
* @author Christian Grothoff
+ * @file
+ * Helper library for handling HELLOs
+ *
+ * @defgroup hello Hello library
+ * Helper library for handling HELLOs
+ *
+ * @see [Documentation](https://gnunet.org/gnunets-hostlist-subsystem)
+ *
+ * @{
*/
#ifndef GNUNET_HELLO_LIB_H
*/
#define GNUNET_FRIEND_HELLO_URI_PREFIX "gnunet://friend-hello/"
+/**
+ * Separator used in HELLO URI
+ */
+#define GNUNET_HELLO_URI_SEP '+'
+
/**
* Additional local information about an address
* Return HELLO type
*
* @param h HELLO Message to test
- * @return #GNUNET_YES or #GNUNET_NO
+ * @return #GNUNET_YES for friend-only or #GNUNET_NO otherwise
*/
int
GNUNET_HELLO_is_friend_only (const struct GNUNET_HELLO_Message *h);
* If friend only is set to #GNUNET_YES we create a FRIEND_HELLO which
* will not be gossiped to other peers.
*
- * @param publicKey public key to include in the HELLO
+ * @param public_key public key to include in the HELLO
* @param addrgen callback to invoke to get addresses
* @param addrgen_cls closure for @a addrgen
* @param friend_only should the returned HELLO be only visible to friends?
* @return the hello message
*/
struct GNUNET_HELLO_Message *
-GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *publicKey,
+GNUNET_HELLO_create (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
GNUNET_HELLO_GenerateAddressListCallback addrgen,
void *addrgen_cls,
int friend_only);
/**
- * Iterate over addresses in "new_hello" that
- * are NOT already present in "old_hello".
+ * Iterate over addresses in @a new_hello that are NOT already present
+ * in @a old_hello. Note that if the address is present in @a old_hello
+ * but the expiration time in @a new_hello is more recent, the
+ * iterator is also called.
*
* @param new_hello a HELLO message
* @param old_hello a HELLO message
void *it_cls);
-/**
- * Get the public key from a HELLO message.
- *
- * @param hello the hello message
- * @param publicKey where to copy the public key information, can be NULL
- * @return #GNUNET_SYSERR if the HELLO was malformed
- */
-int
-GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
- struct GNUNET_CRYPTO_EddsaPublicKey *publicKey);
-
-
/**
* Get the peer identity from a HELLO message.
*
GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello);
+/**
+ * Helper function to load/access transport plugins.
+ * FIXME: pass closure!
+ *
+ * @param name name of the transport plugin to load
+ * @return NULL if a plugin with name @a name is not known/loadable
+ */
typedef struct GNUNET_TRANSPORT_PluginFunctions *
(*GNUNET_HELLO_TransportPluginsFind) (const char *name);
struct GNUNET_HELLO_Message **hello,
GNUNET_HELLO_TransportPluginsFind plugins_find);
+
#if 0 /* keep Emacsens' auto-indent happy */
{
#endif
}
#endif
-
/* ifndef GNUNET_HELLO_LIB_H */
#endif
+
+/** @} */ /* end of group */
+
/* end of gnunet_hello_lib.h */