1d5ac70f0Sopenharmony_ci/*
2d5ac70f0Sopenharmony_ci *  ALSA lisp implementation
3d5ac70f0Sopenharmony_ci *  Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
4d5ac70f0Sopenharmony_ci *
5d5ac70f0Sopenharmony_ci *
6d5ac70f0Sopenharmony_ci *   This library is free software; you can redistribute it and/or modify
7d5ac70f0Sopenharmony_ci *   it under the terms of the GNU Lesser General Public License as
8d5ac70f0Sopenharmony_ci *   published by the Free Software Foundation; either version 2.1 of
9d5ac70f0Sopenharmony_ci *   the License, or (at your option) any later version.
10d5ac70f0Sopenharmony_ci *
11d5ac70f0Sopenharmony_ci *   This program is distributed in the hope that it will be useful,
12d5ac70f0Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13d5ac70f0Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14d5ac70f0Sopenharmony_ci *   GNU Lesser General Public License for more details.
15d5ac70f0Sopenharmony_ci *
16d5ac70f0Sopenharmony_ci *   You should have received a copy of the GNU Lesser General Public
17d5ac70f0Sopenharmony_ci *   License along with this library; if not, write to the Free Software
18d5ac70f0Sopenharmony_ci *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19d5ac70f0Sopenharmony_ci *
20d5ac70f0Sopenharmony_ci */
21d5ac70f0Sopenharmony_ci
22d5ac70f0Sopenharmony_cistruct alisp_cfg {
23d5ac70f0Sopenharmony_ci	int verbose: 1,
24d5ac70f0Sopenharmony_ci	    warning: 1,
25d5ac70f0Sopenharmony_ci	    debug: 1;
26d5ac70f0Sopenharmony_ci	snd_input_t *in;	/* program code */
27d5ac70f0Sopenharmony_ci	snd_output_t *out;	/* program output */
28d5ac70f0Sopenharmony_ci	snd_output_t *eout;	/* error output */
29d5ac70f0Sopenharmony_ci	snd_output_t *vout;	/* verbose output */
30d5ac70f0Sopenharmony_ci	snd_output_t *wout;	/* warning output */
31d5ac70f0Sopenharmony_ci	snd_output_t *dout;	/* debug output */
32d5ac70f0Sopenharmony_ci};
33d5ac70f0Sopenharmony_ci
34d5ac70f0Sopenharmony_cistruct alisp_instance;
35d5ac70f0Sopenharmony_cistruct alisp_object;
36d5ac70f0Sopenharmony_cistruct alisp_seq_iterator;
37d5ac70f0Sopenharmony_ci
38d5ac70f0Sopenharmony_cistruct alisp_cfg *alsa_lisp_default_cfg(snd_input_t *input);
39d5ac70f0Sopenharmony_civoid alsa_lisp_default_cfg_free(struct alisp_cfg *cfg);
40d5ac70f0Sopenharmony_ciint alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **instance);
41d5ac70f0Sopenharmony_civoid alsa_lisp_free(struct alisp_instance *instance);
42d5ac70f0Sopenharmony_ciint alsa_lisp_function(struct alisp_instance *instance, struct alisp_seq_iterator **result,
43d5ac70f0Sopenharmony_ci		       const char *id, const char *args, ...)
44d5ac70f0Sopenharmony_ci#ifndef DOC_HIDDEN
45d5ac70f0Sopenharmony_ci		       __attribute__ ((format (printf, 4, 5)))
46d5ac70f0Sopenharmony_ci#endif
47d5ac70f0Sopenharmony_ci		       ;
48d5ac70f0Sopenharmony_civoid alsa_lisp_result_free(struct alisp_instance *instance,
49d5ac70f0Sopenharmony_ci			   struct alisp_seq_iterator *result);
50d5ac70f0Sopenharmony_ciint alsa_lisp_seq_first(struct alisp_instance *instance, const char *id,
51d5ac70f0Sopenharmony_ci			struct alisp_seq_iterator **seq);
52d5ac70f0Sopenharmony_ciint alsa_lisp_seq_next(struct alisp_seq_iterator **seq);
53d5ac70f0Sopenharmony_ciint alsa_lisp_seq_count(struct alisp_seq_iterator *seq);
54d5ac70f0Sopenharmony_ciint alsa_lisp_seq_integer(struct alisp_seq_iterator *seq, long *val);
55d5ac70f0Sopenharmony_ciint alsa_lisp_seq_pointer(struct alisp_seq_iterator *seq, const char *ptr_id, void **ptr);
56