diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-02 14:48:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-02 14:48:56 +0000 |
commit | 437a8ac3b0f835c2035575331c1c9272ed93ae43 (patch) | |
tree | 855ace201e4ea83a2bdb0086031b9c15d6f336fd /src/conversation/gnunet-service-conversation.c | |
parent | 5b82f1062147ef5da89971d515d93fd4df8cd40d (diff) | |
download | gnunet-437a8ac3b0f835c2035575331c1c9272ed93ae43.tar.gz gnunet-437a8ac3b0f835c2035575331c1c9272ed93ae43.zip |
-towards canonical header structure for conversation
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r-- | src/conversation/gnunet-service-conversation.c | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index d9af9a523..2d2d815d8 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -34,12 +34,27 @@ | |||
34 | * - TUNNEL HANDLING | 34 | * - TUNNEL HANDLING |
35 | * - CLIENT HANDLING | 35 | * - CLIENT HANDLING |
36 | */ | 36 | */ |
37 | #include <gnunet/platform.h> | 37 | #include "platform.h" |
38 | #include <gnunet/gnunet_util_lib.h> | 38 | #include "gnunet_util_lib.h" |
39 | #include <gnunet/gnunet_constants.h> | 39 | #include "gnunet_protocols.h" |
40 | #include <gnunet/gnunet_mesh_service.h> | 40 | #include "gnunet_constants.h" |
41 | #include "gnunet_conversation.h" | 41 | #include "gnunet_mesh_service.h" |
42 | #include "gnunet_protocols_conversation.h" | 42 | #include "gnunet_conversation_service.h" |
43 | #include "conversation.h" | ||
44 | |||
45 | |||
46 | |||
47 | /* | ||
48 | * The possible connection status | ||
49 | */ | ||
50 | enum connection_status | ||
51 | { | ||
52 | LISTEN, | ||
53 | CALLER, | ||
54 | CALLEE, | ||
55 | CONNECTED | ||
56 | }; | ||
57 | |||
43 | 58 | ||
44 | /******************************************************** | 59 | /******************************************************** |
45 | * Ugly hack because of not working MESH API | 60 | * Ugly hack because of not working MESH API |
@@ -158,6 +173,51 @@ static int data_sent_size; | |||
158 | static int data_received; | 173 | static int data_received; |
159 | static int data_received_size; | 174 | static int data_received_size; |
160 | 175 | ||
176 | |||
177 | /** | ||
178 | * Transmit a mesh message | ||
179 | * @param cls closure, NULL | ||
180 | * @param size number of bytes available in buf | ||
181 | * @param buf where the callee should write the error message | ||
182 | * @return number of bytes written to buf | ||
183 | */ | ||
184 | static size_t transmit_mesh_message (void *cls, size_t size, void *buf); | ||
185 | |||
186 | /** | ||
187 | * Function called to send a peer no answer message to the client. | ||
188 | * "buf" will be NULL and "size" zero if the socket was closed for writing in | ||
189 | * the meantime. | ||
190 | * | ||
191 | * @param cls closure, NULL | ||
192 | * @param size number of bytes available in buf | ||
193 | * @param buf where the callee should write the peer no answer message | ||
194 | * @return number of bytes written to buf | ||
195 | */ | ||
196 | static size_t | ||
197 | transmit_server_no_answer_message (void *cls, size_t size, void *buf); | ||
198 | |||
199 | /** | ||
200 | * Task to schedule a audio transmission. | ||
201 | * | ||
202 | * @param cls Closure. | ||
203 | * @param tc Task Context. | ||
204 | */ | ||
205 | static void | ||
206 | transmit_audio_task (void *cls, | ||
207 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
208 | |||
209 | /** | ||
210 | * Start the audio helpers | ||
211 | */ | ||
212 | int start_helpers (void); | ||
213 | |||
214 | /** | ||
215 | * Stop the audio helpers | ||
216 | */ | ||
217 | void stop_helpers (void); | ||
218 | |||
219 | |||
220 | |||
161 | /******************************************************************************/ | 221 | /******************************************************************************/ |
162 | /*********************** AUXILIARY FUNCTIONS *************************/ | 222 | /*********************** AUXILIARY FUNCTIONS *************************/ |
163 | /******************************************************************************/ | 223 | /******************************************************************************/ |