diff options
author | Max Kellermann <max@duempel.org> | 2010-11-18 21:44:24 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-11-18 21:44:24 +0100 |
commit | 11613347bedef464029c167116d226ec3fddfdcd (patch) | |
tree | 14ddc1a52d1df90c2cd63ab5316f92254f7b77b5 /src/ape.h | |
parent | 8f46f1520cdb3e3e131b2021ac40325f6bdda2c8 (diff) | |
download | mpd-11613347bedef464029c167116d226ec3fddfdcd.tar.gz mpd-11613347bedef464029c167116d226ec3fddfdcd.tar.xz mpd-11613347bedef464029c167116d226ec3fddfdcd.zip |
tag_ape: move code to ape.c
Generic library for scanning APE tags. Eliminated one "goto"!
Diffstat (limited to 'src/ape.h')
-rw-r--r-- | src/ape.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/ape.h b/src/ape.h new file mode 100644 index 000000000..754b9bb2d --- /dev/null +++ b/src/ape.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2003-2010 The Music Player Daemon Project + * http://www.musicpd.org + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPD_APE_H +#define MPD_APE_H + +#include "check.h" + +#include <stdbool.h> +#include <stddef.h> + +typedef bool (*tag_ape_callback_t)(unsigned long flags, const char *key, + const char *value, size_t value_length, + void *ctx); + +/** + * Scans the APE tag values from a file. + * + * @param path_fs the path of the file in filesystem encoding + * @return false if the file could not be opened or if no APE tag is + * present + */ +bool +tag_ape_scan(const char *path_fs, tag_ape_callback_t callback, void *ctx); + +#endif |