aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_microphone_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_microphone_lib.h')
-rw-r--r--src/include/gnunet_microphone_lib.h51
1 files changed, 24 insertions, 27 deletions
diff --git a/src/include/gnunet_microphone_lib.h b/src/include/gnunet_microphone_lib.h
index 46e5bfa25..f5cf4abc6 100644
--- a/src/include/gnunet_microphone_lib.h
+++ b/src/include/gnunet_microphone_lib.h
@@ -1,19 +1,19 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2013 GNUnet e.V. 3 Copyright (C) 2013 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License, 7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19 */ 19 */
@@ -36,7 +36,7 @@
36#ifdef __cplusplus 36#ifdef __cplusplus
37extern "C" 37extern "C"
38{ 38{
39#if 0 /* keep Emacsens' auto-indent happy */ 39#if 0 /* keep Emacsens' auto-indent happy */
40} 40}
41#endif 41#endif
42#endif 42#endif
@@ -51,8 +51,8 @@ extern "C"
51 * @param data audio data to play 51 * @param data audio data to play
52 */ 52 */
53typedef void (*GNUNET_MICROPHONE_RecordedDataCallback)(void *cls, 53typedef void (*GNUNET_MICROPHONE_RecordedDataCallback)(void *cls,
54 size_t data_size, 54 size_t data_size,
55 const void *data); 55 const void *data);
56 56
57/** 57/**
58 * Enable a microphone. 58 * Enable a microphone.
@@ -63,8 +63,8 @@ typedef void (*GNUNET_MICROPHONE_RecordedDataCallback)(void *cls,
63 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 63 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
64 */ 64 */
65typedef int (*GNUNET_MICROPHONE_EnableCallback)(void *cls, 65typedef int (*GNUNET_MICROPHONE_EnableCallback)(void *cls,
66 GNUNET_MICROPHONE_RecordedDataCallback rdc, 66 GNUNET_MICROPHONE_RecordedDataCallback rdc,
67 void *rdc_cls); 67 void *rdc_cls);
68 68
69/** 69/**
70 * Function that disables a microphone. 70 * Function that disables a microphone.
@@ -84,9 +84,7 @@ typedef void (*GNUNET_MICROPHONE_DestroyCallback)(void *cls);
84/** 84/**
85 * A microphone is a device that can capture or otherwise produce audio data. 85 * A microphone is a device that can capture or otherwise produce audio data.
86 */ 86 */
87struct GNUNET_MICROPHONE_Handle 87struct GNUNET_MICROPHONE_Handle {
88{
89
90 /** 88 /**
91 * Turn on the microphone. 89 * Turn on the microphone.
92 */ 90 */
@@ -106,7 +104,6 @@ struct GNUNET_MICROPHONE_Handle
106 * Closure for the callbacks. 104 * Closure for the callbacks.
107 */ 105 */
108 void *cls; 106 void *cls;
109
110}; 107};
111 108
112 109
@@ -118,7 +115,7 @@ struct GNUNET_MICROPHONE_Handle
118 * @return NULL on error 115 * @return NULL on error
119 */ 116 */
120struct GNUNET_MICROPHONE_Handle * 117struct GNUNET_MICROPHONE_Handle *
121GNUNET_MICROPHONE_create_from_hardware (const struct GNUNET_CONFIGURATION_Handle *cfg); 118GNUNET_MICROPHONE_create_from_hardware(const struct GNUNET_CONFIGURATION_Handle *cfg);
122 119
123 120
124/** 121/**
@@ -127,10 +124,10 @@ GNUNET_MICROPHONE_create_from_hardware (const struct GNUNET_CONFIGURATION_Handle
127 * @param microphone microphone to destroy 124 * @param microphone microphone to destroy
128 */ 125 */
129void 126void
130GNUNET_MICROPHONE_destroy (struct GNUNET_MICROPHONE_Handle *microphone); 127GNUNET_MICROPHONE_destroy(struct GNUNET_MICROPHONE_Handle *microphone);
131 128
132 129
133#if 0 /* keep Emacsens' auto-indent happy */ 130#if 0 /* keep Emacsens' auto-indent happy */
134{ 131{
135#endif 132#endif
136#ifdef __cplusplus 133#ifdef __cplusplus