aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_message_kind.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_kind.h')
-rw-r--r--src/messenger/gnunet-service-messenger_message_kind.h105
1 files changed, 6 insertions, 99 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_kind.h b/src/messenger/gnunet-service-messenger_message_kind.h
index 102a70e33..2e13e7710 100644
--- a/src/messenger/gnunet-service-messenger_message_kind.h
+++ b/src/messenger/gnunet-service-messenger_message_kind.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
@@ -36,73 +36,24 @@
36#include "messenger_api_ego.h" 36#include "messenger_api_ego.h"
37 37
38/** 38/**
39 * Creates and allocates a new info message containing the hosts EGO public key and a newly generated unique member id. 39 * Creates and allocates a new info message containing the hosts service peer identity and version.
40 * (all values are stored as copy) 40 * (all values are stored as copy)
41 * 41 *
42 * @param[in] ego EGO of the host 42 * @param[in,out] service Service
43 * @param[in] members Map of all assigned member ids
44 * @return New message 43 * @return New message
45 */ 44 */
46struct GNUNET_MESSENGER_Message* 45struct GNUNET_MESSENGER_Message*
47create_message_info (const struct GNUNET_MESSENGER_Ego *ego); 46create_message_info (struct GNUNET_MESSENGER_Service *service);
48
49/**
50 * Creates and allocates a new join message containing the clients EGO public key.
51 * (all values are stored as copy)
52 *
53 * @param[in] ego EGO of the client
54 * @return New message
55 */
56struct GNUNET_MESSENGER_Message*
57create_message_join (const struct GNUNET_MESSENGER_Ego *ego);
58
59/**
60 * Creates and allocates a new leave message.
61 *
62 * @return New message
63 */
64struct GNUNET_MESSENGER_Message*
65create_message_leave ();
66
67/**
68 * Creates and allocates a new name message containing the <i>name</i> to change to.
69 * (all values are stored as copy)
70 *
71 * @param[in] name New name
72 * @return New message
73 */
74struct GNUNET_MESSENGER_Message*
75create_message_name (const char *name);
76
77/**
78 * Creates and allocates a new key message containing the public <i>key</i> to change to derived
79 * from its private counterpart. (all values are stored as copy)
80 *
81 * @param[in] key Private key of EGO
82 * @return New message
83 */
84struct GNUNET_MESSENGER_Message*
85create_message_key (const struct GNUNET_IDENTITY_PrivateKey *key);
86 47
87/** 48/**
88 * Creates and allocates a new peer message containing a services peer identity. 49 * Creates and allocates a new peer message containing a services peer identity.
89 * (all values are stored as copy) 50 * (all values are stored as copy)
90 * 51 *
91 * @param[in] service Service 52 * @param[in,out] service Service
92 * @return New message
93 */
94struct GNUNET_MESSENGER_Message*
95create_message_peer (const struct GNUNET_MESSENGER_Service *service);
96
97/**
98 * Creates and allocates a new id message containing the unique member id to change to.
99 * (all values are stored as copy)
100 *
101 * @param[in] unique_id Unique member id
102 * @return New message 53 * @return New message
103 */ 54 */
104struct GNUNET_MESSENGER_Message* 55struct GNUNET_MESSENGER_Message*
105create_message_id (const struct GNUNET_ShortHashCode *unique_id); 56create_message_peer (struct GNUNET_MESSENGER_Service *service);
106 57
107/** 58/**
108 * Creates and allocates a new miss message containing the missing <i>peer</i> identity. 59 * Creates and allocates a new miss message containing the missing <i>peer</i> identity.
@@ -125,49 +76,5 @@ create_message_miss (const struct GNUNET_PeerIdentity *peer);
125struct GNUNET_MESSENGER_Message* 76struct GNUNET_MESSENGER_Message*
126create_message_merge (const struct GNUNET_HashCode *previous); 77create_message_merge (const struct GNUNET_HashCode *previous);
127 78
128/**
129 * Creates and allocates a new request message containing the <i>hash</i> of a missing message.
130 * (all values are stored as copy)
131 *
132 * @param[in] hash Hash of message
133 * @return New message
134 */
135struct GNUNET_MESSENGER_Message*
136create_message_request (const struct GNUNET_HashCode *hash);
137
138/**
139 * Creates and allocates a new invite message containing the peer identity of an entrance peer
140 * to a room using a given <i>key</i> as shared secret for communication.
141 * (all values are stored as copy)
142 *
143 * @param[in] door Peer identity
144 * @param[in] key Shared secret of a room
145 * @return New message
146 */
147struct GNUNET_MESSENGER_Message*
148create_message_invite (const struct GNUNET_PeerIdentity *door,
149 const struct GNUNET_HashCode *key);
150
151/**
152 * Creates and allocates a new <i>text</i> message containing a string representing text.
153 * (all values are stored as copy)
154 *
155 * @param[in] text Text
156 * @return New message
157 */
158struct GNUNET_MESSENGER_Message*
159create_message_text (const char *text);
160
161/**
162 * Creates and allocates a new delete message containing the <i>hash</i> of a message to delete after a specific <i>delay</i>.
163 * (all values are stored as copy)
164 *
165 * @param[in] hash Hash of message
166 * @param[in] delay Delay of deletion
167 * @return New message
168 */
169struct GNUNET_MESSENGER_Message*
170create_message_delete (const struct GNUNET_HashCode *hash,
171 const struct GNUNET_TIME_Relative delay);
172 79
173#endif //GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H 80#endif //GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H