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