gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: -added function to get the key of a room


From: gnunet
Subject: [gnunet] branch master updated: -added function to get the key of a room
Date: Sun, 27 Jun 2021 22:21:29 +0200

This is an automated email from the git hooks/post-receive script.

thejackimonster pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 464a3abae -added function to get the key of a room
464a3abae is described below

commit 464a3abaef4fd7e11c5c535c2a719a33eccb5ae9
Author: TheJackiMonster <thejackimonster@gmail.com>
AuthorDate: Sun Jun 27 22:18:12 2021 +0200

    -added function to get the key of a room
    
    Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
---
 src/include/gnunet_messenger_service.h | 13 +++++++++++--
 src/messenger/messenger_api.c          |  9 +++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/include/gnunet_messenger_service.h 
b/src/include/gnunet_messenger_service.h
index 4567a63a4..81bc3aa12 100644
--- a/src/include/gnunet_messenger_service.h
+++ b/src/include/gnunet_messenger_service.h
@@ -666,8 +666,8 @@ GNUNET_MESSENGER_enter_room (struct GNUNET_MESSENGER_Handle 
*handle, const struc
                              const struct GNUNET_HashCode *key);
 
 /**
- * Close a room which was entered, opened or both in various order and 
variety. Closing a room will destroy all connections
- * from your peer to another and the other way around.
+ * Close a <i>room</i> which was entered, opened or both in various order and 
variety. Closing a room will destroy all
+ * connections from your peer to another and the other way around.
  *
  * ( After a member closes a <b>door</b>, all members entered through that 
specific <b>door</b> have to use another one
  * or open the room on their own. )
@@ -692,6 +692,15 @@ int
 GNUNET_MESSENGER_find_rooms (const struct GNUNET_MESSENGER_Handle *handle, 
const struct GNUNET_MESSENGER_Contact *contact,
                              GNUNET_MESSENGER_MemberCallback callback, void 
*cls);
 
+/**
+ * Get the key of a given <i>room</i>.
+ *
+ * @param[in] room Room handle
+ * @return Hash identifying the port or NULL on failure
+ */
+const struct GNUNET_HashCode*
+GNUNET_MESSENGER_room_get_key (const struct GNUNET_MESSENGER_Room *room);
+
 /**
  * Get the contact of a member in a <i>room</i> which sent a specific message 
identified with a given <i>hash</i>.
  *
diff --git a/src/messenger/messenger_api.c b/src/messenger/messenger_api.c
index 1eedbd31b..f7c73f769 100644
--- a/src/messenger/messenger_api.c
+++ b/src/messenger/messenger_api.c
@@ -618,6 +618,15 @@ GNUNET_MESSENGER_find_rooms (const struct 
GNUNET_MESSENGER_Handle *handle, const
   return GNUNET_CONTAINER_multihashmap_iterate(handle->rooms, 
iterate_find_room, &find);
 }
 
+const struct GNUNET_HashCode*
+GNUNET_MESSENGER_room_get_key (const struct GNUNET_MESSENGER_Room *room)
+{
+  if (!room)
+    return NULL;
+
+  return &(room->key);
+}
+
 const struct GNUNET_MESSENGER_Contact*
 GNUNET_MESSENGER_get_sender (const struct GNUNET_MESSENGER_Room *room, const 
struct GNUNET_HashCode *hash)
 {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]