diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-02 19:06:07 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-02 19:06:07 +0000 |
commit | ec9740ca2ca84525842e6743b45ceb9cb2a3ea95 (patch) | |
tree | 5382b500ec7e5e66197d697c40a69bf4b0cb890f /src/include/gnunet_conversation_service.h | |
parent | 705d8a8c1efe6cd7f0d9a452e8bb89cd7923fe99 (diff) | |
download | gnunet-ec9740ca2ca84525842e6743b45ceb9cb2a3ea95.tar.gz gnunet-ec9740ca2ca84525842e6743b45ceb9cb2a3ea95.zip |
-split off microphone/speaker APIs
Diffstat (limited to 'src/include/gnunet_conversation_service.h')
-rw-r--r-- | src/include/gnunet_conversation_service.h | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/src/include/gnunet_conversation_service.h b/src/include/gnunet_conversation_service.h index 9f7b829aa..677c40244 100644 --- a/src/include/gnunet_conversation_service.h +++ b/src/include/gnunet_conversation_service.h | |||
@@ -36,6 +36,8 @@ extern "C" | |||
36 | #endif | 36 | #endif |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include "gnunet_util_lib.h" | ||
40 | |||
39 | /** | 41 | /** |
40 | * Version of the conversation API. | 42 | * Version of the conversation API. |
41 | */ | 43 | */ |
@@ -233,60 +235,11 @@ GNUNET_CONVERSATION_reject (struct GNUNET_CONVERSATION_Handle *handle); | |||
233 | talking to.x */ | 235 | talking to.x */ |
234 | 236 | ||
235 | 237 | ||
238 | #include "gnunet_util_lib.h" | ||
236 | #include "gnunet_identity_service.h" | 239 | #include "gnunet_identity_service.h" |
237 | #include "gnunet_namestore_service.h" | 240 | #include "gnunet_namestore_service.h" |
238 | 241 | #include "gnunet_speaker_lib.h" | |
239 | 242 | #include "gnunet_microphone_lib.h" | |
240 | /** | ||
241 | * A speaker is a device that can play or record audio data. | ||
242 | */ | ||
243 | struct GNUNET_CONVERSATION_Speaker; | ||
244 | |||
245 | |||
246 | /** | ||
247 | * Create a speaker that corresponds to the speaker hardware | ||
248 | * of our system. | ||
249 | * | ||
250 | * @param cfg configuration to use | ||
251 | * @return NULL on error | ||
252 | */ | ||
253 | struct GNUNET_CONVERSATION_Speaker * | ||
254 | GNUNET_CONVERSATION_speaker_create_from_hardware (struct GNUNET_CONFIGURATION_Handle *cfg); | ||
255 | |||
256 | |||
257 | /** | ||
258 | * Destroy a speaker. | ||
259 | * | ||
260 | * @param speaker speaker to destroy | ||
261 | */ | ||
262 | void | ||
263 | GNUNET_CONVERSATION_speaker_destroy (struct GNUNET_CONVERSATION_Speaker *speaker); | ||
264 | |||
265 | |||
266 | /** | ||
267 | * A speaker is a device that can generate audio data. | ||
268 | */ | ||
269 | struct GNUNET_CONVERSATION_Microphone; | ||
270 | |||
271 | |||
272 | /** | ||
273 | * Create a speaker that corresponds to the speaker hardware | ||
274 | * of our system. | ||
275 | * | ||
276 | * @param cfg configuration to use | ||
277 | * @return NULL on error | ||
278 | */ | ||
279 | struct GNUNET_CONVERSATION_Microphone * | ||
280 | GNUNET_CONVERSATION_microphone_create_from_hardware (struct GNUNET_CONFIGURATION_Handle *cfg); | ||
281 | |||
282 | |||
283 | /** | ||
284 | * Destroy a microphone. | ||
285 | * | ||
286 | * @param mic microphone to destroy | ||
287 | */ | ||
288 | void | ||
289 | GNUNET_CONVERSATION_microphone_destroy (struct GNUNET_CONVERSATION_Microphone *mic); | ||
290 | 243 | ||
291 | 244 | ||
292 | /** | 245 | /** |
@@ -382,8 +335,8 @@ GNUNET_CONVERSATION_phone_get_record (struct GNUNET_CONVERSATION_Phone *phone, | |||
382 | void | 335 | void |
383 | GNUNET_CONVERSTATION_phone_pick_up (struct GNUNET_CONVERSATION_Phone *phone, | 336 | GNUNET_CONVERSTATION_phone_pick_up (struct GNUNET_CONVERSATION_Phone *phone, |
384 | const char *metadata, | 337 | const char *metadata, |
385 | struct GNUNET_CONVERSATION_Speaker *speaker, | 338 | struct GNUNET_SPEAKER_Handle *speaker, |
386 | struct GNUNET_CONVERSATION_Microphone *mic); | 339 | struct GNUNET_MICROPHONE_Handle *mic); |
387 | 340 | ||
388 | 341 | ||
389 | /** | 342 | /** |
@@ -431,8 +384,8 @@ struct GNUNET_CONVERSATION_Call * | |||
431 | GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 384 | GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
432 | struct GNUNET_IDENTITY_Ego *caller_id, | 385 | struct GNUNET_IDENTITY_Ego *caller_id, |
433 | const char *callee, | 386 | const char *callee, |
434 | struct GNUNET_CONVERSATION_Speaker *speaker, | 387 | struct GNUNET_SPEAKER_Handle *speaker, |
435 | struct GNUNET_CONVERSATION_Microphone *mic, | 388 | struct GNUNET_MICROPHONE_Handle *mic, |
436 | GNUNET_CONVERSATION_EventHandler event_handler, | 389 | GNUNET_CONVERSATION_EventHandler event_handler, |
437 | void *event_handler_cls); | 390 | void *event_handler_cls); |
438 | 391 | ||
@@ -444,7 +397,7 @@ GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
444 | * @param reason if the call was active (ringing or ready) this will be the | 397 | * @param reason if the call was active (ringing or ready) this will be the |
445 | * reason given to the other user for why we hung up | 398 | * reason given to the other user for why we hung up |
446 | */ | 399 | */ |
447 | struct GNUNET_CONVERSATION_Call * | 400 | void |
448 | GNUNET_CONVERSATION_call_stop (const struct GNUNET_CONVERSATION_Call *call, | 401 | GNUNET_CONVERSATION_call_stop (const struct GNUNET_CONVERSATION_Call *call, |
449 | const char *reason); | 402 | const char *reason); |
450 | 403 | ||