diff options
Diffstat (limited to 'src/service/messenger/gnunet-service-messenger_message_handle.h')
-rw-r--r-- | src/service/messenger/gnunet-service-messenger_message_handle.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/service/messenger/gnunet-service-messenger_message_handle.h b/src/service/messenger/gnunet-service-messenger_message_handle.h index 0a97cd840..228b129c7 100644 --- a/src/service/messenger/gnunet-service-messenger_message_handle.h +++ b/src/service/messenger/gnunet-service-messenger_message_handle.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2020--2021 GNUnet e.V. | 3 | Copyright (C) 2020--2023 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 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 | 6 | under the terms of the GNU Affero General Public License as published |
@@ -29,24 +29,23 @@ | |||
29 | #include "platform.h" | 29 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | 31 | ||
32 | #include "gnunet-service-messenger_message_kind.h" | 32 | #include "gnunet-service-messenger_sender_session.h" |
33 | |||
34 | #include "gnunet-service-messenger_member_session.h" | ||
35 | #include "gnunet-service-messenger_tunnel.h" | 33 | #include "gnunet-service-messenger_tunnel.h" |
36 | #include "messenger_api_message.h" | 34 | #include "messenger_api_message.h" |
35 | #include "messenger_api_message_kind.h" | ||
37 | 36 | ||
38 | /** | 37 | /** |
39 | * Handles a received or sent join message to make changes of current member information. | 38 | * Handles a received or sent join message to make changes of current member information. |
40 | * (add matching member and clear member info) | 39 | * (add matching member and clear member info) |
41 | * | 40 | * |
42 | * @param[in,out] room Room of the message | 41 | * @param[in,out] room Room of the message |
43 | * @param[in,out] session Member session | 42 | * @param[in,out] session Sender session |
44 | * @param[in] message JOIN-Message | 43 | * @param[in] message JOIN-Message |
45 | * @param[in] hash Hash of the message | 44 | * @param[in] hash Hash of the message |
46 | */ | 45 | */ |
47 | void | 46 | void |
48 | handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room, | 47 | handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room, |
49 | struct GNUNET_MESSENGER_MemberSession *session, | 48 | struct GNUNET_MESSENGER_SenderSession *session, |
50 | const struct GNUNET_MESSENGER_Message *message, | 49 | const struct GNUNET_MESSENGER_Message *message, |
51 | const struct GNUNET_HashCode *hash); | 50 | const struct GNUNET_HashCode *hash); |
52 | 51 | ||
@@ -55,13 +54,13 @@ handle_message_join (struct GNUNET_MESSENGER_SrvRoom *room, | |||
55 | * (remove matching member and clear member info) | 54 | * (remove matching member and clear member info) |
56 | * | 55 | * |
57 | * @param[in,out] room Room of the message | 56 | * @param[in,out] room Room of the message |
58 | * @param[in,out] session Member session | 57 | * @param[in,out] session Sender session |
59 | * @param[in] message LEAVE-Message | 58 | * @param[in] message LEAVE-Message |
60 | * @param[in] hash Hash of the message | 59 | * @param[in] hash Hash of the message |
61 | */ | 60 | */ |
62 | void | 61 | void |
63 | handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room, | 62 | handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room, |
64 | struct GNUNET_MESSENGER_MemberSession *session, | 63 | struct GNUNET_MESSENGER_SenderSession *session, |
65 | const struct GNUNET_MESSENGER_Message *message, | 64 | const struct GNUNET_MESSENGER_Message *message, |
66 | const struct GNUNET_HashCode *hash); | 65 | const struct GNUNET_HashCode *hash); |
67 | 66 | ||
@@ -70,13 +69,13 @@ handle_message_leave (struct GNUNET_MESSENGER_SrvRoom *room, | |||
70 | * (change name of matching member) | 69 | * (change name of matching member) |
71 | * | 70 | * |
72 | * @param[in,out] room Room of the message | 71 | * @param[in,out] room Room of the message |
73 | * @param[in,out] session Member session | 72 | * @param[in,out] session Sender session |
74 | * @param[in] message NAME-Message | 73 | * @param[in] message NAME-Message |
75 | * @param[in] hash Hash of the message | 74 | * @param[in] hash Hash of the message |
76 | */ | 75 | */ |
77 | void | 76 | void |
78 | handle_message_name (struct GNUNET_MESSENGER_SrvRoom *room, | 77 | handle_message_name (struct GNUNET_MESSENGER_SrvRoom *room, |
79 | struct GNUNET_MESSENGER_MemberSession *session, | 78 | struct GNUNET_MESSENGER_SenderSession *session, |
80 | const struct GNUNET_MESSENGER_Message *message, | 79 | const struct GNUNET_MESSENGER_Message *message, |
81 | const struct GNUNET_HashCode *hash); | 80 | const struct GNUNET_HashCode *hash); |
82 | 81 | ||
@@ -85,13 +84,13 @@ handle_message_name (struct GNUNET_MESSENGER_SrvRoom *room, | |||
85 | * (move the member in the contacts and change its key) | 84 | * (move the member in the contacts and change its key) |
86 | * | 85 | * |
87 | * @param[in,out] room Room of the message | 86 | * @param[in,out] room Room of the message |
88 | * @param[in,out] session Member session | 87 | * @param[in,out] session Sender session |
89 | * @param[in] message KEY-Message | 88 | * @param[in] message KEY-Message |
90 | * @param[in] hash Hash of the message | 89 | * @param[in] hash Hash of the message |
91 | */ | 90 | */ |
92 | void | 91 | void |
93 | handle_message_key (struct GNUNET_MESSENGER_SrvRoom *room, | 92 | handle_message_key (struct GNUNET_MESSENGER_SrvRoom *room, |
94 | struct GNUNET_MESSENGER_MemberSession *session, | 93 | struct GNUNET_MESSENGER_SenderSession *session, |
95 | const struct GNUNET_MESSENGER_Message *message, | 94 | const struct GNUNET_MESSENGER_Message *message, |
96 | const struct GNUNET_HashCode *hash); | 95 | const struct GNUNET_HashCode *hash); |
97 | 96 | ||
@@ -100,13 +99,13 @@ handle_message_key (struct GNUNET_MESSENGER_SrvRoom *room, | |||
100 | * (add a new peer to the basement and restructure connections based on updated list of peers) | 99 | * (add a new peer to the basement and restructure connections based on updated list of peers) |
101 | * | 100 | * |
102 | * @param[in,out] room Room of the message | 101 | * @param[in,out] room Room of the message |
103 | * @param[in,out] session Member session | 102 | * @param[in,out] session Sender session |
104 | * @param[in] message PEER-Message | 103 | * @param[in] message PEER-Message |
105 | * @param[in] hash Hash of the message | 104 | * @param[in] hash Hash of the message |
106 | */ | 105 | */ |
107 | void | 106 | void |
108 | handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, | 107 | handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, |
109 | struct GNUNET_MESSENGER_MemberSession *session, | 108 | struct GNUNET_MESSENGER_SenderSession *session, |
110 | const struct GNUNET_MESSENGER_Message *message, | 109 | const struct GNUNET_MESSENGER_Message *message, |
111 | const struct GNUNET_HashCode *hash); | 110 | const struct GNUNET_HashCode *hash); |
112 | 111 | ||
@@ -115,13 +114,13 @@ handle_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, | |||
115 | * (change id of matching member) | 114 | * (change id of matching member) |
116 | * | 115 | * |
117 | * @param[in,out] room Room of the message | 116 | * @param[in,out] room Room of the message |
118 | * @param[in,out] session Member session | 117 | * @param[in,out] session Sender session |
119 | * @param[in] message ID-Message | 118 | * @param[in] message ID-Message |
120 | * @param[in] hash Hash of the message | 119 | * @param[in] hash Hash of the message |
121 | */ | 120 | */ |
122 | void | 121 | void |
123 | handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room, | 122 | handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room, |
124 | struct GNUNET_MESSENGER_MemberSession *session, | 123 | struct GNUNET_MESSENGER_SenderSession *session, |
125 | const struct GNUNET_MESSENGER_Message *message, | 124 | const struct GNUNET_MESSENGER_Message *message, |
126 | const struct GNUNET_HashCode *hash); | 125 | const struct GNUNET_HashCode *hash); |
127 | 126 | ||
@@ -130,13 +129,13 @@ handle_message_id (struct GNUNET_MESSENGER_SrvRoom *room, | |||
130 | * (remove a peer from the basement and restructure connections based on updated list of peers) | 129 | * (remove a peer from the basement and restructure connections based on updated list of peers) |
131 | * | 130 | * |
132 | * @param[in,out] room Room of the message | 131 | * @param[in,out] room Room of the message |
133 | * @param[in,out] session Member session | 132 | * @param[in,out] session Sender session |
134 | * @param[in] message MISS-Message | 133 | * @param[in] message MISS-Message |
135 | * @param[in] hash Hash of the message | 134 | * @param[in] hash Hash of the message |
136 | */ | 135 | */ |
137 | void | 136 | void |
138 | handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, | 137 | handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, |
139 | struct GNUNET_MESSENGER_MemberSession *session, | 138 | struct GNUNET_MESSENGER_SenderSession *session, |
140 | const struct GNUNET_MESSENGER_Message *message, | 139 | const struct GNUNET_MESSENGER_Message *message, |
141 | const struct GNUNET_HashCode *hash); | 140 | const struct GNUNET_HashCode *hash); |
142 | 141 | ||
@@ -145,13 +144,13 @@ handle_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, | |||
145 | * (remove a message from the store of a room under a given delay) | 144 | * (remove a message from the store of a room under a given delay) |
146 | * | 145 | * |
147 | * @param[in,out] room Room of the message | 146 | * @param[in,out] room Room of the message |
148 | * @param[in,out] session Member session | 147 | * @param[in,out] session Sender session |
149 | * @param[in] message DELETE-Message | 148 | * @param[in] message DELETE-Message |
150 | * @param[in] hash Hash of the message | 149 | * @param[in] hash Hash of the message |
151 | */ | 150 | */ |
152 | void | 151 | void |
153 | handle_message_delete (struct GNUNET_MESSENGER_SrvRoom *room, | 152 | handle_message_delete (struct GNUNET_MESSENGER_SrvRoom *room, |
154 | struct GNUNET_MESSENGER_MemberSession *session, | 153 | struct GNUNET_MESSENGER_SenderSession *session, |
155 | const struct GNUNET_MESSENGER_Message *message, | 154 | const struct GNUNET_MESSENGER_Message *message, |
156 | const struct GNUNET_HashCode *hash); | 155 | const struct GNUNET_HashCode *hash); |
157 | 156 | ||