id3lib 3.8.3

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

helpers.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: helpers.h,v 1.9 2002/07/02 22:10:45 t1mpy Exp $
3
4 // id3lib: a C++ library for creating and manipulating id3v1/v2 tags
5 // Copyright 1999, 2000 Scott Thomas Haug
6
7 // This library is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU Library General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or (at your
10 // option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Library General Public License
18 // along with this library; if not, write to the Free Software Foundation,
19 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 // The id3lib authors encourage improvements and optimisations to be sent to
22 // the id3lib coordinator. Please see the README file for details on where to
23 // send such submissions. See the AUTHORS file for a list of people who have
24 // contributed to id3lib. See the ChangeLog file for a list of changes to
25 // id3lib. These files are distributed with id3lib at
26 // http://download.sourceforge.net/id3lib/
27
28 #ifndef _ID3LIB_HELPERS_H_
29 #define _ID3LIB_HELPERS_H_
30
31 #include "id3/id3lib_strings.h"
32 #include "id3/globals.h" //has <stdlib.h> "id3/sized_types.h"
33
34 class ID3_TagImpl;
35 class ID3_Frame;
36
37 namespace dami
38 {
39 namespace id3
40 {
41 namespace v2
42 {
43 ID3_C_EXPORT String getString(const ID3_Frame*, ID3_FieldID);
44 ID3_C_EXPORT String getStringAtIndex(const ID3_Frame*, ID3_FieldID, size_t);
45
46 ID3_C_EXPORT String getFrameText(const ID3_TagImpl&, ID3_FrameID);
47 ID3_C_EXPORT ID3_Frame* setFrameText(ID3_TagImpl&, ID3_FrameID, String);
48 ID3_C_EXPORT size_t removeFrames(ID3_TagImpl&, ID3_FrameID);
49
50 ID3_C_EXPORT ID3_Frame* hasArtist(const ID3_TagImpl&);
51 ID3_C_EXPORT String getArtist(const ID3_TagImpl&);
52 ID3_C_EXPORT ID3_Frame* setArtist(ID3_TagImpl&, String);
53 ID3_C_EXPORT size_t removeArtists(ID3_TagImpl&);
54
55 ID3_C_EXPORT ID3_Frame* hasAlbum(const ID3_TagImpl&);
56 ID3_C_EXPORT String getAlbum(const ID3_TagImpl&);
57 ID3_C_EXPORT ID3_Frame* setAlbum(ID3_TagImpl&, String);
58 ID3_C_EXPORT size_t removeAlbums(ID3_TagImpl&);
59
60 ID3_C_EXPORT ID3_Frame* hasTitle(const ID3_TagImpl&);
61 ID3_C_EXPORT String getTitle(const ID3_TagImpl&);
62 ID3_C_EXPORT ID3_Frame* setTitle(ID3_TagImpl&, String);
63 ID3_C_EXPORT size_t removeTitles(ID3_TagImpl&);
64
65 ID3_C_EXPORT ID3_Frame* hasYear(const ID3_TagImpl&);
66 ID3_C_EXPORT String getYear(const ID3_TagImpl&);
67 ID3_C_EXPORT ID3_Frame* setYear(ID3_TagImpl&, String);
68 ID3_C_EXPORT size_t removeYears(ID3_TagImpl&);
69
70 ID3_C_EXPORT ID3_Frame* hasV1Comment(const ID3_TagImpl&);
71 // ID3_C_EXPORT ID3_Frame* hasComment(const ID3_TagImpl&, String desc);
72 ID3_C_EXPORT ID3_Frame* hasComment(const ID3_TagImpl&);
73 ID3_C_EXPORT String getComment(const ID3_TagImpl&, String desc);
74 ID3_C_EXPORT String getV1Comment(const ID3_TagImpl&);
75 ID3_C_EXPORT ID3_Frame* setComment(ID3_TagImpl&, String, String, String);
76 ID3_C_EXPORT size_t removeComments(ID3_TagImpl&, String);
77 ID3_C_EXPORT size_t removeAllComments(ID3_TagImpl&);
78
79 ID3_C_EXPORT ID3_Frame* hasTrack(const ID3_TagImpl&);
80 ID3_C_EXPORT String getTrack(const ID3_TagImpl&);
81 ID3_C_EXPORT size_t getTrackNum(const ID3_TagImpl&);
82 ID3_C_EXPORT ID3_Frame* setTrack(ID3_TagImpl&, uchar ucTrack, uchar ucTotal);
83 ID3_C_EXPORT size_t removeTracks(ID3_TagImpl&);
84
85 ID3_C_EXPORT ID3_Frame* hasGenre(const ID3_TagImpl&);
86 ID3_C_EXPORT String getGenre(const ID3_TagImpl&);
87 ID3_C_EXPORT size_t getGenreNum(const ID3_TagImpl&);
88 ID3_C_EXPORT ID3_Frame* setGenre(ID3_TagImpl&, size_t ucGenre);
89 ID3_C_EXPORT size_t removeGenres(ID3_TagImpl&);
90
91 ID3_C_EXPORT ID3_Frame* hasLyrics(const ID3_TagImpl&);
92 ID3_C_EXPORT String getLyrics(const ID3_TagImpl&);
93 ID3_C_EXPORT ID3_Frame* setLyrics(ID3_TagImpl&, String, String, String);
94 ID3_C_EXPORT size_t removeLyrics(ID3_TagImpl&);
95
96 ID3_C_EXPORT String getLyricist(const ID3_TagImpl&);
97 ID3_C_EXPORT ID3_Frame* setLyricist(ID3_TagImpl&, String);
98 ID3_C_EXPORT size_t removeLyricists(ID3_TagImpl&);
99
100 ID3_C_EXPORT ID3_Frame* hasSyncLyrics(const ID3_TagImpl&, String lang, String desc);
101 ID3_C_EXPORT ID3_Frame* setSyncLyrics(ID3_TagImpl&, BString, ID3_TimeStampFormat,
102 String, String, ID3_ContentType);
103 ID3_C_EXPORT BString getSyncLyrics(const ID3_TagImpl& tag, String lang, String desc);
104 };
105 };
106 };
107
108 #endif /* _ID3LIB_HELPERS_H_ */
109
dami::id3::v2::getArtist
ID3_C_EXPORT String getArtist(const ID3_TagImpl &)
Definition: helpers.cpp:130
dami::id3::v2::getTitle
ID3_C_EXPORT String getTitle(const ID3_TagImpl &)
Definition: helpers.cpp:188
dami::id3::v2::removeGenres
ID3_C_EXPORT size_t removeGenres(ID3_TagImpl &)
Definition: helpers.cpp:421
dami::id3::v2::hasTitle
ID3_C_EXPORT ID3_Frame * hasTitle(const ID3_TagImpl &)
Definition: helpers.cpp:182
dami::String
std::basic_string< char > String
Definition: id3lib_strings.h:198
dami::id3::v2::removeYears
ID3_C_EXPORT size_t removeYears(ID3_TagImpl &)
Definition: helpers.cpp:221
ID3_TagImpl
Definition: tag_impl.h:73
ID3_ContentType
ID3_ContentType
Definition: globals.h:381
dami::id3::v2::removeLyricists
ID3_C_EXPORT size_t removeLyricists(ID3_TagImpl &)
Definition: helpers.cpp:488
dami::id3::v2::getYear
ID3_C_EXPORT String getYear(const ID3_TagImpl &)
Definition: helpers.cpp:211
dami::id3::v2::getGenreNum
ID3_C_EXPORT size_t getGenreNum(const ID3_TagImpl &)
Definition: helpers.cpp:388
dami::id3::v2::hasAlbum
ID3_C_EXPORT ID3_Frame * hasAlbum(const ID3_TagImpl &)
Definition: helpers.cpp:159
dami::id3::v2::getAlbum
ID3_C_EXPORT String getAlbum(const ID3_TagImpl &)
Definition: helpers.cpp:165
dami::id3::v2::getFrameText
ID3_C_EXPORT String getFrameText(const ID3_TagImpl &, ID3_FrameID)
Definition: helpers.cpp:99
dami::id3::v2::hasTrack
ID3_C_EXPORT ID3_Frame * hasTrack(const ID3_TagImpl &)
Definition: helpers.cpp:339
dami::id3::v2::setSyncLyrics
ID3_C_EXPORT ID3_Frame * setSyncLyrics(ID3_TagImpl &, BString, ID3_TimeStampFormat, String, String, ID3_ContentType)
Definition: helpers.cpp:503
dami::id3::v2::getLyricist
ID3_C_EXPORT String getLyricist(const ID3_TagImpl &)
Definition: helpers.cpp:478
dami::id3::v2::setAlbum
ID3_C_EXPORT ID3_Frame * setAlbum(ID3_TagImpl &, String)
Definition: helpers.cpp:170
dami::id3::v2::removeTitles
ID3_C_EXPORT size_t removeTitles(ID3_TagImpl &)
Definition: helpers.cpp:198
id3lib_strings.h
ID3_FrameID
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
Definition: globals.h:229
globals.h
uchar
unsigned char uchar
Definition: globals.h:114
dami::id3::v2::setTrack
ID3_C_EXPORT ID3_Frame * setTrack(ID3_TagImpl &, uchar ucTrack, uchar ucTotal)
Definition: helpers.cpp:356
dami::id3::v2::setYear
ID3_C_EXPORT ID3_Frame * setYear(ID3_TagImpl &, String)
Definition: helpers.cpp:216
dami::id3::v2::removeArtists
ID3_C_EXPORT size_t removeArtists(ID3_TagImpl &)
Definition: helpers.cpp:142
dami::id3::v2::getStringAtIndex
ID3_C_EXPORT String getStringAtIndex(const ID3_Frame *, ID3_FieldID, size_t)
Definition: helpers.cpp:63
dami::id3::v2::removeTracks
ID3_C_EXPORT size_t removeTracks(ID3_TagImpl &)
Definition: helpers.cpp:370
dami::id3::v2::removeAllComments
ID3_C_EXPORT size_t removeAllComments(ID3_TagImpl &)
Definition: helpers.cpp:303
dami::id3::v2::getSyncLyrics
ID3_C_EXPORT BString getSyncLyrics(const ID3_TagImpl &tag, String lang, String desc)
Definition: helpers.cpp:527
dami::BString
std::basic_string< unsigned char > BString
Definition: id3lib_strings.h:199
dami::id3::v2::getTrackNum
ID3_C_EXPORT size_t getTrackNum(const ID3_TagImpl &)
Definition: helpers.cpp:350
dami::id3::v2::getComment
ID3_C_EXPORT String getComment(const ID3_TagImpl &, String desc)
Definition: helpers.cpp:252
dami::id3::v2::hasLyrics
ID3_C_EXPORT ID3_Frame * hasLyrics(const ID3_TagImpl &)
Definition: helpers.cpp:428
dami::id3::v2::removeComments
ID3_C_EXPORT size_t removeComments(ID3_TagImpl &, String)
Definition: helpers.cpp:309
dami::id3::v2::hasArtist
ID3_C_EXPORT ID3_Frame * hasArtist(const ID3_TagImpl &)
Definition: helpers.cpp:120
dami::id3::v2::getString
ID3_C_EXPORT String getString(const ID3_Frame *, ID3_FieldID)
Definition: helpers.cpp:43
dami::id3::v2::hasYear
ID3_C_EXPORT ID3_Frame * hasYear(const ID3_TagImpl &)
Definition: helpers.cpp:205
dami::id3::v2::setGenre
ID3_C_EXPORT ID3_Frame * setGenre(ID3_TagImpl &, size_t ucGenre)
Definition: helpers.cpp:414
dami::id3::v2::getTrack
ID3_C_EXPORT String getTrack(const ID3_TagImpl &)
Definition: helpers.cpp:345
ID3_C_EXPORT
#define ID3_C_EXPORT
This file defines common macros, types, constants, and enums used throughout id3lib.
Definition: globals.h:78
ID3_Frame
The representative class of an id3v2 frame.
Definition: id3lib_frame.h:38
dami::id3::v2::removeAlbums
ID3_C_EXPORT size_t removeAlbums(ID3_TagImpl &)
Definition: helpers.cpp:175
ID3_TimeStampFormat
ID3_TimeStampFormat
Definition: globals.h:417
dami::id3::v2::getLyrics
ID3_C_EXPORT String getLyrics(const ID3_TagImpl &)
Definition: helpers.cpp:434
dami::id3::v2::getV1Comment
ID3_C_EXPORT String getV1Comment(const ID3_TagImpl &)
Definition: helpers.cpp:243
dami::id3::v2::hasSyncLyrics
ID3_C_EXPORT ID3_Frame * hasSyncLyrics(const ID3_TagImpl &, String lang, String desc)
Definition: helpers.cpp:495
dami::id3::v2::removeFrames
ID3_C_EXPORT size_t removeFrames(ID3_TagImpl &, ID3_FrameID)
Definition: helpers.cpp:84
dami::id3::v2::setLyricist
ID3_C_EXPORT ID3_Frame * setLyricist(ID3_TagImpl &, String)
Definition: helpers.cpp:483
dami::id3::v2::setArtist
ID3_C_EXPORT ID3_Frame * setArtist(ID3_TagImpl &, String)
Definition: helpers.cpp:136
dami::id3::v2::hasGenre
ID3_C_EXPORT ID3_Frame * hasGenre(const ID3_TagImpl &)
Definition: helpers.cpp:377
dami::id3::v2::getGenre
ID3_C_EXPORT String getGenre(const ID3_TagImpl &)
Definition: helpers.cpp:383
dami::id3::v2::setComment
ID3_C_EXPORT ID3_Frame * setComment(ID3_TagImpl &, String, String, String)
Definition: helpers.cpp:258
dami::id3::v2::setTitle
ID3_C_EXPORT ID3_Frame * setTitle(ID3_TagImpl &, String)
Definition: helpers.cpp:193
dami::id3::v2::hasComment
ID3_C_EXPORT ID3_Frame * hasComment(const ID3_TagImpl &)
Definition: helpers.cpp:237
dami::id3::v2::hasV1Comment
ID3_C_EXPORT ID3_Frame * hasV1Comment(const ID3_TagImpl &)
Definition: helpers.cpp:228
dami::id3::v2::removeLyrics
ID3_C_EXPORT size_t removeLyrics(ID3_TagImpl &)
Definition: helpers.cpp:473
ID3_FieldID
ID3_FieldID
Enumeration of the different types of fields in a frame.
Definition: globals.h:197
dami::id3::v2::setLyrics
ID3_C_EXPORT ID3_Frame * setLyrics(ID3_TagImpl &, String, String, String)
Definition: helpers.cpp:439
dami::id3::v2::setFrameText
ID3_C_EXPORT ID3_Frame * setFrameText(ID3_TagImpl &, ID3_FrameID, String)
Definition: helpers.cpp:105