Blame include/input.h

Packit Service db8eaa
/**
Packit Service db8eaa
 * \file include/input.h
Packit Service db8eaa
 * \brief Application interface library for the ALSA driver
Packit Service db8eaa
 * \author Jaroslav Kysela <perex@perex.cz>
Packit Service db8eaa
 * \author Abramo Bagnara <abramo@alsa-project.org>
Packit Service db8eaa
 * \author Takashi Iwai <tiwai@suse.de>
Packit Service db8eaa
 * \date 1998-2001
Packit Service db8eaa
 *
Packit Service db8eaa
 * Application interface library for the ALSA driver
Packit Service db8eaa
 */
Packit Service db8eaa
/*
Packit Service db8eaa
 *   This library is free software; you can redistribute it and/or modify
Packit Service db8eaa
 *   it under the terms of the GNU Lesser General Public License as
Packit Service db8eaa
 *   published by the Free Software Foundation; either version 2.1 of
Packit Service db8eaa
 *   the License, or (at your option) any later version.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   This program is distributed in the hope that it will be useful,
Packit Service db8eaa
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service db8eaa
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service db8eaa
 *   GNU Lesser General Public License for more details.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   You should have received a copy of the GNU Lesser General Public
Packit Service db8eaa
 *   License along with this library; if not, write to the Free Software
Packit Service db8eaa
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit Service db8eaa
 *
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
#ifndef __ALSA_INPUT_H
Packit Service db8eaa
#define __ALSA_INPUT_H
Packit Service db8eaa
Packit Service db8eaa
#ifdef __cplusplus
Packit Service db8eaa
extern "C" {
Packit Service db8eaa
#endif
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 *  \defgroup Input Input Interface
Packit Service db8eaa
 *
Packit Service db8eaa
 *  The input functions present an interface similar to the stdio functions
Packit Service db8eaa
 *  on top of different underlying input sources.
Packit Service db8eaa
 *
Packit Service db8eaa
 *  The #snd_config_load function uses such an input handle to be able to
Packit Service db8eaa
 *  load configurations not only from standard files but also from other
Packit Service db8eaa
 *  sources, e.g. from memory buffers.
Packit Service db8eaa
 *
Packit Service db8eaa
 *  \{
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
/**
Packit Service db8eaa
 * \brief Internal structure for an input object.
Packit Service db8eaa
 *
Packit Service db8eaa
 * The ALSA library uses a pointer to this structure as a handle to an
Packit Service db8eaa
 * input object. Applications don't access its contents directly.
Packit Service db8eaa
 */
Packit Service db8eaa
typedef struct _snd_input snd_input_t;
Packit Service db8eaa
Packit Service db8eaa
/** Input type. */
Packit Service db8eaa
typedef enum _snd_input_type {
Packit Service db8eaa
	/** Input from a stdio stream. */
Packit Service db8eaa
	SND_INPUT_STDIO,
Packit Service db8eaa
	/** Input from a memory buffer. */
Packit Service db8eaa
	SND_INPUT_BUFFER
Packit Service db8eaa
} snd_input_type_t;
Packit Service db8eaa
Packit Service db8eaa
int snd_input_stdio_open(snd_input_t **inputp, const char *file, const char *mode);
Packit Service db8eaa
int snd_input_stdio_attach(snd_input_t **inputp, FILE *fp, int _close);
Packit Service db8eaa
int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, ssize_t size);
Packit Service db8eaa
int snd_input_close(snd_input_t *input);
Packit Service db8eaa
int snd_input_scanf(snd_input_t *input, const char *format, ...)
Packit Service db8eaa
#ifndef DOC_HIDDEN
Packit Service db8eaa
	__attribute__ ((format (scanf, 2, 3)))
Packit Service db8eaa
#endif
Packit Service db8eaa
	;
Packit Service db8eaa
char *snd_input_gets(snd_input_t *input, char *str, size_t size);
Packit Service db8eaa
int snd_input_getc(snd_input_t *input);
Packit Service db8eaa
int snd_input_ungetc(snd_input_t *input, int c);
Packit Service db8eaa
Packit Service db8eaa
/** \} */
Packit Service db8eaa
Packit Service db8eaa
#ifdef __cplusplus
Packit Service db8eaa
}
Packit Service db8eaa
#endif
Packit Service db8eaa
Packit Service db8eaa
#endif /* __ALSA_INPUT_H */