OSDN Git Service

Happy new year 2015 !!!
[lamexp/LameXP.git] / src / Global.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2015 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 //
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
22
23 #pragma once
24
25 #ifdef _MSC_VER
26 #define _CRT_RAND_S
27 #endif
28
29 #include <cstdlib>
30 #include <QtGlobal>
31 #include <QString>
32
33 //Forward declarations
34 class QDate;
35 class QStringList;
36 class QIcon;
37 class LockedFile;
38
39 ///////////////////////////////////////////////////////////////////////////////
40 // GLOBAL FUNCTIONS
41 ///////////////////////////////////////////////////////////////////////////////
42
43 /*
44  * Tools Support
45  */
46 void           lamexp_tools_register(const QString &toolName, LockedFile *const file, const quint32 &version, const QString &tag = QString());
47 bool           lamexp_tools_check   (const QString &toolName);
48 const QString& lamexp_tools_lookup  (const QString &toolName);
49 const quint32& lamexp_tools_version (const QString &toolName, QString *const tagOut = NULL);
50
51 /*
52  * Version getters
53  */
54 unsigned int lamexp_version_major    (void);
55 unsigned int lamexp_version_minor    (void);
56 unsigned int lamexp_version_build    (void);
57 unsigned int lamexp_version_confg    (void);
58 const char*  lamexp_version_release  (void);
59 bool         lamexp_version_portable (void);
60 bool         lamexp_version_demo     (void);
61 const QDate& lamexp_version_expires  (void);
62 unsigned int lamexp_toolver_neroaac  (void);
63 unsigned int lamexp_toolver_fhgaacenc(void);
64 unsigned int lamexp_toolver_qaacenc  (void);
65 unsigned int lamexp_toolver_coreaudio(void);
66
67 /*
68  * URL getters
69  */
70 const char *lamexp_website_url(void);
71 const char *lamexp_mulders_url(void);
72 const char *lamexp_support_url(void);
73 const char *lamexp_tracker_url(void);
74
75 /*
76  * Misc Functions
77  */
78 const QIcon&  lamexp_app_icon(void);
79 const QString lamexp_version2string(const QString &pattern, unsigned int version, const QString &defaultText, const QString &tag = QString());
80
81 ///////////////////////////////////////////////////////////////////////////////
82 // HELPER MACROS
83 ///////////////////////////////////////////////////////////////////////////////
84
85 #define NOBR(STR) (QString("<nobr>%1</nobr>").arg((STR)).replace("-", "&minus;"))