Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/t30_api.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
1 /* | |
2 * SpanDSP - a series of DSP components for telephony | |
3 * | |
4 * t30_api.h - definitions for T.30 fax processing | |
5 * | |
6 * Written by Steve Underwood <steveu@coppice.org> | |
7 * | |
8 * Copyright (C) 2003 Steve Underwood | |
9 * | |
10 * All rights reserved. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU Lesser General Public License version 2.1, | |
14 * as published by the Free Software Foundation. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU Lesser General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU Lesser General Public | |
22 * License along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
24 * | |
25 * $Id: t30_api.h,v 1.10 2009/04/12 09:12:10 steveu Exp $ | |
26 */ | |
27 | |
28 /*! \file */ | |
29 | |
30 #if !defined(_SPANDSP_T30_API_H_) | |
31 #define _SPANDSP_T30_API_H_ | |
32 | |
33 #if defined(__cplusplus) | |
34 extern "C" | |
35 { | |
36 #endif | |
37 | |
38 /*! Set the transmitted NSF frame to be associated with a T.30 context. | |
39 \brief Set the transmitted NSF frame to be associated with a T.30 context. | |
40 \param s The T.30 context. | |
41 \param nsf A pointer to the frame. | |
42 \param len The length of the frame. | |
43 \return 0 for OK, else -1. */ | |
44 SPAN_DECLARE(int) t30_set_tx_nsf(t30_state_t *s, const uint8_t *nsf, int len); | |
45 | |
46 /*! Get an NSF frame to be associated with a T.30 context. | |
47 \brief Set an NSF frame to be associated with a T.30 context. | |
48 \param s The T.30 context. | |
49 \param nsf A pointer to the frame. | |
50 \return the length of the NSF message. */ | |
51 SPAN_DECLARE(size_t) t30_get_tx_nsf(t30_state_t *s, const uint8_t *nsf[]); | |
52 | |
53 /*! Get an NSF frame to be associated with a T.30 context. | |
54 \brief Set an NSF frame to be associated with a T.30 context. | |
55 \param s The T.30 context. | |
56 \param nsf A pointer to the frame. | |
57 \return the length of the NSF message. */ | |
58 SPAN_DECLARE(size_t) t30_get_rx_nsf(t30_state_t *s, const uint8_t *nsf[]); | |
59 | |
60 /*! Set the transmitted NSC frame to be associated with a T.30 context. | |
61 \brief Set the transmitted NSC frame to be associated with a T.30 context. | |
62 \param s The T.30 context. | |
63 \param nsc A pointer to the frame. | |
64 \param len The length of the frame. | |
65 \return 0 for OK, else -1. */ | |
66 SPAN_DECLARE(int) t30_set_tx_nsc(t30_state_t *s, const uint8_t *nsc, int len); | |
67 | |
68 /*! Get an NSC frame to be associated with a T.30 context. | |
69 \brief Set an NSC frame to be associated with a T.30 context. | |
70 \param s The T.30 context. | |
71 \param nsc A pointer to the frame. | |
72 \return the length of the NSC message. */ | |
73 SPAN_DECLARE(size_t) t30_get_tx_nsc(t30_state_t *s, const uint8_t *nsc[]); | |
74 | |
75 /*! Get an NSC frame to be associated with a T.30 context. | |
76 \brief Set an NSC frame to be associated with a T.30 context. | |
77 \param s The T.30 context. | |
78 \param nsc A pointer to the frame. | |
79 \return the length of the NSC message. */ | |
80 SPAN_DECLARE(size_t) t30_get_rx_nsc(t30_state_t *s, const uint8_t *nsc[]); | |
81 | |
82 /*! Set the transmitted NSS frame to be associated with a T.30 context. | |
83 \brief Set the transmitted NSS frame to be associated with a T.30 context. | |
84 \param s The T.30 context. | |
85 \param nss A pointer to the frame. | |
86 \param len The length of the frame. | |
87 \return 0 for OK, else -1. */ | |
88 SPAN_DECLARE(int) t30_set_tx_nss(t30_state_t *s, const uint8_t *nss, int len); | |
89 | |
90 /*! Get an NSS frame to be associated with a T.30 context. | |
91 \brief Set an NSS frame to be associated with a T.30 context. | |
92 \param s The T.30 context. | |
93 \param nss A pointer to the frame. | |
94 \return the length of the NSS message. */ | |
95 SPAN_DECLARE(size_t) t30_get_tx_nss(t30_state_t *s, const uint8_t *nss[]); | |
96 | |
97 /*! Get an NSS frame to be associated with a T.30 context. | |
98 \brief Set an NSS frame to be associated with a T.30 context. | |
99 \param s The T.30 context. | |
100 \param nss A pointer to the frame. | |
101 \return the length of the NSS message. */ | |
102 SPAN_DECLARE(size_t) t30_get_rx_nss(t30_state_t *s, const uint8_t *nss[]); | |
103 | |
104 /*! Set the transmitted identifier associated with a T.30 context. | |
105 \brief Set the transmitted identifier associated with a T.30 context. | |
106 \param s The T.30 context. | |
107 \param id A pointer to the identifier. | |
108 \return 0 for OK, else -1. */ | |
109 SPAN_DECLARE(int) t30_set_tx_ident(t30_state_t *s, const char *id); | |
110 | |
111 /*! Get the transmitted identifier associated with a T.30 context. | |
112 \brief Set the transmitted identifier associated with a T.30 context. | |
113 \param s The T.30 context. | |
114 \return A pointer to the identifier. */ | |
115 SPAN_DECLARE(const char *) t30_get_tx_ident(t30_state_t *s); | |
116 | |
117 /*! Get the transmitted identifier associated with a T.30 context. | |
118 \brief Set the transmitted identifier associated with a T.30 context. | |
119 \param s The T.30 context. | |
120 \return A pointer to the identifier. */ | |
121 SPAN_DECLARE(const char *) t30_get_rx_ident(t30_state_t *s); | |
122 | |
123 /*! Set the transmitted sub-address associated with a T.30 context. | |
124 \brief Set the transmitted sub-address associated with a T.30 context. | |
125 \param s The T.30 context. | |
126 \param sub_address A pointer to the sub-address. | |
127 \return 0 for OK, else -1. */ | |
128 SPAN_DECLARE(int) t30_set_tx_sub_address(t30_state_t *s, const char *sub_address); | |
129 | |
130 /*! Get the received sub-address associated with a T.30 context. | |
131 \brief Get the received sub-address associated with a T.30 context. | |
132 \param s The T.30 context. | |
133 \return A pointer to the sub-address. */ | |
134 SPAN_DECLARE(const char *) t30_get_tx_sub_address(t30_state_t *s); | |
135 | |
136 /*! Get the received sub-address associated with a T.30 context. | |
137 \brief Get the received sub-address associated with a T.30 context. | |
138 \param s The T.30 context. | |
139 \return A pointer to the sub-address. */ | |
140 SPAN_DECLARE(const char *) t30_get_rx_sub_address(t30_state_t *s); | |
141 | |
142 /*! Set the transmitted selective polling address (i.e. the one we will send to the far | |
143 end) associated with a T.30 context. | |
144 \brief Set the transmitted selective polling address associated with a T.30 context. | |
145 \param s The T.30 context. | |
146 \param selective_polling_address A pointer to the selective polling address. | |
147 \return 0 for OK, else -1. */ | |
148 SPAN_DECLARE(int) t30_set_tx_selective_polling_address(t30_state_t *s, const char *selective_polling_address); | |
149 | |
150 /*! Get the received selective polling address (i.e. the one we will send to the far | |
151 end) associated with a T.30 context. | |
152 \brief Get the received selective polling address associated with a T.30 context. | |
153 \param s The T.30 context. | |
154 \return A pointer to the selective polling address. */ | |
155 SPAN_DECLARE(const char *) t30_get_tx_selective_polling_address(t30_state_t *s); | |
156 | |
157 /*! Get the received selective polling address (i.e. the one we will send to the far | |
158 end) associated with a T.30 context. | |
159 \brief Get the received selective polling address associated with a T.30 context. | |
160 \param s The T.30 context. | |
161 \return A pointer to the selective polling address. */ | |
162 SPAN_DECLARE(const char *) t30_get_rx_selective_polling_address(t30_state_t *s); | |
163 | |
164 /*! Set the transmitted polled sub-address (i.e. the one we will send to the far | |
165 end) associated with a T.30 context. | |
166 \brief Set the transmitted polled sub-address associated with a T.30 context. | |
167 \param s The T.30 context. | |
168 \param polled_sub_address A pointer to the polled sub-address. | |
169 \return 0 for OK, else -1. */ | |
170 SPAN_DECLARE(int) t30_set_tx_polled_sub_address(t30_state_t *s, const char *polled_sub_address); | |
171 | |
172 /*! Get the received polled sub-address (i.e. the one we will send to the far | |
173 end) associated with a T.30 context. | |
174 \brief Get the received polled sub-address associated with a T.30 context. | |
175 \param s The T.30 context. | |
176 \return A pointer to the polled sub-address. */ | |
177 SPAN_DECLARE(const char *) t30_get_tx_polled_sub_address(t30_state_t *s); | |
178 | |
179 /*! Get the received polled sub-address (i.e. the one we will send to the far | |
180 end) associated with a T.30 context. | |
181 \brief Get the received polled sub-address associated with a T.30 context. | |
182 \param s The T.30 context. | |
183 \return A pointer to the polled sub-address. */ | |
184 SPAN_DECLARE(const char *) t30_get_rx_polled_sub_address(t30_state_t *s); | |
185 | |
186 /*! Set the transmitted sender ident (i.e. the one we will send to the far | |
187 end) associated with a T.30 context. | |
188 \brief Set the transmitted sender ident associated with a T.30 context. | |
189 \param s The T.30 context. | |
190 \param sender_ident A pointer to the sender ident. | |
191 \return 0 for OK, else -1. */ | |
192 SPAN_DECLARE(int) t30_set_tx_sender_ident(t30_state_t *s, const char *sender_ident); | |
193 | |
194 /*! Get the received sender ident (i.e. the one we will send to the far | |
195 end) associated with a T.30 context. | |
196 \brief Get the received sender ident associated with a T.30 context. | |
197 \param s The T.30 context. | |
198 \return A pointer to the sender ident. */ | |
199 SPAN_DECLARE(const char *) t30_get_tx_sender_ident(t30_state_t *s); | |
200 | |
201 /*! Get the received sender ident (i.e. the one we will send to the far | |
202 end) associated with a T.30 context. | |
203 \brief Get the received sender ident associated with a T.30 context. | |
204 \param s The T.30 context. | |
205 \return A pointer to the sender ident. */ | |
206 SPAN_DECLARE(const char *) t30_get_rx_sender_ident(t30_state_t *s); | |
207 | |
208 /*! Set the transmitted password (i.e. the one we will send to the far | |
209 end) associated with a T.30 context. | |
210 \brief Set the transmitted password associated with a T.30 context. | |
211 \param s The T.30 context. | |
212 \param password A pointer to the password. | |
213 \return 0 for OK, else -1. */ | |
214 SPAN_DECLARE(int) t30_set_tx_password(t30_state_t *s, const char *password); | |
215 | |
216 /*! Get the received password (i.e. the one we will send to the far | |
217 end) associated with a T.30 context. | |
218 \brief Get the received password associated with a T.30 context. | |
219 \param s The T.30 context. | |
220 \return A pointer to the password. */ | |
221 SPAN_DECLARE(const char *) t30_get_tx_password(t30_state_t *s); | |
222 | |
223 /*! Get the received password (i.e. the one we will send to the far | |
224 end) associated with a T.30 context. | |
225 \brief Get the received password associated with a T.30 context. | |
226 \param s The T.30 context. | |
227 \return A pointer to the password. */ | |
228 SPAN_DECLARE(const char *) t30_get_rx_password(t30_state_t *s); | |
229 | |
230 /*! Set the transmitted ??? (i.e. the one we will send to the far | |
231 end) associated with a T.30 context. | |
232 \brief Set the transmitted ??? associated with a T.30 context. | |
233 \param s The T.30 context. | |
234 \param type The type of address. | |
235 \param address A pointer to the address. | |
236 \param len The length of the address. | |
237 \return 0 for OK, else -1. */ | |
238 SPAN_DECLARE(int) t30_set_tx_tsa(t30_state_t *s, int type, const char *address, int len); | |
239 | |
240 /*! Get the received ??? (i.e. the one we will send to the far | |
241 end) associated with a T.30 context. | |
242 \brief Get the received ??? associated with a T.30 context. | |
243 \param s The T.30 context. | |
244 \param type The type of address. | |
245 \param address A pointer to the address. | |
246 \return The length of the address. */ | |
247 SPAN_DECLARE(size_t) t30_get_tx_tsa(t30_state_t *s, int *type, const char *address[]); | |
248 | |
249 /*! Get the received ??? (i.e. the one we will send to the far | |
250 end) associated with a T.30 context. | |
251 \brief Get the received ??? associated with a T.30 context. | |
252 \param s The T.30 context. | |
253 \param type The type of address. | |
254 \param address A pointer to the address. | |
255 \return The length of the address. */ | |
256 SPAN_DECLARE(size_t) t30_get_rx_tsa(t30_state_t *s, int *type, const char *address[]); | |
257 | |
258 /*! Set the transmitted ??? (i.e. the one we will send to the far | |
259 end) associated with a T.30 context. | |
260 \brief Set the transmitted ??? associated with a T.30 context. | |
261 \param s The T.30 context. | |
262 \param type The type of address. | |
263 \param address A pointer to the address. | |
264 \param len The length of the address. | |
265 \return 0 for OK, else -1. */ | |
266 SPAN_DECLARE(int) t30_set_tx_ira(t30_state_t *s, int type, const char *address, int len); | |
267 | |
268 /*! Get the received ??? (i.e. the one we will send to the far | |
269 end) associated with a T.30 context. | |
270 \brief Get the received ??? associated with a T.30 context. | |
271 \param s The T.30 context. | |
272 \param type The type of address. | |
273 \param address A pointer to the address. | |
274 \return The length of the address. */ | |
275 SPAN_DECLARE(size_t) t30_get_tx_ira(t30_state_t *s, int *type, const char *address[]); | |
276 | |
277 /*! Get the received ??? (i.e. the one we will send to the far | |
278 end) associated with a T.30 context. | |
279 \brief Get the received ??? associated with a T.30 context. | |
280 \param s The T.30 context. | |
281 \param type The type of address. | |
282 \param address A pointer to the address. | |
283 \return The length of the address. */ | |
284 SPAN_DECLARE(size_t) t30_get_rx_ira(t30_state_t *s, int *type, const char *address[]); | |
285 | |
286 /*! Set the transmitted ??? (i.e. the one we will send to the far | |
287 end) associated with a T.30 context. | |
288 \brief Set the transmitted ??? associated with a T.30 context. | |
289 \param s The T.30 context. | |
290 \param type The type of address. | |
291 \param address A pointer to the address. | |
292 \param len The length of the address. | |
293 \return 0 for OK, else -1. */ | |
294 SPAN_DECLARE(int) t30_set_tx_cia(t30_state_t *s, int type, const char *address, int len); | |
295 | |
296 /*! Get the received ??? (i.e. the one we will send to the far | |
297 end) associated with a T.30 context. | |
298 \brief Get the received ??? associated with a T.30 context. | |
299 \param s The T.30 context. | |
300 \param type The type of address. | |
301 \param address A pointer to the address. | |
302 \return The length of the address. */ | |
303 SPAN_DECLARE(size_t) t30_get_tx_cia(t30_state_t *s, int *type, const char *address[]); | |
304 | |
305 /*! Get the received ??? (i.e. the one we will send to the far | |
306 end) associated with a T.30 context. | |
307 \brief Get the received ??? associated with a T.30 context. | |
308 \param s The T.30 context. | |
309 \param type The type of address. | |
310 \param address A pointer to the address. | |
311 \return 0 for OK, else -1. */ | |
312 SPAN_DECLARE(size_t) t30_get_rx_cia(t30_state_t *s, int *type, const char *address[]); | |
313 | |
314 /*! Set the transmitted ??? (i.e. the one we will send to the far | |
315 end) associated with a T.30 context. | |
316 \brief Set the transmitted ??? associated with a T.30 context. | |
317 \param s The T.30 context. | |
318 \param type The type of address. | |
319 \param address A pointer to the address. | |
320 \param len The length of the address. | |
321 \return 0 for OK, else -1. */ | |
322 SPAN_DECLARE(int) t30_set_tx_isp(t30_state_t *s, int type, const char *address, int len); | |
323 | |
324 /*! Get the received ??? (i.e. the one we will send to the far | |
325 end) associated with a T.30 context. | |
326 \brief Get the received ??? associated with a T.30 context. | |
327 \param s The T.30 context. | |
328 \param type The type of address. | |
329 \param address A pointer to the address. | |
330 \return 0 for OK, else -1. */ | |
331 SPAN_DECLARE(size_t) t30_get_tx_isp(t30_state_t *s, int *type, const char *address[]); | |
332 | |
333 /*! Get the received ??? (i.e. the one we will send to the far | |
334 end) associated with a T.30 context. | |
335 \brief Get the received ??? associated with a T.30 context. | |
336 \param s The T.30 context. | |
337 \param type The type of address. | |
338 \param address A pointer to the address. | |
339 \return 0 for OK, else -1. */ | |
340 SPAN_DECLARE(size_t) t30_get_rx_isp(t30_state_t *s, int *type, const char *address[]); | |
341 | |
342 /*! Set the transmitted ??? (i.e. the one we will send to the far | |
343 end) associated with a T.30 context. | |
344 \brief Set the transmitted ??? associated with a T.30 context. | |
345 \param s The T.30 context. | |
346 \param type The type of address. | |
347 \param address A pointer to the address. | |
348 \param len The length of the address. | |
349 \return 0 for OK, else -1. */ | |
350 SPAN_DECLARE(int) t30_set_tx_csa(t30_state_t *s, int type, const char *address, int len); | |
351 | |
352 /*! Get the received ??? (i.e. the one we will send to the far | |
353 end) associated with a T.30 context. | |
354 \brief Get the received ??? associated with a T.30 context. | |
355 \param s The T.30 context. | |
356 \param type The type of address. | |
357 \param address A pointer to the address. | |
358 \return The length of the address. */ | |
359 SPAN_DECLARE(size_t) t30_get_tx_csa(t30_state_t *s, int *type, const char *address[]); | |
360 | |
361 /*! Get the received ??? (i.e. the one we will send to the far | |
362 end) associated with a T.30 context. | |
363 \brief Get the received ??? associated with a T.30 context. | |
364 \param s The T.30 context. | |
365 \param type The type of address. | |
366 \param address A pointer to the address. | |
367 \return 0 for OK, else -1. */ | |
368 SPAN_DECLARE(size_t) t30_get_rx_csa(t30_state_t *s, int *type, const char *address[]); | |
369 | |
370 /*! Set the transmitted header information associated with a T.30 context. | |
371 \brief Set the transmitted header information associated with a T.30 context. | |
372 \param s The T.30 context. | |
373 \param info A pointer to the information string. | |
374 \return 0 for OK, else -1. */ | |
375 SPAN_DECLARE(int) t30_set_tx_page_header_info(t30_state_t *s, const char *info); | |
376 | |
377 /*! Get the header information associated with a T.30 context. | |
378 \brief Get the header information associated with a T.30 context. | |
379 \param s The T.30 context. | |
380 \param info A pointer to a buffer for the header information. The buffer | |
381 should be at least 51 bytes long. | |
382 \return the length of the string. */ | |
383 SPAN_DECLARE(size_t) t30_get_tx_page_header_info(t30_state_t *s, char *info); | |
384 | |
385 /*! Get the country of origin of the remote FAX machine associated with a T.30 context. | |
386 \brief Get the country of origin of the remote FAX machine associated with a T.30 context. | |
387 \param s The T.30 context. | |
388 \return a pointer to the country name, or NULL if the country is not known. */ | |
389 SPAN_DECLARE(const char *) t30_get_rx_country(t30_state_t *s); | |
390 | |
391 /*! Get the name of the vendor of the remote FAX machine associated with a T.30 context. | |
392 \brief Get the name of the vendor of the remote FAX machine associated with a T.30 context. | |
393 \param s The T.30 context. | |
394 \return a pointer to the vendor name, or NULL if the vendor is not known. */ | |
395 SPAN_DECLARE(const char *) t30_get_rx_vendor(t30_state_t *s); | |
396 | |
397 /*! Get the name of the model of the remote FAX machine associated with a T.30 context. | |
398 \brief Get the name of the model of the remote FAX machine associated with a T.30 context. | |
399 \param s The T.30 context. | |
400 \return a pointer to the model name, or NULL if the model is not known. */ | |
401 SPAN_DECLARE(const char *) t30_get_rx_model(t30_state_t *s); | |
402 | |
403 /*! Specify the file name of the next TIFF file to be received by a T.30 | |
404 context. | |
405 \brief Set next receive file name. | |
406 \param s The T.30 context. | |
407 \param file The file name | |
408 \param stop_page The maximum page to receive. -1 for no restriction. */ | |
409 SPAN_DECLARE(void) t30_set_rx_file(t30_state_t *s, const char *file, int stop_page); | |
410 | |
411 /*! Specify the file name of the next TIFF file to be transmitted by a T.30 | |
412 context. | |
413 \brief Set next transmit file name. | |
414 \param s The T.30 context. | |
415 \param file The file name | |
416 \param start_page The first page to send. -1 for no restriction. | |
417 \param stop_page The last page to send. -1 for no restriction. */ | |
418 SPAN_DECLARE(void) t30_set_tx_file(t30_state_t *s, const char *file, int start_page, int stop_page); | |
419 | |
420 /*! Set Internet aware FAX (IAF) mode. | |
421 \brief Set Internet aware FAX (IAF) mode. | |
422 \param s The T.30 context. | |
423 \param iaf TRUE for IAF, or FALSE for non-IAF. */ | |
424 SPAN_DECLARE(void) t30_set_iaf_mode(t30_state_t *s, int iaf); | |
425 | |
426 /*! Specify if error correction mode (ECM) is allowed by a T.30 context. | |
427 \brief Select ECM capability. | |
428 \param s The T.30 context. | |
429 \param enabled TRUE for ECM capable, FALSE for not ECM capable. | |
430 \return 0 if OK, else -1. */ | |
431 SPAN_DECLARE(int) t30_set_ecm_capability(t30_state_t *s, int enabled); | |
432 | |
433 /*! Specify the output encoding for TIFF files created during FAX reception. | |
434 \brief Specify the output encoding for TIFF files created during FAX reception. | |
435 \param s The T.30 context. | |
436 \param encoding The coding required. The options are T4_COMPRESSION_ITU_T4_1D, | |
437 T4_COMPRESSION_ITU_T4_2D, T4_COMPRESSION_ITU_T6. T6 is usually the | |
438 densest option, but support for it is broken in a number of software | |
439 packages. | |
440 \return 0 if OK, else -1. */ | |
441 SPAN_DECLARE(int) t30_set_rx_encoding(t30_state_t *s, int encoding); | |
442 | |
443 /*! Specify the minimum scan line time supported by a T.30 context. | |
444 \brief Specify minimum scan line time. | |
445 \param s The T.30 context. | |
446 \param min_time The minimum permitted scan line time, in milliseconds. | |
447 \return 0 if OK, else -1. */ | |
448 SPAN_DECLARE(int) t30_set_minimum_scan_line_time(t30_state_t *s, int min_time); | |
449 | |
450 /*! Specify which modem types are supported by a T.30 context. | |
451 \brief Specify supported modems. | |
452 \param s The T.30 context. | |
453 \param supported_modems Bit field list of the supported modems. | |
454 \return 0 if OK, else -1. */ | |
455 SPAN_DECLARE(int) t30_set_supported_modems(t30_state_t *s, int supported_modems); | |
456 | |
457 /*! Specify which compression types are supported by a T.30 context. | |
458 \brief Specify supported compression types. | |
459 \param s The T.30 context. | |
460 \param supported_compressions Bit field list of the supported compression types. | |
461 \return 0 if OK, else -1. */ | |
462 SPAN_DECLARE(int) t30_set_supported_compressions(t30_state_t *s, int supported_compressions); | |
463 | |
464 /*! Specify which resolutions are supported by a T.30 context. | |
465 \brief Specify supported resolutions. | |
466 \param s The T.30 context. | |
467 \param supported_resolutions Bit field list of the supported resolutions. | |
468 \return 0 if OK, else -1. */ | |
469 SPAN_DECLARE(int) t30_set_supported_resolutions(t30_state_t *s, int supported_resolutions); | |
470 | |
471 /*! Specify which images sizes are supported by a T.30 context. | |
472 \brief Specify supported image sizes. | |
473 \param s The T.30 context. | |
474 \param supported_image_sizes Bit field list of the supported widths and lengths. | |
475 \return 0 if OK, else -1. */ | |
476 SPAN_DECLARE(int) t30_set_supported_image_sizes(t30_state_t *s, int supported_image_sizes); | |
477 | |
478 /*! Specify which special T.30 features are supported by a T.30 context. | |
479 \brief Specify supported T.30 features. | |
480 \param s The T.30 context. | |
481 \param supported_t30_features Bit field list of the supported features. | |
482 \return 0 if OK, else -1. */ | |
483 SPAN_DECLARE(int) t30_set_supported_t30_features(t30_state_t *s, int supported_t30_features); | |
484 | |
485 /*! Set T.30 status. This may be used to adjust the status from within | |
486 the phase B and phase D callbacks. | |
487 \brief Set T.30 status. | |
488 \param s The T.30 context. | |
489 \param status The new status. */ | |
490 SPAN_DECLARE(void) t30_set_status(t30_state_t *s, int status); | |
491 | |
492 /*! Specify a period of responding with receiver not ready. | |
493 \brief Specify a period of responding with receiver not ready. | |
494 \param s The T.30 context. | |
495 \param count The number of times to report receiver not ready. | |
496 \return 0 if OK, else -1. */ | |
497 SPAN_DECLARE(int) t30_set_receiver_not_ready(t30_state_t *s, int count); | |
498 | |
499 /*! Set a callback function for T.30 phase B handling. | |
500 \brief Set a callback function for T.30 phase B handling. | |
501 \param s The T.30 context. | |
502 \param handler The callback function. | |
503 \param user_data An opaque pointer passed to the callback function. */ | |
504 SPAN_DECLARE(void) t30_set_phase_b_handler(t30_state_t *s, t30_phase_b_handler_t *handler, void *user_data); | |
505 | |
506 /*! Set a callback function for T.30 phase D handling. | |
507 \brief Set a callback function for T.30 phase D handling. | |
508 \param s The T.30 context. | |
509 \param handler The callback function. | |
510 \param user_data An opaque pointer passed to the callback function. */ | |
511 SPAN_DECLARE(void) t30_set_phase_d_handler(t30_state_t *s, t30_phase_d_handler_t *handler, void *user_data); | |
512 | |
513 /*! Set a callback function for T.30 phase E handling. | |
514 \brief Set a callback function for T.30 phase E handling. | |
515 \param s The T.30 context. | |
516 \param handler The callback function. | |
517 \param user_data An opaque pointer passed to the callback function. */ | |
518 SPAN_DECLARE(void) t30_set_phase_e_handler(t30_state_t *s, t30_phase_e_handler_t *handler, void *user_data); | |
519 | |
520 /*! Set a callback function for T.30 end of document handling. | |
521 \brief Set a callback function for T.30 end of document handling. | |
522 \param s The T.30 context. | |
523 \param handler The callback function. | |
524 \param user_data An opaque pointer passed to the callback function. */ | |
525 SPAN_DECLARE(void) t30_set_document_handler(t30_state_t *s, t30_document_handler_t *handler, void *user_data); | |
526 | |
527 /*! Set a callback function for T.30 frame exchange monitoring. This is called from the heart | |
528 of the signal processing, so don't take too long in the handler routine. | |
529 \brief Set a callback function for T.30 frame exchange monitoring. | |
530 \param s The T.30 context. | |
531 \param handler The callback function. | |
532 \param user_data An opaque pointer passed to the callback function. */ | |
533 SPAN_DECLARE(void) t30_set_real_time_frame_handler(t30_state_t *s, t30_real_time_frame_handler_t *handler, void *user_data); | |
534 | |
535 /*! Get a pointer to the logging context associated with a T.30 context. | |
536 \brief Get a pointer to the logging context associated with a T.30 context. | |
537 \param s The T.30 context. | |
538 \return A pointer to the logging context, or NULL. | |
539 */ | |
540 SPAN_DECLARE(logging_state_t *) t30_get_logging_state(t30_state_t *s); | |
541 | |
542 #if defined(__cplusplus) | |
543 } | |
544 #endif | |
545 | |
546 #endif | |
547 /*- End of file ------------------------------------------------------------*/ |