2009-03-13 18:43:16 +01:00
|
|
|
/*
|
2013-07-28 20:25:45 +02:00
|
|
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
2009-03-13 18:43:16 +01:00
|
|
|
* http://www.musicpd.org
|
2008-08-29 09:38:27 +02:00
|
|
|
*
|
|
|
|
* 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.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* 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.
|
2008-08-29 09:38:27 +02:00
|
|
|
*/
|
|
|
|
|
2013-07-28 20:25:45 +02:00
|
|
|
#ifndef MPD_TAG_ID3_HXX
|
|
|
|
#define MPD_TAG_ID3_HXX
|
2008-08-29 09:38:27 +02:00
|
|
|
|
2009-11-12 09:12:38 +01:00
|
|
|
#include "check.h"
|
2013-10-15 09:21:13 +02:00
|
|
|
#include "Compiler.h"
|
2008-08-29 09:38:27 +02:00
|
|
|
|
2013-10-26 15:14:54 +02:00
|
|
|
class Path;
|
2012-02-11 19:12:02 +01:00
|
|
|
struct tag_handler;
|
2013-07-30 20:11:57 +02:00
|
|
|
struct Tag;
|
|
|
|
struct id3_tag;
|
2013-08-10 18:02:44 +02:00
|
|
|
class Error;
|
2008-08-29 09:38:27 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_ID3TAG
|
2012-02-11 19:12:02 +01:00
|
|
|
|
|
|
|
bool
|
2013-10-26 15:14:54 +02:00
|
|
|
tag_id3_scan(Path path_fs,
|
2012-02-11 19:12:02 +01:00
|
|
|
const struct tag_handler *handler, void *handler_ctx);
|
|
|
|
|
2013-07-30 20:11:57 +02:00
|
|
|
Tag *
|
|
|
|
tag_id3_import(struct id3_tag *);
|
2008-08-29 09:38:27 +02:00
|
|
|
|
2012-04-23 22:51:45 +02:00
|
|
|
/**
|
|
|
|
* Loads the ID3 tags from the file into a libid3tag object. The
|
|
|
|
* return value must be freed with id3_tag_delete().
|
|
|
|
*
|
|
|
|
* @return NULL on error or if no ID3 tag was found in the file (no
|
2013-08-10 18:02:44 +02:00
|
|
|
* Error will be set)
|
2012-04-23 22:51:45 +02:00
|
|
|
*/
|
|
|
|
struct id3_tag *
|
2013-10-26 15:14:54 +02:00
|
|
|
tag_id3_load(Path path_fs, Error &error);
|
2008-10-17 21:13:23 +02:00
|
|
|
|
2012-10-27 11:42:34 +02:00
|
|
|
/**
|
|
|
|
* Import all tags from the provided id3_tag *tag
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
scan_id3_tag(struct id3_tag *tag,
|
|
|
|
const struct tag_handler *handler, void *handler_ctx);
|
|
|
|
|
2012-04-23 22:51:45 +02:00
|
|
|
#else
|
2008-10-17 21:13:23 +02:00
|
|
|
|
2013-10-26 15:14:54 +02:00
|
|
|
#include "fs/Path.hxx"
|
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
static inline bool
|
2013-10-26 15:14:54 +02:00
|
|
|
tag_id3_scan(gcc_unused Path path_fs,
|
2012-08-02 18:15:49 +02:00
|
|
|
gcc_unused const struct tag_handler *handler,
|
|
|
|
gcc_unused void *handler_ctx)
|
2012-02-11 19:12:02 +01:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2008-10-17 21:13:23 +02:00
|
|
|
#endif
|
|
|
|
|
2008-08-29 09:38:27 +02:00
|
|
|
#endif
|