diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-02 19:29:22 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-02 19:29:22 +0000 |
commit | 0834bf4d6fdf19ab410c01c02e65fcda8a5e5ebc (patch) | |
tree | 2410199dfb90c0ef4d12fc749f30f88e9bfda9b8 /src/include | |
parent | ec9740ca2ca84525842e6743b45ceb9cb2a3ea95 (diff) | |
download | gnunet-0834bf4d6fdf19ab410c01c02e65fcda8a5e5ebc.tar.gz gnunet-0834bf4d6fdf19ab410c01c02e65fcda8a5e5ebc.zip |
-implement microphone library
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_helper_lib.h | 30 | ||||
-rw-r--r-- | src/include/gnunet_microphone_lib.h | 9 | ||||
-rw-r--r-- | src/include/gnunet_speaker_lib.h | 3 |
3 files changed, 23 insertions, 19 deletions
diff --git a/src/include/gnunet_helper_lib.h b/src/include/gnunet_helper_lib.h index 06d65b360..281ee9ba6 100644 --- a/src/include/gnunet_helper_lib.h +++ b/src/include/gnunet_helper_lib.h | |||
@@ -77,21 +77,21 @@ GNUNET_HELPER_start (int with_control_pipe, | |||
77 | * reaped; call GNUNET_HELPER_wait() for reaping the dead helper process. | 77 | * reaped; call GNUNET_HELPER_wait() for reaping the dead helper process. |
78 | * | 78 | * |
79 | * @param h the helper handle | 79 | * @param h the helper handle |
80 | * @param soft_kill if GNUNET_YES, signals termination by closing the helper's | 80 | * @param soft_kill if #GNUNET_YES, signals termination by closing the helper's |
81 | * stdin; GNUNET_NO to signal termination by sending SIGTERM to helper | 81 | * stdin; #GNUNET_NO to signal termination by sending SIGTERM to helper |
82 | * @return GNUNET_OK on success; GNUNET_SYSERR on error | 82 | * @return #GNUNET_OK on success; #GNUNET_SYSERR on error |
83 | */ | 83 | */ |
84 | int | 84 | int |
85 | GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, int soft_kill); | 85 | GNUNET_HELPER_kill (struct GNUNET_HELPER_Handle *h, int soft_kill); |
86 | 86 | ||
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Reap the helper process. This call is blocking(!). The helper process | 89 | * Reap the helper process. This call is blocking (!). The helper process |
90 | * should either be sent a termination signal before or should be dead before | 90 | * should either be sent a termination signal before or should be dead before |
91 | * calling this function | 91 | * calling this function |
92 | * | 92 | * |
93 | * @param h the helper handle | 93 | * @param h the helper handle |
94 | * @return GNUNET_OK on success; GNUNET_SYSERR on error | 94 | * @return #GNUNET_OK on success; #GNUNET_SYSERR on error |
95 | */ | 95 | */ |
96 | int | 96 | int |
97 | GNUNET_HELPER_wait (struct GNUNET_HELPER_Handle *h); | 97 | GNUNET_HELPER_wait (struct GNUNET_HELPER_Handle *h); |
@@ -111,8 +111,8 @@ GNUNET_HELPER_destroy (struct GNUNET_HELPER_Handle *h); | |||
111 | * helper process | 111 | * helper process |
112 | * | 112 | * |
113 | * @param h handle to helper to stop | 113 | * @param h handle to helper to stop |
114 | * @param soft_kill if GNUNET_YES, signals termination by closing the helper's | 114 | * @param soft_kill if #GNUNET_YES, signals termination by closing the helper's |
115 | * stdin; GNUNET_NO to signal termination by sending SIGTERM to helper | 115 | * stdin; #GNUNET_NO to signal termination by sending SIGTERM to helper |
116 | */ | 116 | */ |
117 | void | 117 | void |
118 | GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h, int soft_kill); | 118 | GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h, int soft_kill); |
@@ -122,9 +122,9 @@ GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h, int soft_kill); | |||
122 | * Continuation function. | 122 | * Continuation function. |
123 | * | 123 | * |
124 | * @param cls closure | 124 | * @param cls closure |
125 | * @param result GNUNET_OK on success, | 125 | * @param result #GNUNET_OK on success, |
126 | * GNUNET_NO if helper process died | 126 | * #GNUNET_NO if helper process died |
127 | * GNUNET_SYSERR during GNUNET_HELPER_stop | 127 | * #GNUNET_SYSERR during GNUNET_HELPER_stop |
128 | */ | 128 | */ |
129 | typedef void (*GNUNET_HELPER_Continuation)(void *cls, | 129 | typedef void (*GNUNET_HELPER_Continuation)(void *cls, |
130 | int result); | 130 | int result); |
@@ -143,7 +143,7 @@ struct GNUNET_HELPER_SendHandle; | |||
143 | * @param msg message to send | 143 | * @param msg message to send |
144 | * @param can_drop can the message be dropped if there is already one in the queue? | 144 | * @param can_drop can the message be dropped if there is already one in the queue? |
145 | * @param cont continuation to run once the message is out | 145 | * @param cont continuation to run once the message is out |
146 | * @param cont_cls closure for 'cont' | 146 | * @param cont_cls closure for @a cont |
147 | * @return NULL if the message was dropped, | 147 | * @return NULL if the message was dropped, |
148 | * otherwise handle to cancel *cont* (actual transmission may | 148 | * otherwise handle to cancel *cont* (actual transmission may |
149 | * not be abortable) | 149 | * not be abortable) |
@@ -157,13 +157,13 @@ GNUNET_HELPER_send (struct GNUNET_HELPER_Handle *h, | |||
157 | 157 | ||
158 | 158 | ||
159 | /** | 159 | /** |
160 | * Cancel a 'send' operation. If possible, transmitting the | 160 | * Cancel a #GNUNET_HELPER_send operation. If possible, transmitting |
161 | * message is also aborted, but at least 'cont' won't be | 161 | * the message is also aborted, but at least 'cont' won't be called. |
162 | * called. | ||
163 | * | 162 | * |
164 | * @param sh operation to cancel | 163 | * @param sh operation to cancel |
165 | */ | 164 | */ |
166 | void | 165 | void |
167 | GNUNET_HELPER_send_cancel (struct GNUNET_HELPER_SendHandle *sh); | 166 | GNUNET_HELPER_send_cancel (struct GNUNET_HELPER_SendHandle *sh); |
168 | 167 | ||
169 | #endif /* end of include guard: GNUNET_HELPER_LIB_H */ | 168 | #endif |
169 | /* end of include guard: GNUNET_HELPER_LIB_H */ | ||
diff --git a/src/include/gnunet_microphone_lib.h b/src/include/gnunet_microphone_lib.h index c99777d0c..1ba97cdf6 100644 --- a/src/include/gnunet_microphone_lib.h +++ b/src/include/gnunet_microphone_lib.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 | * Process recorded audio data. | 42 | * Process recorded audio data. |
41 | * | 43 | * |
@@ -53,10 +55,11 @@ typedef void (*GNUNET_MICROPHONE_RecordedDataCallback)(void *cls, | |||
53 | * @param cls clsoure | 55 | * @param cls clsoure |
54 | * @param rdc function to call with recorded data | 56 | * @param rdc function to call with recorded data |
55 | * @param rdc_cls closure for @a dc | 57 | * @param rdc_cls closure for @a dc |
58 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | ||
56 | */ | 59 | */ |
57 | typedef void (*GNUNET_MICROPHONE_EnableCallback)(void *cls, | 60 | typedef int (*GNUNET_MICROPHONE_EnableCallback)(void *cls, |
58 | GNUNET_MICROPHONE_RecordedDataCallback rdc, | 61 | GNUNET_MICROPHONE_RecordedDataCallback rdc, |
59 | void *rdc_cls); | 62 | void *rdc_cls); |
60 | 63 | ||
61 | /** | 64 | /** |
62 | * Function that disables a microphone. | 65 | * Function that disables a microphone. |
diff --git a/src/include/gnunet_speaker_lib.h b/src/include/gnunet_speaker_lib.h index 567b984e0..7a6eb028b 100644 --- a/src/include/gnunet_speaker_lib.h +++ b/src/include/gnunet_speaker_lib.h | |||
@@ -40,8 +40,9 @@ extern "C" | |||
40 | * Function that enables a speaker. | 40 | * Function that enables a speaker. |
41 | * | 41 | * |
42 | * @param cls clsoure | 42 | * @param cls clsoure |
43 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | ||
43 | */ | 44 | */ |
44 | typedef void (*GNUNET_SPEAKER_EnableCallback)(void *cls); | 45 | typedef int (*GNUNET_SPEAKER_EnableCallback)(void *cls); |
45 | 46 | ||
46 | /** | 47 | /** |
47 | * Function that disables a speaker. | 48 | * Function that disables a speaker. |