Blame include/input.h

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