updated swedish translation from peppo
[ardour.git] / libs / taglib / taglib / toolkit / taglib.h
1 /***************************************************************************
2     copyright            : (C) 2002 - 2008 by Scott Wheeler
3     email                : wheeler@kde.org
4  ***************************************************************************/
5
6 /***************************************************************************
7  *   This library is free software; you can redistribute it and/or modify  *
8  *   it under the terms of the GNU Lesser General Public License version   *
9  *   2.1 as published by the Free Software Foundation.                     *
10  *                                                                         *
11  *   This library is distributed in the hope that it will be useful, but   *
12  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
13  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
14  *   Lesser General Public License for more details.                       *
15  *                                                                         *
16  *   You should have received a copy of the GNU Lesser General Public      *
17  *   License along with this library; if not, write to the Free Software   *
18  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  *
19  *   USA                                                                   *
20  *                                                                         *
21  *   Alternatively, this file is available under the Mozilla Public        *
22  *   License Version 1.1.  You may obtain a copy of the License at         *
23  *   http://www.mozilla.org/MPL/                                           *
24  ***************************************************************************/
25
26 #ifndef TAGLIB_H
27 #define TAGLIB_H
28
29 #define TAGLIB_MAJOR_VERSION 1
30 #define TAGLIB_MINOR_VERSION 5
31 #define TAGLIB_PATCH_VERSION 0
32
33 #include <string>
34
35 //! A namespace for all TagLib related classes and functions
36
37 /*!
38  * This namespace contains everything in TagLib.  For projects working with
39  * TagLib extensively it may be conveniten to add a
40  * \code
41  * using namespace TagLib;
42  * \endcode
43  */
44
45 namespace TagLib {
46
47   class String;
48
49   typedef wchar_t wchar;
50   typedef unsigned char uchar;
51   typedef unsigned int  uint;
52   typedef unsigned long ulong;
53
54   /*!
55    * Unfortunately std::wstring isn't defined on some systems, (i.e. GCC < 3)
56    * so I'm providing something here that should be constant.
57    */
58   typedef std::basic_string<wchar> wstring;
59
60 #ifndef DO_NOT_DOCUMENT // Tell Doxygen to skip this class.
61   /*!
62    * \internal
63    * This is just used as a base class for shared classes in TagLib.
64    *
65    * \warning This <b>is not</b> part of the TagLib public API!
66    */
67
68   class RefCounter
69   {
70   public:
71     RefCounter() : refCount(1) {}
72     void ref() { refCount++; }
73     bool deref() { return ! --refCount ; }
74     int count() { return refCount; }
75   private:
76     uint refCount;
77   };
78
79 #endif // DO_NOT_DOCUMENT
80
81 }
82
83 /*!
84  * \mainpage TagLib
85  *
86  * \section intro Introduction
87  *
88  * TagLib is a library for reading and editing audio meta data, commonly know as \e tags.
89  *
90  * Features:
91  * - A clean, high level, C++ API to handling audio meta data.
92  * - Format specific APIs for advanced API users.
93  * - ID3v1, ID3v2, APE, FLAC and Xiph tag formats.
94  * - MP3, MPC, FLAC, Ogg FLAC, Ogg Vorbis and Speex file formats.
95  * - Basic audio file properties such as length, sample rate, etc.
96  * - Long term binary and source compatibility.
97  * - Extensible design, notably the ability to add other formats or extend current formats as a library user.
98  * - Full support for unicode and internationalized tags.
99  * - Dual <a href="http://www.mozilla.org/MPL/MPL-1.1.html">MPL</a> and
100  *   <a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html">LGPL</a> licenses.
101  * - No external toolkit dependancies.
102  *
103  * \section why Why TagLib?
104  *
105  * TagLib originally was written to provide an updated and improved ID3v2 implementation in C++ for use
106  * in a variety of Open Source projects.  Since development began in 2002 and the 1.0 release in 2004
107  * it has expanded to cover a wide variety of tag and file formats and is used in a wide variety of
108  * Open Source and proprietary applications.  It now supports a variety of UNIXes, including Apple's OS
109  * X, as well as Microsoft Windows.
110  *
111  * \section commercial Usage in Commercial Applications
112  *
113  * TagLib's licenses \e do allow usage within propriety (\e closed) applications, however TagLib is \e not
114  * public domain.  Please note the requirements of the LGPL or MPL, and adhere to at least one of them.
115  * In simple terms, you must at a minimum note your usage of TagLib, note the licensing terms of TagLib and
116  * if you make changes to TagLib publish them.  Please review the licenses above before using TagLib in your
117  * software.  Note that you may choose either the MPL or the LGPL, you do not have to fulfill the
118  * requirements of both.
119  *
120  * \section installing Installing TagLib
121  *
122  * Please see the <a href="http://developer.kde.org/~wheeler/taglib.html">TagLib website</a> for the latest
123  * downloads.
124  *
125  * Instructions for installing TagLib vary per platform, but generally speaking on UNIX standard configure and
126  * make commands are provided.  TagLib installs a taglib-config and package-config file to make it easier to
127  * integrate into various build systems.  Note that TagLib's include install directory \e must be included in
128  * the header include path.  Simply adding <taglib/tag.h> will \e not work.
129  *
130  * On Windows, TagLib can be built using the CMake build systems.
131  *
132  * \section start Getting Started
133  *
134  * TagLib provides both simple, abstract APIs which make it possible to ignore the differences between tagging
135  * formats and format specific APIs which allow programmers to work with the features of specific tagging
136  * schemes.  There is a similar abstraction mechanism for AudioProperties.
137  *
138  * The best place to start is with the <b>Class Hierarchy</b> linked at the top of the page.  The File and
139  * AudioProperties classes and their subclasses are the core of TagLib.  The FileRef class is also a convenient
140  * way for using a value-based handle.
141  *
142  * \note When working with FileRef please consider that it has only the most basic (extension-based) file
143  * type resolution.  Please see its documentation on how to plug in more advanced file type resolution.  (Such
144  * resolution may be part of later TagLib releases by default.)
145  *
146  * Here's a very simple example with TagLib:
147  *
148  * \code
149  *
150  * TagLib::FileRef f("Latex Solar Beef.mp3");
151  * TagLib::String artist = f.tag()->artist(); // artist == "Frank Zappa"
152  *
153  * f.tag()->setAlbum("Fillmore East");
154  * f.save();
155  *
156  * TagLib::FileRef g("Free City Rhymes.ogg");
157  * TagLib::String album = g.tag()->album(); // album == "NYC Ghosts & Flowers"
158  *
159  * g.tag()->setTrack(1);
160  * g.save();
161  *
162  * \endcode
163  *
164  * More examples can be found in the \e examples directory of the source distribution.
165  *
166  * \section Contact
167  *
168  * Questions about TagLib should be directed to the TagLib mailing list, not directly to the author.
169  *
170  *  - <a href="http://developer.kde.org/~wheeler/taglib/">TagLib Homepage</a>
171  *  - <a href="https://mail.kde.org/mailman/listinfo/taglib-devel">TagLib Mailing List (taglib-devel@kde.org)</a>
172  *
173  * \author Scott Wheeler <wheeler@kde.org> et al.
174  *
175  */
176
177 #endif