aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_message_send.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2023-10-19 12:53:29 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2023-10-19 12:53:29 +0200
commit7ef64b65a42cdb65ef2e36649ff84fcf4bb00c66 (patch)
tree975a7cebf0ed685ab776152db1be67d01171c6e5 /src/messenger/gnunet-service-messenger_message_send.c
parent39e327905f421c470b9cbd5c1ea548261bcae026 (diff)
downloadgnunet-7ef64b65a42cdb65ef2e36649ff84fcf4bb00c66.tar.gz
gnunet-7ef64b65a42cdb65ef2e36649ff84fcf4bb00c66.zip
BUILD: Move messenger to service
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_send.c')
-rw-r--r--src/messenger/gnunet-service-messenger_message_send.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_send.c b/src/messenger/gnunet-service-messenger_message_send.c
deleted file mode 100644
index 09039758b..000000000
--- a/src/messenger/gnunet-service-messenger_message_send.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2020--2022 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.c
23 * @brief GNUnet MESSENGER service
24 */
25
26#include "platform.h"
27#include "gnunet-service-messenger_message_send.h"
28
29#include "gnunet-service-messenger_member.h"
30#include "gnunet-service-messenger_member_session.h"
31#include "gnunet-service-messenger_operation.h"
32
33void
34send_message_join (struct GNUNET_MESSENGER_SrvRoom *room,
35 struct GNUNET_MESSENGER_SrvHandle *handle,
36 const struct GNUNET_MESSENGER_Message *message,
37 const struct GNUNET_HashCode *hash)
38{
39 check_srv_room_peer_status(room, NULL);
40}
41
42void
43send_message_peer (struct GNUNET_MESSENGER_SrvRoom *room,
44 struct GNUNET_MESSENGER_SrvHandle *handle,
45 const struct GNUNET_MESSENGER_Message *message,
46 const struct GNUNET_HashCode *hash)
47{
48 if (!room->peer_message)
49 room->peer_message = GNUNET_new(struct GNUNET_HashCode);
50
51 GNUNET_memcpy(room->peer_message, hash, sizeof(struct GNUNET_HashCode));
52}
53
54void
55send_message_id (struct GNUNET_MESSENGER_SrvRoom *room,
56 struct GNUNET_MESSENGER_SrvHandle *handle,
57 const struct GNUNET_MESSENGER_Message *message,
58 const struct GNUNET_HashCode *hash)
59{
60 change_srv_handle_member_id (handle, get_srv_room_key(room), &(message->body.id.id));
61}
62
63void
64send_message_request (struct GNUNET_MESSENGER_SrvRoom *room,
65 struct GNUNET_MESSENGER_SrvHandle *handle,
66 const struct GNUNET_MESSENGER_Message *message,
67 const struct GNUNET_HashCode *hash)
68{
69 struct GNUNET_MESSENGER_OperationStore *operation_store = get_srv_room_operation_store(room);
70
71 use_store_operation(
72 operation_store,
73 &(message->body.request.hash),
74 GNUNET_MESSENGER_OP_REQUEST,
75 GNUNET_MESSENGER_REQUEST_DELAY
76 );
77}