Qmmp
/usr/src/RPM/BUILD/qmmp-0.11-svn/src/qmmp/qmmp.h
00001 /***************************************************************************
00002  *   Copyright (C) 2008-2016 by Ilya Kotov                                 *
00003  *   forkotov02@hotmail.ru                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00019  ***************************************************************************/
00020 #ifndef QMMP_H
00021 #define QMMP_H
00022 
00023 #include <QString>
00024 
00025 #define QMMP_VERSION_MAJOR 0
00026 #define QMMP_VERSION_MINOR 11
00027 #define QMMP_VERSION_PATCH 0
00028 #define QMMP_VERSION_STABLE 0
00029 
00030 #define QMMP_VERSION_INT (QMMP_VERSION_MAJOR<<16 | QMMP_VERSION_MINOR<<8 | QMMP_VERSION_PATCH)
00031 
00035 #ifdef Q_OS_WIN
00036 #define QStringToFileName(s) TagLib::FileName(reinterpret_cast<const wchar_t *>(s.utf16()))
00037 #else
00038 #define QStringToFileName(s) s.toLocal8Bit().constData()
00039 #endif
00040 
00041 
00045 class Qmmp
00046 {
00047 public:
00051     enum State
00052     {
00053         Playing = 0, 
00054         Paused,      
00055         Stopped,     
00056         Buffering,   
00057         NormalError, 
00058         FatalError   
00059     };
00063     enum MetaData
00064     {
00065         UNKNOWN = -1,
00066         TITLE = 0, 
00067         ARTIST,    
00068         ALBUMARTIST,
00069         ALBUM,     
00070         COMMENT,   
00071         GENRE,     
00072         COMPOSER,  
00073         YEAR,      
00074         TRACK,     
00075         DISCNUMBER,
00076         URL        
00077     };
00081     enum ReplayGainKey
00082     {
00083         REPLAYGAIN_TRACK_GAIN = 0, 
00084         REPLAYGAIN_TRACK_PEAK,     
00085         REPLAYGAIN_ALBUM_GAIN,     
00086         REPLAYGAIN_ALBUM_PEAK      
00087     };
00091     enum AudioFormat
00092     {
00093         PCM_UNKNOWM = -1, 
00094         PCM_S8 = 0, 
00095         PCM_U8,     
00096         PCM_S16LE,  
00097         PCM_S16BE,  
00098         PCM_U16LE,  
00099         PCM_U16BE,  
00100         PCM_S24LE,  
00101         PCM_S24BE,  
00102         PCM_U24LE,  
00103         PCM_U24BE,  
00104         PCM_S32LE,  
00105         PCM_S32BE,  
00106         PCM_U32LE,  
00107         PCM_U32BE,  
00108         PCM_FLOAT   
00109     };
00110 
00114     enum ChannelPosition
00115     {
00116         CHAN_NULL         = 0x00,   
00117         CHAN_FRONT_LEFT   = 0x01,   
00118         CHAN_FRONT_RIGHT  = 0x02,   
00119         CHAN_REAR_LEFT    = 0x04,   
00120         CHAN_REAR_RIGHT   = 0x08,   
00121         CHAN_FRONT_CENTER = 0x10,   
00122         CHAN_REAR_CENTER  = 0x20,   
00123         CHAN_SIDE_LEFT    = 0x40,   
00124         CHAN_SIDE_RIGHT   = 0x80,   
00125         CHAN_LFE          = 0x100,  
00126     };
00127 
00131     static const QString configFile();
00135     static const QString configDir();
00139     static void setConfigDir(const QString &path);
00143     static const QString strVersion();
00147     static const QString pluginsPath();
00151     static QString systemLanguageID();
00155     static QString uiLanguageID();
00160     static void setUiLanguageID(const QString &code);
00161 
00162 private:
00163     static QString m_configDir;
00164     static QString m_langID;
00165 
00166 };
00167 
00168 #endif
 All Classes Functions Variables Enumerations Enumerator