diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-12 20:58:07 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2020-11-12 20:58:07 +0100 |
commit | ca912f85dae6b61dd80ab02d0e3f0b20a556da7c (patch) | |
tree | 788ebaf2ce0870bad875a7d910b6cd1b536a99c7 /src/messenger/gnunet-service-messenger_message_send.h | |
parent | 5bdfe2001fbc68b06293b79dd6426156719d33c0 (diff) | |
download | gnunet-ca912f85dae6b61dd80ab02d0e3f0b20a556da7c.tar.gz gnunet-ca912f85dae6b61dd80ab02d0e3f0b20a556da7c.zip |
-remerge branch 'jacki/messenger'
This reverts commit e11d1e59e4ae5f7d89c33df3ae9ca8f1ece990cf.
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_send.h')
-rw-r--r-- | src/messenger/gnunet-service-messenger_message_send.h | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_send.h b/src/messenger/gnunet-service-messenger_message_send.h new file mode 100644 index 000000000..c1096205a --- /dev/null +++ b/src/messenger/gnunet-service-messenger_message_send.h | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2020 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_send.h | ||
23 | * @brief GNUnet MESSENGER service | ||
24 | */ | ||
25 | |||
26 | #ifndef GNUNET_SERVICE_MESSENGER_MESSAGE_SEND_H | ||
27 | #define GNUNET_SERVICE_MESSENGER_MESSAGE_SEND_H | ||
28 | |||
29 | #include "platform.h" | ||
30 | #include "gnunet_crypto_lib.h" | ||
31 | |||
32 | #include "gnunet-service-messenger_tunnel.h" | ||
33 | #include "messenger_api_message.h" | ||
34 | |||
35 | /** | ||
36 | * Handles a sent info message to setup a tunnels linked member id. | ||
37 | * (if a tunnel has already got a member id linked to it, the connection will be closed) | ||
38 | * | ||
39 | * @param room Room of the message | ||
40 | * @param handle Sending handle | ||
41 | * @param tunnel Sending connection (may be NULL) | ||
42 | * @param message INFO-Message | ||
43 | * @param hash Hash of the message | ||
44 | */ | ||
45 | void | ||
46 | send_message_info (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
47 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
48 | const struct GNUNET_HashCode *hash); | ||
49 | |||
50 | /** | ||
51 | * Handles a sent join message to ensure growth of the decentralized room structure. | ||
52 | * (if the service provides a peer message for this room currently, it will be forwarded) | ||
53 | * | ||
54 | * @param room Room of the message | ||
55 | * @param handle Sending handle | ||
56 | * @param tunnel Sending connection (may be NULL) | ||
57 | * @param message JOIN-Message | ||
58 | * @param hash Hash of the message | ||
59 | */ | ||
60 | void | ||
61 | send_message_join (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
62 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
63 | const struct GNUNET_HashCode *hash); | ||
64 | |||
65 | /** | ||
66 | * Handles a sent leave message. | ||
67 | * @see handle_message_leave() | ||
68 | * | ||
69 | * @param room Room of the message | ||
70 | * @param handle Sending handle | ||
71 | * @param tunnel Sending connection (may be NULL) | ||
72 | * @param message LEAVE-Message | ||
73 | * @param hash Hash of the message | ||
74 | */ | ||
75 | void | ||
76 | send_message_leave (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
77 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
78 | const struct GNUNET_HashCode *hash); | ||
79 | |||
80 | /** | ||
81 | * Handles a sent name message. | ||
82 | * @see handle_message_name() | ||
83 | * | ||
84 | * @param room Room of the message | ||
85 | * @param handle Sending handle | ||
86 | * @param tunnel Sending connection (may be NULL) | ||
87 | * @param message NAME-Message | ||
88 | * @param hash Hash of the message | ||
89 | */ | ||
90 | void | ||
91 | send_message_name (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
92 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
93 | const struct GNUNET_HashCode *hash); | ||
94 | |||
95 | /** | ||
96 | * Handles a sent key message. | ||
97 | * @see handle_message_key() | ||
98 | * | ||
99 | * @param room Room of the message | ||
100 | * @param handle Sending handle | ||
101 | * @param tunnel Sending connection (may be NULL) | ||
102 | * @param message KEY-Message | ||
103 | * @param hash Hash of the message | ||
104 | */ | ||
105 | void | ||
106 | send_message_key (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
107 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
108 | const struct GNUNET_HashCode *hash); | ||
109 | |||
110 | /** | ||
111 | * Handles a sent peer message to update the rooms peer message of this service. | ||
112 | * (a set peer message indicates this service being a part of the decentralized room structure) | ||
113 | * | ||
114 | * @param room Room of the message | ||
115 | * @param handle Sending handle | ||
116 | * @param tunnel Sending connection (may be NULL) | ||
117 | * @param message PEER-Message | ||
118 | * @param hash Hash of the message | ||
119 | */ | ||
120 | void | ||
121 | send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
122 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
123 | const struct GNUNET_HashCode *hash); | ||
124 | |||
125 | /** | ||
126 | * Handles a sent id message. | ||
127 | * @see handle_message_id() | ||
128 | * | ||
129 | * @param room Room of the message | ||
130 | * @param handle Sending handle | ||
131 | * @param tunnel Sending connection (may be NULL) | ||
132 | * @param message ID-Message | ||
133 | * @param hash Hash of the message | ||
134 | */ | ||
135 | void | ||
136 | send_message_id (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
137 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
138 | const struct GNUNET_HashCode *hash); | ||
139 | |||
140 | /** | ||
141 | * Handles a sent miss message. | ||
142 | * @see handle_message_miss() | ||
143 | * | ||
144 | * @param room Room of the message | ||
145 | * @param handle Sending handle | ||
146 | * @param tunnel Sending connection (may be NULL) | ||
147 | * @param message MISS-Message | ||
148 | * @param hash Hash of the message | ||
149 | */ | ||
150 | void | ||
151 | send_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | ||
152 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | ||
153 | const struct GNUNET_HashCode *hash); | ||
154 | |||
155 | #endif //GNUNET_SERVICE_MESSENGER_MESSAGE_SEND_H | ||