/usr/include/taglib/tag_c.h is in libtagc0-dev 1.7-1ubuntu5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | /***************************************************************************
copyright : (C) 2003 by Scott Wheeler
email : wheeler@kde.org
***************************************************************************/
/***************************************************************************
* This library is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License version *
* 2.1 as published by the Free Software Foundation. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
***************************************************************************/
#ifndef TAGLIB_TAG_C
#define TAGLIB_TAG_C
/* Do not include this in the main TagLib documentation. */
#ifndef DO_NOT_DOCUMENT
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_WIN32) || defined(_WIN64)
#ifdef MAKE_TAGLIB_C_LIB
#define TAGLIB_C_EXPORT __declspec(dllexport)
#else
#define TAGLIB_C_EXPORT __declspec(dllimport)
#endif
#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1)
#define TAGLIB_C_EXPORT __attribute__ ((visibility("default")))
#else
#define TAGLIB_C_EXPORT
#endif
#ifndef BOOL
#define BOOL int
#endif
/*******************************************************************************
* [ TagLib C Binding ]
*
* This is an interface to TagLib's "simple" API, meaning that you can read and
* modify media files in a generic, but not specialized way. This is a rough
* representation of TagLib::File and TagLib::Tag, for which the documentation
* is somewhat more complete and worth consulting.
*******************************************************************************/
/*
* These are used for type provide some type safety to the C API (as opposed to
* using void *, but pointers to them are simply cast to the corresponding C++
* types in the implementation.
*/
typedef struct { int dummy; } TagLib_File;
typedef struct { int dummy; } TagLib_Tag;
typedef struct { int dummy; } TagLib_AudioProperties;
/*!
* By default all strings coming into or out of TagLib's C API are in UTF8.
* However, it may be desirable for TagLib to operate on Latin1 (ISO-8859-1)
* strings in which case this should be set to FALSE.
*/
TAGLIB_C_EXPORT void taglib_set_strings_unicode(BOOL unicode);
/*!
* TagLib can keep track of strings that are created when outputting tag values
* and clear them using taglib_tag_clear_strings(). This is enabled by default.
* However if you wish to do more fine grained management of strings, you can do
* so by setting \a management to FALSE.
*/
TAGLIB_C_EXPORT void taglib_set_string_management_enabled(BOOL management);
/*******************************************************************************
* File API
******************************************************************************/
typedef enum {
TagLib_File_MPEG,
TagLib_File_OggVorbis,
TagLib_File_FLAC,
TagLib_File_MPC,
TagLib_File_OggFlac,
TagLib_File_WavPack,
TagLib_File_Speex,
TagLib_File_TrueAudio,
TagLib_File_MP4,
TagLib_File_ASF
} TagLib_File_Type;
/*!
* Creates a TagLib file based on \a filename. TagLib will try to guess the file
* type.
*
* \returns NULL if the file type cannot be determined or the file cannot
* be opened.
*/
TAGLIB_C_EXPORT TagLib_File *taglib_file_new(const char *filename);
/*!
* Creates a TagLib file based on \a filename. Rather than attempting to guess
* the type, it will use the one specified by \a type.
*/
TAGLIB_C_EXPORT TagLib_File *taglib_file_new_type(const char *filename, TagLib_File_Type type);
/*!
* Frees and closes the file.
*/
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.
*/
TAGLIB_C_EXPORT TagLib_Tag *taglib_file_tag(const TagLib_File *file);
/*!
* Returns a pointer to the the audio properties associated with this file. This
* will be freed automatically when the file is freed.
*/
TAGLIB_C_EXPORT const TagLib_AudioProperties *taglib_file_audioproperties(const TagLib_File *file);
/*!
* Saves the \a file to disk.
*/
TAGLIB_C_EXPORT BOOL taglib_file_save(TagLib_File *file);
/******************************************************************************
* Tag API
******************************************************************************/
/*!
* Returns a string with this tag's title.
*
* \note By default this string should be UTF8 encoded and its memory should be
* freed using taglib_tag_free_strings().
*/
TAGLIB_C_EXPORT char *taglib_tag_title(const TagLib_Tag *tag);
/*!
* Returns a string with this tag's artist.
*
* \note By default this string should be UTF8 encoded and its memory should be
* freed using taglib_tag_free_strings().
*/
TAGLIB_C_EXPORT char *taglib_tag_artist(const TagLib_Tag *tag);
/*!
* Returns a string with this tag's album name.
*
* \note By default this string should be UTF8 encoded and its memory should be
* freed using taglib_tag_free_strings().
*/
TAGLIB_C_EXPORT char *taglib_tag_album(const TagLib_Tag *tag);
/*!
* Returns a string with this tag's comment.
*
* \note By default this string should be UTF8 encoded and its memory should be
* freed using taglib_tag_free_strings().
*/
TAGLIB_C_EXPORT char *taglib_tag_comment(const TagLib_Tag *tag);
/*!
* Returns a string with this tag's genre.
*
* \note By default this string should be UTF8 encoded and its memory should be
* freed using taglib_tag_free_strings().
*/
TAGLIB_C_EXPORT char *taglib_tag_genre(const TagLib_Tag *tag);
/*!
* Returns the tag's year or 0 if year is not set.
*/
TAGLIB_C_EXPORT unsigned int taglib_tag_year(const TagLib_Tag *tag);
/*!
* Returns the tag's track number or 0 if track number is not set.
*/
TAGLIB_C_EXPORT unsigned int taglib_tag_track(const TagLib_Tag *tag);
/*!
* Sets the tag's title.
*
* \note By default this string should be UTF8 encoded.
*/
TAGLIB_C_EXPORT void taglib_tag_set_title(TagLib_Tag *tag, const char *title);
/*!
* Sets the tag's artist.
*
* \note By default this string should be UTF8 encoded.
*/
TAGLIB_C_EXPORT void taglib_tag_set_artist(TagLib_Tag *tag, const char *artist);
/*!
* Sets the tag's album.
*
* \note By default this string should be UTF8 encoded.
*/
TAGLIB_C_EXPORT void taglib_tag_set_album(TagLib_Tag *tag, const char *album);
/*!
* Sets the tag's comment.
*
* \note By default this string should be UTF8 encoded.
*/
TAGLIB_C_EXPORT void taglib_tag_set_comment(TagLib_Tag *tag, const char *comment);
/*!
* Sets the tag's genre.
*
* \note By default this string should be UTF8 encoded.
*/
TAGLIB_C_EXPORT void taglib_tag_set_genre(TagLib_Tag *tag, const char *genre);
/*!
* Sets the tag's year. 0 indicates that this field should be cleared.
*/
TAGLIB_C_EXPORT void taglib_tag_set_year(TagLib_Tag *tag, unsigned int year);
/*!
* Sets the tag's track number. 0 indicates that this field should be cleared.
*/
TAGLIB_C_EXPORT void taglib_tag_set_track(TagLib_Tag *tag, unsigned int track);
/*!
* Frees all of the strings that have been created by the tag.
*/
TAGLIB_C_EXPORT void taglib_tag_free_strings(void);
/******************************************************************************
* Audio Properties API
******************************************************************************/
/*!
* Returns the length of the file in seconds.
*/
TAGLIB_C_EXPORT int taglib_audioproperties_length(const TagLib_AudioProperties *audioProperties);
/*!
* Returns the bitrate of the file in kb/s.
*/
TAGLIB_C_EXPORT int taglib_audioproperties_bitrate(const TagLib_AudioProperties *audioProperties);
/*!
* Returns the sample rate of the file in Hz.
*/
TAGLIB_C_EXPORT int taglib_audioproperties_samplerate(const TagLib_AudioProperties *audioProperties);
/*!
* Returns the number of channels in the audio stream.
*/
TAGLIB_C_EXPORT int taglib_audioproperties_channels(const TagLib_AudioProperties *audioProperties);
/*******************************************************************************
* Special convenience ID3v2 functions
*******************************************************************************/
typedef enum {
TagLib_ID3v2_Latin1,
TagLib_ID3v2_UTF16,
TagLib_ID3v2_UTF16BE,
TagLib_ID3v2_UTF8
} TagLib_ID3v2_Encoding;
/*!
* This sets the default encoding for ID3v2 frames that are written to tags.
*/
TAGLIB_C_EXPORT void taglib_id3v2_set_default_text_encoding(TagLib_ID3v2_Encoding encoding);
#ifdef __cplusplus
}
#endif
#endif /* DO_NOT_DOCUMENT */
#endif
|