2 This file is part of GNUnet
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 2, 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 include/gnunet_conversation.h
23 * @brief Header to the conversation service
24 * @author Simon Dieterle
25 * @author Andreas Fuchs
27 #ifndef GNUNET_CONVERSATION_H
28 #define GNUNET_CONVERSATION_H
33 #if 0 /* keep Emacsens' auto-indent happy */
38 #define MAX_TRANSMIT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
41 * Reasons for rejecting an incoming call
45 REJECT_REASON_GENERIC = 0,
46 REJECT_REASON_NOT_AVAILABLE,
47 REJECT_REASON_NO_CLIENT,
48 REJECT_REASON_ACTIVE_CALL,
49 REJECT_REASON_NO_ANSWER
53 * The possible connection status
55 enum connection_status
69 * Handle for a conversation client.
71 struct GNUNET_SERVER_Client *client;
75 * The connection status of the service
77 struct ConnectionStatus
80 * The client which is in interaction
82 struct GNUNET_SERVER_Client *client;
85 * The PeerIdentity of the peer
87 struct GNUNET_PeerIdentity peer;
90 * The status (see enum)
96 * Iformation about a missed call
101 * The PeerIdentity of the peer
103 struct GNUNET_PeerIdentity peer;
106 * The time the call was
108 struct GNUNET_TIME_Absolute time;
113 * Transmit a mesh message
114 * @param cls closure, NULL
115 * @param size number of bytes available in buf
116 * @param buf where the callee should write the error message
117 * @return number of bytes written to buf
119 static size_t transmit_mesh_message (void *cls, size_t size, void *buf);
122 * Function called to send a peer no answer message to the client.
123 * "buf" will be NULL and "size" zero if the socket was closed for writing in
126 * @param cls closure, NULL
127 * @param size number of bytes available in buf
128 * @param buf where the callee should write the peer no answer message
129 * @return number of bytes written to buf
132 transmit_server_no_answer_message (void *cls, size_t size, void *buf);
135 * Task to schedule a audio transmission.
137 * @param cls Closure.
138 * @param tc Task Context.
141 transmit_audio_task (void *cls,
142 const struct GNUNET_SCHEDULER_TaskContext *tc);
145 * Start the audio helpers
147 int start_helpers (void);
150 * Stop the audio helpers
152 void stop_helpers (void);
156 #if 0 /* keep Emacsens' auto-indent happy */