diff options
Diffstat (limited to 'src/service/messenger/gnunet-service-messenger.h')
-rw-r--r-- | src/service/messenger/gnunet-service-messenger.h | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/src/service/messenger/gnunet-service-messenger.h b/src/service/messenger/gnunet-service-messenger.h new file mode 100644 index 000000000..a3e683ecd --- /dev/null +++ b/src/service/messenger/gnunet-service-messenger.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | Copyright (C) 2020--2023 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.h | ||
23 | * @brief GNUnet MESSENGER service | ||
24 | */ | ||
25 | |||
26 | #ifndef GNUNET_SERVICE_MESSENGER_H | ||
27 | #define GNUNET_SERVICE_MESSENGER_H | ||
28 | |||
29 | #include "platform.h" | ||
30 | #include "gnunet_cadet_service.h" | ||
31 | #include "gnunet_identity_service.h" | ||
32 | #include "gnunet_protocols.h" | ||
33 | #include "gnunet_util_lib.h" | ||
34 | |||
35 | /** | ||
36 | * Message to create a handle for a client | ||
37 | */ | ||
38 | struct GNUNET_MESSENGER_CreateMessage | ||
39 | { | ||
40 | struct GNUNET_MessageHeader header; | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * Message to update the handle (its EGO key) for a client | ||
45 | */ | ||
46 | struct GNUNET_MESSENGER_UpdateMessage | ||
47 | { | ||
48 | struct GNUNET_MessageHeader header; | ||
49 | }; | ||
50 | |||
51 | /** | ||
52 | * Message to destroy the handle for a client | ||
53 | */ | ||
54 | struct GNUNET_MESSENGER_DestroyMessage | ||
55 | { | ||
56 | struct GNUNET_MessageHeader header; | ||
57 | }; | ||
58 | |||
59 | /** | ||
60 | * Message to receive the current name of a handle | ||
61 | */ | ||
62 | struct GNUNET_MESSENGER_NameMessage | ||
63 | { | ||
64 | struct GNUNET_MessageHeader header; | ||
65 | }; | ||
66 | |||
67 | /** | ||
68 | * Message to receive the current public key of a handle | ||
69 | */ | ||
70 | struct GNUNET_MESSENGER_KeyMessage | ||
71 | { | ||
72 | struct GNUNET_MessageHeader header; | ||
73 | }; | ||
74 | |||
75 | /** | ||
76 | * General message to confirm interaction with a room | ||
77 | */ | ||
78 | struct GNUNET_MESSENGER_RoomMessage | ||
79 | { | ||
80 | struct GNUNET_MessageHeader header; | ||
81 | |||
82 | struct GNUNET_PeerIdentity door; | ||
83 | struct GNUNET_HashCode key; | ||
84 | }; | ||
85 | |||
86 | /** | ||
87 | * Message to receive the current member id of a handle in room | ||
88 | */ | ||
89 | struct GNUNET_MESSENGER_MemberMessage | ||
90 | { | ||
91 | struct GNUNET_MessageHeader header; | ||
92 | |||
93 | struct GNUNET_HashCode key; | ||
94 | struct GNUNET_ShortHashCode id; | ||
95 | uint32_t reset; | ||
96 | }; | ||
97 | |||
98 | /** | ||
99 | * Message to send something into a room | ||
100 | */ | ||
101 | struct GNUNET_MESSENGER_SendMessage | ||
102 | { | ||
103 | struct GNUNET_MessageHeader header; | ||
104 | |||
105 | struct GNUNET_HashCode key; | ||
106 | }; | ||
107 | |||
108 | /** | ||
109 | * Message to request something from a room | ||
110 | */ | ||
111 | struct GNUNET_MESSENGER_GetMessage | ||
112 | { | ||
113 | struct GNUNET_MessageHeader header; | ||
114 | |||
115 | struct GNUNET_HashCode key; | ||
116 | struct GNUNET_HashCode hash; | ||
117 | }; | ||
118 | |||
119 | /** | ||
120 | * Message to receive something from a room | ||
121 | */ | ||
122 | struct GNUNET_MESSENGER_RecvMessage | ||
123 | { | ||
124 | struct GNUNET_MessageHeader header; | ||
125 | |||
126 | struct GNUNET_HashCode key; | ||
127 | struct GNUNET_HashCode sender; | ||
128 | struct GNUNET_HashCode context; | ||
129 | struct GNUNET_HashCode hash; | ||
130 | uint32_t flags; | ||
131 | }; | ||
132 | |||
133 | #endif //GNUNET_SERVICE_MESSENGER_H | ||