2 This file is part of GNUnet.
3 (C) 2013 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
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 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file conversation/conversation.h
23 * @brief constants for network protocols
24 * @author Siomon Dieterle
25 * @author Andreas Fuchs
27 #ifndef CONVERSATION_H
28 #define CONVERSATION_H
33 #if 0 /* keep Emacsens' auto-indent happy */
39 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
43 * Message to transmit the audio (between client and helpers).
48 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO
50 struct GNUNET_MessageHeader header;
52 /* followed by audio data */
58 * Client -> Service message to register a phone.
60 struct ClientPhoneRegisterMessage
63 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_REGISTER
65 struct GNUNET_MessageHeader header;
68 * Phone line to register.
70 uint32_t line GNUNET_PACKED;
75 * Service -> Client message for phone is ringing.
77 struct ClientPhoneRingMessage
80 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RING
82 struct GNUNET_MessageHeader header;
87 uint32_t reserved GNUNET_PACKED;
92 struct GNUNET_CRYPTO_EccPublicSignKey caller_id;
98 * Service -> Client message for phone is busy.
100 struct ClientPhoneBusyMessage
103 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_BUSY
105 struct GNUNET_MessageHeader header;
111 * Client -> Service pick up phone that is ringing.
113 struct ClientPhonePickupMessage
116 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICK_UP
118 struct GNUNET_MessageHeader header;
120 /* followed by variable length 0-terminated string with meta data */
126 * Client <-> Service hang up phone that may or may not be ringing.
127 * Also sent in response to a (failed) `struct ClientCallMessage`.
129 struct ClientPhoneHangupMessage
132 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_HANG_UP
134 struct GNUNET_MessageHeader header;
136 /* followed by variable length 0-terminated string with meta data */
142 * Message Client <->Service to transmit the audio.
144 struct ClientAudioMessage
147 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO
149 struct GNUNET_MessageHeader header;
151 /* followed by audio data */
157 * Client -> Service message to call a phone.
159 struct ClientCallMessage
162 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL
164 struct GNUNET_MessageHeader header;
167 * Which phone line to call at the peer?
169 uint32_t line GNUNET_PACKED;
172 * Which peer is hosting the line?
174 struct GNUNET_PeerIdentity target;
177 * Identity of the caller.
179 struct GNUNET_CRYPTO_EccPrivateKey caller_id;
184 * Service -> Client: other peer has picked up the phone, we are
187 struct ClientPhonePickedupMessage
190 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP
192 struct GNUNET_MessageHeader header;
194 /* followed by variable length 0-terminated string with meta data */
200 * Mesh message for phone is ringing.
202 struct MeshPhoneRingMessage
205 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_RING
207 struct GNUNET_MessageHeader header;
210 * Desired target line.
212 uint32_t remote_line GNUNET_PACKED;
215 * Purpose for the signature.
217 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
220 * Who is calling us? (also who is signing).
222 struct GNUNET_CRYPTO_EccPublicSignKey caller_id;
225 * Who are we calling?
227 struct GNUNET_PeerIdentity target;
230 * From where are we calling?
232 struct GNUNET_PeerIdentity source;
235 * When does the signature expire?
237 struct GNUNET_TIME_AbsoluteNBO expiration_time;
240 * Signature on the above.
242 struct GNUNET_CRYPTO_EccSignature signature;
245 * Source line for audio data in the other direction.
247 uint32_t source_line GNUNET_PACKED;
253 * Mesh message for hanging up.
255 struct MeshPhoneHangupMessage
258 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_HANG_UP
260 struct GNUNET_MessageHeader header;
262 /* followed by variable-size 0-terminated reason string */
267 * Mesh message for picking up.
269 struct MeshPhonePickupMessage
272 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_PICK_UP
274 struct GNUNET_MessageHeader header;
276 /* followed by variable-size 0-terminated metadata string */
281 * Mesh message for phone busy.
283 struct MeshPhoneBusyMessage
286 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PHONE_BUSY
288 struct GNUNET_MessageHeader header;
294 * Mesh message to transmit the audio.
296 struct MeshAudioMessage
299 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_AUDIO
301 struct GNUNET_MessageHeader header;
304 * Target line on the receiving end.
306 uint32_t remote_line;
308 /* followed by audio data */
314 #if 0 /* keep Emacsens' auto-indent happy */
321 /* ifndef GNUNET_PROTOCOLS_CONVERSATION_H */
323 /* end of gnunet_protocols_conversation.h */