-remove GNUNET_MQ_impl_send_commit, make it part of send_continue, to ensure calling...
[oweals/gnunet.git] / src / include / gnunet_peer_lib.h
index da364dd449d552390730d6161bc552d8229ca998..fbe13e2cf7f8ff5f352fcc19f54d9fba34445b81 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet 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 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -53,7 +53,8 @@ typedef unsigned int GNUNET_PEER_Id;
  * @param pid identity to find
  * @return the interned identity or 0.
  */
-GNUNET_PEER_Id GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -63,7 +64,8 @@ GNUNET_PEER_Id GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
  * @param pid identity to intern
  * @return the interned identity.
  */
-GNUNET_PEER_Id GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -72,16 +74,18 @@ GNUNET_PEER_Id GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
  * @param id identity to change the RC of
  * @param delta how much to change the RC
  */
-void GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
+void
+GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
 
 
 /**
  * Decrement multiple RCs of peer identities by one.
- * 
+ *
  * @param ids array of PIDs to decrement the RCs of
  * @param count size of the ids array
  */
-void GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
+void
+GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
 
 
 /**
@@ -90,7 +94,26 @@ void GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
  * @param id interned PID to convert
  * @param pid where to write the normal peer identity
  */
-void GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
+void
+GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
+
+
+/**
+ * Convert an interned PID to a normal peer identity.
+ *
+ * @param id interned PID to convert
+ * @return pointer to peer identity, valid as long 'id' is valid
+ */
+const struct GNUNET_PeerIdentity *
+GNUNET_PEER_resolve2 (GNUNET_PEER_Id id);
+
+
+#if 0                           /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
 
 
 /* ifndef GNUNET_PEER_LIB_H */