From 2925310d67483aca6e055e1ce0593c6463cd6c72 Mon Sep 17 00:00:00 2001 From: TheJackiMonster Date: Sun, 1 Nov 2020 22:57:28 +0100 Subject: -added core functionality of the messenger service Signed-off-by: TheJackiMonster formatting messenger code Signed-off-by: TheJackiMonster -completed core functionality of messenger service Signed-off-by: TheJackiMonster -code cleanup and reuse Signed-off-by: TheJackiMonster +added structure to memberships of rooms Signed-off-by: TheJackiMonster -implemented member permission checks and deletion of messages Signed-off-by: TheJackiMonster -moved solving requests out of updating last messages (also forward before update) Signed-off-by: TheJackiMonster -reduced complexity of permisson check and changed load/save of rooms Signed-off-by: TheJackiMonster -added save/load for accessed keys and basement peers of a room Signed-off-by: TheJackiMonster -implemented save/load for members with their history and session Signed-off-by: TheJackiMonster -abstracted management of egos and contacts Signed-off-by: TheJackiMonster -fix warning Signed-off-by: TheJackiMonster -abstracted management of members Signed-off-by: TheJackiMonster -fixed and adjusted test case Signed-off-by: TheJackiMonster -separated handling of direct and anonymous contacts Signed-off-by: TheJackiMonster -messenger added member-sessions which fix multiple edge cases, also additional cleanup Signed-off-by: TheJackiMonster -updated docs and fixed memory leak Signed-off-by: TheJackiMonster -changed info messages and added protocol version exchange Signed-off-by: TheJackiMonster -adjusted client api to use contacts from sessions Signed-off-by: TheJackiMonster -added more logging and fixed wrong session usage Signed-off-by: TheJackiMonster -adjusted comm0 test case and removed adding members from checking messages Signed-off-by: TheJackiMonster -fixed test-case for peer exchange Signed-off-by: TheJackiMonster -getting multiple peers connected in test-case with cadet Signed-off-by: TheJackiMonster -fixed wrong assert and added tunnel version check -simplified handling and forwarding Signed-off-by: TheJackiMonster -fixed merging last messages and cycling info messages Signed-off-by: TheJackiMonster -automated adding sessions and members Signed-off-by: TheJackiMonster -corrected use of identity keys and signatures Signed-off-by: TheJackiMonster -adding local joining on entering external room Signed-off-by: TheJackiMonster -fixed test-case comm0 Signed-off-by: TheJackiMonster -added more test-cases with generic setup Signed-off-by: TheJackiMonster -fixed multiple simultaneous channels blocking each other Signed-off-by: TheJackiMonster -making test-cases more precise Signed-off-by: TheJackiMonster -added check of members in test-cases, reduced merge messages Signed-off-by: TheJackiMonster -unified delayed operations: requests, deletions and merges Signed-off-by: TheJackiMonster -finished handling of operations Signed-off-by: TheJackiMonster -fixed member session historystorage, added request permission check and padding for transmission Signed-off-by: TheJackiMonster -improved padding and removed automatic recursive requests Signed-off-by: TheJackiMonster -implemented filter for sending messages and added private messages to API level Signed-off-by: TheJackiMonster -wrong setups fixed with proper ego lookups Signed-off-by: TheJackiMonster -fixed problem with anonymous ego and changed to discrete-level padding Signed-off-by: TheJackiMonster -added links to replace deleted messages, added local deletion and fixed anonymous id changing Signed-off-by: TheJackiMonster -added session completion and removal through completion process Signed-off-by: TheJackiMonster --- src/messenger/messenger_api_list_tunnels.h | 44 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'src/messenger/messenger_api_list_tunnels.h') diff --git a/src/messenger/messenger_api_list_tunnels.h b/src/messenger/messenger_api_list_tunnels.h index 0240fceb8..bd0a42e41 100644 --- a/src/messenger/messenger_api_list_tunnels.h +++ b/src/messenger/messenger_api_list_tunnels.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet. - Copyright (C) 2020 GNUnet e.V. + Copyright (C) 2020--2021 GNUnet e.V. GNUnet is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published @@ -47,7 +47,7 @@ struct GNUNET_MESSENGER_ListTunnels /** * Initializes list of tunnels peer identities as empty list. * - * @param tunnels List of peer identities + * @param[out] tunnels List of peer identities */ void init_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels); @@ -55,7 +55,7 @@ init_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels); /** * Clears the list of tunnels peer identities. * - * @param tunnels List of peer identities + * @param[in/out] tunnels List of peer identities */ void clear_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels); @@ -63,8 +63,8 @@ clear_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels); /** * Adds a specific peer from a tunnel to the end of the list. * - * @param tunnels List of peer identities - * @param peer Peer identity of tunnel + * @param[in/out] tunnels List of peer identities + * @param[in] peer Peer identity of tunnel */ void add_to_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct GNUNET_PeerIdentity *peer); @@ -79,8 +79,8 @@ add_to_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct * the found element in the list. If no matching element is found, index will * contain the total amount of elements in the list. * - * @param tunnels List of peer identities - * @param peer Peer identity of tunnel + * @param[in/out] tunnels List of peer identities + * @param[in] peer Peer identity of tunnel * @param[out] index Index of found element (optional) * @return Element in the list with matching peer identity */ @@ -89,11 +89,11 @@ find_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct GN /** * Tests linearly if the list of tunnels peer identities contains a specific - * peer identity and returns GNUNET_YES on success, otherwise GNUNET_NO. + * peer identity and returns #GNUNET_YES on success, otherwise #GNUNET_NO. * - * @param tunnels List of peer identities - * @param peer Peer identity of tunnel - * @return GNUNET_YES on success, otherwise GNUNET_NO + * @param[in/out] tunnels List of peer identities + * @param[in] peer Peer identity of tunnel + * @return #GNUNET_YES on success, otherwise #GNUNET_NO */ int contains_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct GNUNET_PeerIdentity *peer); @@ -102,11 +102,29 @@ contains_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struc * Removes a specific element from the list of tunnels peer identities and returns * the next element in the list. * - * @param tunnels List of peer identities - * @param element Element of the list + * @param[in/out] tunnels List of peer identities + * @param[in/out] element Element of the list * @return Next element in the list */ struct GNUNET_MESSENGER_ListTunnel* remove_from_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, struct GNUNET_MESSENGER_ListTunnel *element); +/** + * Loads the list of tunnels peer identities from a file under a given path. + * + * @param[out] messages List of hashes + * @param[in] path Path of file + */ +void +load_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const char *path); + +/** + * Saves the list of tunnels peer identities to a file under a given path. + * + * @param[in] messages List of hashes + * @param[in] path Path of file + */ +void +save_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const char *path); + #endif //GNUNET_MESSENGER_API_LIST_TUNNELS_H -- cgit v1.2.3