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)
42 /************************************************************************************************************************
43 * Messages for the Client <-> Server communication
53 * Handle for a conversation client.
55 struct GNUNET_SERVER_Client *client;
59 * The connection status of the service
61 struct ConnectionStatus
64 * The client which is in interaction
66 struct GNUNET_SERVER_Client *client;
69 * The PeerIdentity of the peer
71 struct GNUNET_PeerIdentity peer;
74 * The status (see enum)
80 * Information about a missed call
85 * The PeerIdentity of the peer
87 struct GNUNET_PeerIdentity peer;
90 * The time the call was
92 struct GNUNET_TIME_Absolute time;
100 * Client <-> Server message to initiate a new call
102 struct ClientServerSessionInitiateMessage
105 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_SESSION_INITIATE
107 struct GNUNET_MessageHeader header;
108 struct GNUNET_PeerIdentity peer;
113 * Client <-> Server meessage to accept an incoming call
115 struct ClientServerSessionAcceptMessage
118 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_SESSION_ACCEPT
120 struct GNUNET_MessageHeader header;
125 * Client <-> Server message to reject an incoming call
127 struct ClientServerSessionRejectMessage
130 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_SESSION_REJECT
132 struct GNUNET_MessageHeader header;
138 * Client <-> Server message to terminat a call
140 struct ClientServerSessionTerminateMessage
143 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_SESSION_TERMINATE
145 struct GNUNET_MessageHeader header;
150 * Client <-> Server message to initiate a new call
152 struct ClientServerTestMessage
155 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_TEST
157 struct GNUNET_MessageHeader header;
158 struct GNUNET_PeerIdentity peer;
161 /************************************************************************************************************************
162 * Messages for the Server <-> Client communication
166 * Server <-> Client message to initiate a new call
168 struct ServerClientSessionInitiateMessage
171 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_SESSION_INITIATE
173 struct GNUNET_MessageHeader header;
174 struct GNUNET_PeerIdentity peer;
179 * Server <-> Client meessage to accept an incoming call
181 struct ServerClientSessionAcceptMessage
184 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_SESSION_ACCEPT
186 struct GNUNET_MessageHeader header;
191 * Server <-> Client message to reject an incoming call
193 struct ServerClientSessionRejectMessage
196 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_SESSION_REJECT
198 struct GNUNET_MessageHeader header;
205 * Server <-> Client message to terminat a call
207 struct ServerClientSessionTerminateMessage
210 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_SESSION_TERMINATE
212 struct GNUNET_MessageHeader header;
217 * Server <-> Client message to signalize the client that the service is already in use
219 struct ServerClientServiceBlockedMessage
222 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_SERVICE_BLOCKED
224 struct GNUNET_MessageHeader header;
228 * Server <-> Client message to signalize the client that the called peer is not connected
230 struct ServerClientPeerNotConnectedMessage
233 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_PEER_NOT_CONNECTED
235 struct GNUNET_MessageHeader header;
240 * Server <-> Client message to signalize the client that called peer does not answer
242 struct ServerClientNoAnswerMessage
245 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_NO_ANSWER
247 struct GNUNET_MessageHeader header;
251 * Server <-> Client message to notify client of missed call
253 struct ServerClientMissedCallMessage
256 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_MISSED_CALL
258 struct GNUNET_MessageHeader header;
260 struct MissedCall *missed_call;
265 * Server <-> Client message to signalize the client that there occured an error
267 struct ServerClientErrorMessage
270 * Type is: #define GNUNET_MESSAGE_TYPE_CONVERSATION_SC_ERROR
272 struct GNUNET_MessageHeader header;
277 * Server <-> Client message to notify client of peer being available
279 struct ServerClientPeerAvailableMessage
282 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_SC_PEER_AVAILABLE
284 struct GNUNET_MessageHeader header;
285 struct GNUNET_PeerIdentity peer;
286 struct GNUNET_TIME_Absolute time;
289 /************************************************************************************************************************
290 * Messages for the Mesh communication
293 struct VoIPMeshMessageHeader
298 struct GNUNET_MessageHeader header;
300 struct GNUNET_TIME_Absolute time;
305 * Mesh message to sinal the remote peer the wish to initiate a new call
307 struct MeshSessionInitiateMessage
310 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_SESSION_INITIATE
312 struct GNUNET_MessageHeader header;
314 struct GNUNET_TIME_Absolute time;
315 struct GNUNET_PeerIdentity peer;
319 * Mesh message to signal the remote peer the acceptance of an initiated call
321 struct MeshSessionAcceptMessage
324 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_SESSION_ACCEPT
326 struct GNUNET_MessageHeader header;
328 struct GNUNET_TIME_Absolute time;
333 * Mesh message to reject an a wish to initiate a new call
335 struct MeshSessionRejectMessage
338 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_SESSION_REJECT
340 struct GNUNET_MessageHeader header;
342 struct GNUNET_TIME_Absolute time;
349 * Mesh message to signal a remote peer the terminatation of a call
351 struct MeshSessionTerminateMessage
354 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_SESSION_TERMINATE
356 struct GNUNET_MessageHeader header;
358 struct GNUNET_TIME_Absolute time;
363 * Server <-> Client message to notify client of peer being available
365 struct MeshPeerAvailableMessage
368 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_PEER_AVAILABLE
370 struct GNUNET_MessageHeader header;
372 struct GNUNET_TIME_Absolute time;
373 struct GNUNET_PeerIdentity peer;
374 struct GNUNET_TIME_Absolute call;
379 * Messages for the audio communication
384 * Type is: #GNUNET_MESSAGE_TYPE_CONVERSATION_TEST
386 struct GNUNET_MessageHeader header;
391 * Message to transmit the audio
396 * Type is #GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO
398 struct GNUNET_MessageHeader header;
400 struct GNUNET_TIME_Absolute time;
408 #if 0 /* keep Emacsens' auto-indent happy */
415 /* ifndef GNUNET_PROTOCOLS_CONVERSATION_H */
417 /* end of gnunet_protocols_conversation.h */