diff options
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_send.h')
-rw-r--r-- | src/messenger/gnunet-service-messenger_message_send.h | 121 |
1 files changed, 21 insertions, 100 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_send.h b/src/messenger/gnunet-service-messenger_message_send.h index c1096205a..8e3ff4495 100644 --- a/src/messenger/gnunet-service-messenger_message_send.h +++ b/src/messenger/gnunet-service-messenger_message_send.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 GNUnet e.V. | 3 | Copyright (C) 2020--2021 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,127 +29,48 @@ | |||
29 | #include "platform.h" | 29 | #include "platform.h" |
30 | #include "gnunet_crypto_lib.h" | 30 | #include "gnunet_crypto_lib.h" |
31 | 31 | ||
32 | #include "gnunet-service-messenger_message_kind.h" | ||
33 | |||
32 | #include "gnunet-service-messenger_tunnel.h" | 34 | #include "gnunet-service-messenger_tunnel.h" |
33 | #include "messenger_api_message.h" | 35 | #include "messenger_api_message.h" |
34 | 36 | ||
35 | /** | 37 | /** |
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. | 38 | * 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) | 39 | * (if the service provides a peer message for this room currently, it will be forwarded) |
53 | * | 40 | * |
54 | * @param room Room of the message | 41 | * @param[in/out] room Room of the message |
55 | * @param handle Sending handle | 42 | * @param[in/out] handle Sending handle |
56 | * @param tunnel Sending connection (may be NULL) | 43 | * @param[in] message JOIN-Message |
57 | * @param message JOIN-Message | 44 | * @param[in] hash Hash of the message |
58 | * @param hash Hash of the message | ||
59 | */ | 45 | */ |
60 | void | 46 | void |
61 | send_message_join (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 47 | send_message_join (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, |
62 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | 48 | const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); |
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 | 49 | ||
110 | /** | 50 | /** |
111 | * Handles a sent peer message to update the rooms peer message of this service. | 51 | * 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) | 52 | * (a set peer message indicates this service being a part of the decentralized room structure) |
113 | * | 53 | * |
114 | * @param room Room of the message | 54 | * @param[in/out] room Room of the message |
115 | * @param handle Sending handle | 55 | * @param[in/out] handle Sending handle |
116 | * @param tunnel Sending connection (may be NULL) | 56 | * @param[in] message PEER-Message |
117 | * @param message PEER-Message | 57 | * @param[in] hash Hash of the message |
118 | * @param hash Hash of the message | ||
119 | */ | 58 | */ |
120 | void | 59 | void |
121 | send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 60 | send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, |
122 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | 61 | const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); |
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 | 62 | ||
140 | /** | 63 | /** |
141 | * Handles a sent miss message. | 64 | * Handles a sent request message to trigger the request operation for this service. |
142 | * @see handle_message_miss() | 65 | * (the request operation will deactivate the possibility of spamming requests) |
143 | * | 66 | * |
144 | * @param room Room of the message | 67 | * @param[in/out] room Room of the message |
145 | * @param handle Sending handle | 68 | * @param[in/out] handle Sending handle |
146 | * @param tunnel Sending connection (may be NULL) | 69 | * @param[in] message PEER-Message |
147 | * @param message MISS-Message | 70 | * @param[in] hash Hash of the message |
148 | * @param hash Hash of the message | ||
149 | */ | 71 | */ |
150 | void | 72 | void |
151 | send_message_miss (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, | 73 | send_message_request (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, |
152 | struct GNUNET_MESSENGER_SrvTunnel *tunnel, struct GNUNET_MESSENGER_Message *message, | 74 | const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); |
153 | const struct GNUNET_HashCode *hash); | ||
154 | 75 | ||
155 | #endif //GNUNET_SERVICE_MESSENGER_MESSAGE_SEND_H | 76 | #endif //GNUNET_SERVICE_MESSENGER_MESSAGE_SEND_H |