diff options
Diffstat (limited to 'src/messenger/gnunet-service-messenger_message_kind.h')
-rw-r--r-- | src/messenger/gnunet-service-messenger_message_kind.h | 172 |
1 files changed, 0 insertions, 172 deletions
diff --git a/src/messenger/gnunet-service-messenger_message_kind.h b/src/messenger/gnunet-service-messenger_message_kind.h deleted file mode 100644 index c098868c0..000000000 --- a/src/messenger/gnunet-service-messenger_message_kind.h +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2020--2021 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_kind.h | ||
23 | * @brief GNUnet MESSENGER service | ||
24 | */ | ||
25 | |||
26 | #ifndef GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H | ||
27 | #define GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H | ||
28 | |||
29 | #include "platform.h" | ||
30 | #include "gnunet_container_lib.h" | ||
31 | #include "gnunet_crypto_lib.h" | ||
32 | #include "gnunet_identity_service.h" | ||
33 | #include "gnunet_time_lib.h" | ||
34 | |||
35 | #include "messenger_api_message.h" | ||
36 | #include "gnunet-service-messenger_service.h" | ||
37 | #include "messenger_api_ego.h" | ||
38 | |||
39 | /** | ||
40 | * Creates and allocates a new info message containing the hosts EGO public key and a newly generated unique member id. | ||
41 | * (all values are stored as copy) | ||
42 | * | ||
43 | * @param[in] ego EGO of the host | ||
44 | * @param[in] members Map of all assigned member ids | ||
45 | * @return New message | ||
46 | */ | ||
47 | struct GNUNET_MESSENGER_Message* | ||
48 | create_message_info (const struct GNUNET_MESSENGER_Ego *ego); | ||
49 | |||
50 | /** | ||
51 | * Creates and allocates a new join message containing the clients EGO public key. | ||
52 | * (all values are stored as copy) | ||
53 | * | ||
54 | * @param[in] ego EGO of the client | ||
55 | * @return New message | ||
56 | */ | ||
57 | struct GNUNET_MESSENGER_Message* | ||
58 | create_message_join (const struct GNUNET_MESSENGER_Ego *ego); | ||
59 | |||
60 | /** | ||
61 | * Creates and allocates a new leave message. | ||
62 | * | ||
63 | * @return New message | ||
64 | */ | ||
65 | struct GNUNET_MESSENGER_Message* | ||
66 | create_message_leave (); | ||
67 | |||
68 | /** | ||
69 | * Creates and allocates a new name message containing the <i>name</i> to change to. | ||
70 | * (all values are stored as copy) | ||
71 | * | ||
72 | * @param[in] name New name | ||
73 | * @return New message | ||
74 | */ | ||
75 | struct GNUNET_MESSENGER_Message* | ||
76 | create_message_name (const char *name); | ||
77 | |||
78 | /** | ||
79 | * Creates and allocates a new key message containing the public <i>key</i> to change to derived | ||
80 | * from its private counterpart. (all values are stored as copy) | ||
81 | * | ||
82 | * @param[in] key Private key of EGO | ||
83 | * @return New message | ||
84 | */ | ||
85 | struct GNUNET_MESSENGER_Message* | ||
86 | create_message_key (const struct GNUNET_IDENTITY_PrivateKey *key); | ||
87 | |||
88 | /** | ||
89 | * Creates and allocates a new peer message containing a services peer identity. | ||
90 | * (all values are stored as copy) | ||
91 | * | ||
92 | * @param[in] service Service | ||
93 | * @return New message | ||
94 | */ | ||
95 | struct GNUNET_MESSENGER_Message* | ||
96 | create_message_peer (const struct GNUNET_MESSENGER_Service *service); | ||
97 | |||
98 | /** | ||
99 | * Creates and allocates a new id message containing the unique member id to change to. | ||
100 | * (all values are stored as copy) | ||
101 | * | ||
102 | * @param[in] unique_id Unique member id | ||
103 | * @return New message | ||
104 | */ | ||
105 | struct GNUNET_MESSENGER_Message* | ||
106 | create_message_id (const struct GNUNET_ShortHashCode *unique_id); | ||
107 | |||
108 | /** | ||
109 | * Creates and allocates a new miss message containing the missing <i>peer</i> identity. | ||
110 | * (all values are stored as copy) | ||
111 | * | ||
112 | * @param[in] peer Missing peer identity | ||
113 | * @return New message | ||
114 | */ | ||
115 | struct GNUNET_MESSENGER_Message* | ||
116 | create_message_miss (const struct GNUNET_PeerIdentity *peer); | ||
117 | |||
118 | /** | ||
119 | * Creates and allocates a new merge message containing the hash of a second <i>previous</i> message | ||
120 | * besides the regular previous message mentioned in a messages header. | ||
121 | * (all values are stored as copy) | ||
122 | * | ||
123 | * @param[in] previous Hash of message | ||
124 | * @return New message | ||
125 | */ | ||
126 | struct GNUNET_MESSENGER_Message* | ||
127 | create_message_merge (const struct GNUNET_HashCode *previous); | ||
128 | |||
129 | /** | ||
130 | * Creates and allocates a new request message containing the <i>hash</i> of a missing message. | ||
131 | * (all values are stored as copy) | ||
132 | * | ||
133 | * @param[in] hash Hash of message | ||
134 | * @return New message | ||
135 | */ | ||
136 | struct GNUNET_MESSENGER_Message* | ||
137 | create_message_request (const struct GNUNET_HashCode *hash); | ||
138 | |||
139 | /** | ||
140 | * Creates and allocates a new invite message containing the peer identity of an entrance peer | ||
141 | * to a room using a given <i>key</i> as shared secret for communication. | ||
142 | * (all values are stored as copy) | ||
143 | * | ||
144 | * @param[in] door Peer identity | ||
145 | * @param[in] key Shared secret of a room | ||
146 | * @return New message | ||
147 | */ | ||
148 | struct GNUNET_MESSENGER_Message* | ||
149 | create_message_invite (const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key); | ||
150 | |||
151 | /** | ||
152 | * Creates and allocates a new <i>text message containing a string representing text. | ||
153 | * (all values are stored as copy) | ||
154 | * | ||
155 | * @param[in] text Text | ||
156 | * @return New message | ||
157 | */ | ||
158 | struct GNUNET_MESSENGER_Message* | ||
159 | create_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 | */ | ||
169 | struct GNUNET_MESSENGER_Message* | ||
170 | create_message_delete (const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay); | ||
171 | |||
172 | #endif //GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H | ||