aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_message_handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_handle.h')
-rw-r--r--src/messenger/gnunet-service-messenger_message_handle.h158
1 files changed, 0 insertions, 158 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_handle.h b/src/messenger/gnunet-service-messenger_message_handle.h
deleted file mode 100644
index 0e5be3408..000000000
--- a/src/messenger/gnunet-service-messenger_message_handle.h
+++ /dev/null
@@ -1,158 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2020--2021 GNUnet e.V.
4
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your 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 Affero General Public License for more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19 */
20/**
21 * @author Tobias Frisch
22 * @file src/messenger/gnunet-service-messenger_message_handle.h
23 * @brief GNUnet MESSENGER service
24 */
25
26#ifndef GNUNET_SERVICE_MESSENGER_MESSAGE_HANDLE_H
27#define GNUNET_SERVICE_MESSENGER_MESSAGE_HANDLE_H
28
29#include "platform.h"
30#include "gnunet_crypto_lib.h"
31
32#include "gnunet-service-messenger_message_kind.h"
33
34#include "gnunet-service-messenger_member_session.h"
35#include "gnunet-service-messenger_tunnel.h"
36#include "messenger_api_message.h"
37
38/**
39 * Handles a received or sent join message to make changes of current member information.
40 * (add matching member and clear member info)
41 *
42 * @param[in/out] room Room of the message
43 * @param[in/out] session Member session
44 * @param[in] message JOIN-Message
45 * @param[in] hash Hash of the message
46 */
47void
48handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room,
49 struct GNUNET_MESSENGER_MemberSession *session,
50 const struct GNUNET_MESSENGER_Message *message,
51 const struct GNUNET_HashCode *hash);
52
53/**
54 * Handles a received or sent leave message to make changes of current member information.
55 * (remove matching member and clear member info)
56 *
57 * @param[in/out] room Room of the message
58 * @param[in/out] session Member session
59 * @param[in] message LEAVE-Message
60 * @param[in] hash Hash of the message
61 */
62void
63handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room,
64 struct GNUNET_MESSENGER_MemberSession *session,
65 const struct GNUNET_MESSENGER_Message *message,
66 const struct GNUNET_HashCode *hash);
67
68/**
69 * Handles a received or sent name message to rename a current member.
70 * (change name of matching member)
71 *
72 * @param[in/out] room Room of the message
73 * @param[in/out] session Member session
74 * @param[in] message NAME-Message
75 * @param[in] hash Hash of the message
76 */
77void
78handle_message_name (struct GNUNET_MESSENGER_SrvRoom *room,
79 struct GNUNET_MESSENGER_MemberSession *session,
80 const struct GNUNET_MESSENGER_Message *message,
81 const struct GNUNET_HashCode *hash);
82
83/**
84 * Handles a received or sent key message to change the key of a member and rearrange the contacts accordingly.
85 * (move the member in the contacts and change its key)
86 *
87 * @param[in/out] room Room of the message
88 * @param[in/out] session Member session
89 * @param[in] message KEY-Message
90 * @param[in] hash Hash of the message
91 */
92void
93handle_message_key (struct GNUNET_MESSENGER_SrvRoom *room,
94 struct GNUNET_MESSENGER_MemberSession *session,
95 const struct GNUNET_MESSENGER_Message *message,
96 const struct GNUNET_HashCode *hash);
97
98/**
99 * Handles a received or sent peer message to make changes of the basement in the room.
100 * (add a new peer to the basement and restructure connections based on updated list of peers)
101 *
102 * @param[in/out] room Room of the message
103 * @param[in/out] session Member session
104 * @param[in] message PEER-Message
105 * @param[in] hash Hash of the message
106 */
107void
108handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room,
109 struct GNUNET_MESSENGER_MemberSession *session,
110 const struct GNUNET_MESSENGER_Message *message,
111 const struct GNUNET_HashCode *hash);
112
113/**
114 * Handles a received or sent id message to change a members id.
115 * (change id of matching member)
116 *
117 * @param[in/out] room Room of the message
118 * @param[in/out] session Member session
119 * @param[in] message ID-Message
120 * @param[in] hash Hash of the message
121 */
122void
123handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room,
124 struct GNUNET_MESSENGER_MemberSession *session,
125 const struct GNUNET_MESSENGER_Message *message,
126 const struct GNUNET_HashCode *hash);
127
128/**
129 * Handles a received or sent miss message to drop a peer from the basement in the room.
130 * (remove a peer from the basement and restructure connections based on updated list of peers)
131 *
132 * @param[in/out] room Room of the message
133 * @param[in/out] session Member session
134 * @param[in] message MISS-Message
135 * @param[in] hash Hash of the message
136 */
137void
138handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room,
139 struct GNUNET_MESSENGER_MemberSession *session,
140 const struct GNUNET_MESSENGER_Message *message,
141 const struct GNUNET_HashCode *hash);
142
143/**
144 * Handles a received or sent delete message to delete a specific message from the store.
145 * (remove a message from the store of a room under a given delay)
146 *
147 * @param[in/out] room Room of the message
148 * @param[in/out] session Member session
149 * @param[in] message DELETE-Message
150 * @param[in] hash Hash of the message
151 */
152void
153handle_message_delete (struct GNUNET_MESSENGER_SrvRoom *room,
154 struct GNUNET_MESSENGER_MemberSession *session,
155 const struct GNUNET_MESSENGER_Message *message,
156 const struct GNUNET_HashCode *hash);
157
158#endif //GNUNET_SERVICE_MESSENGER_MESSAGE_HANDLE_H