Add a C accessor to isValid()

BUG:153944


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@766868 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2008-01-26 20:20:40 +00:00
parent fdbfa6d6f6
commit d8e6b9f4ee
2 changed files with 12 additions and 0 deletions

View File

@ -90,6 +90,11 @@ void taglib_file_free(TagLib_File *file)
delete reinterpret_cast<File *>(file);
}
BOOL taglib_file_is_valid(const TagLib_File *file)
{
return reinterpret_cast<const File *>(file)->isValid();
}
TagLib_Tag *taglib_file_tag(const TagLib_File *file)
{
const File *f = reinterpret_cast<const File *>(file);

View File

@ -112,6 +112,13 @@ TAGLIB_C_EXPORT TagLib_File *taglib_file_new_type(const char *filename, TagLib_F
*/
TAGLIB_C_EXPORT void taglib_file_free(TagLib_File *file);
/*!
* Returns true if the file is open and readble and valid information for
* the Tag and / or AudioProperties was found.
*/
TAGLIB_C_EXPORT BOOL taglib_file_is_valid(const TagLib_File *file);
/*!
* Returns a pointer to the tag associated with this file. This will be freed
* automatically when the file is freed.