diff options
Diffstat (limited to 'src/formats.c')
-rw-r--r-- | src/formats.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/formats.c b/src/formats.c new file mode 100644 index 0000000..1f54c05 --- /dev/null +++ b/src/formats.c @@ -0,0 +1,36 @@ +/* Formats handling */ + +/* + * This file is part of gapk (GSM Audio Pocket Knife). + * + * gapk is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gapk is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gapk. If not, see <http://www.gnu.org/licenses/>. + */ + +#include <stdio.h> /* for NULL */ + +#include <gapk/formats.h> + +/* Extern format descriptors */ +static const struct format_desc *supported_formats[_FMT_MAX] = { + [FMT_INVALID] = NULL, +}; + + +const struct format_desc * +fmt_get_from_type(enum format_type type) +{ + if (type <= FMT_INVALID || type >= _FMT_MAX) + return NULL; + return supported_formats[type]; +} |