aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewerversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/viewerversion.h')
-rw-r--r--linden/indra/newview/viewerversion.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/linden/indra/newview/viewerversion.h b/linden/indra/newview/viewerversion.h
new file mode 100644
index 0000000..d67cee5
--- /dev/null
+++ b/linden/indra/newview/viewerversion.h
@@ -0,0 +1,79 @@
1/**
2* @file viewerversion.h
3* @brief set the viewer version in xml
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2010, McCabe Maxsted
8*
9* Imprudence Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*/
30
31#ifndef VIEWERVERSION_H
32#define VIEWERVERSION_H
33
34#include "llversionviewer.h" // for LL versioning only
35
36class ViewerVersion
37{
38public:
39 ViewerVersion();
40 /*virtual*/ ~ViewerVersion();
41
42 static bool initViewerVersion();
43
44 // Returns the major version of Imprudence
45 static S32 getImpMajorVersion() { return sVersionMajor; }
46 // Returns the minor version of Imprudence
47 static S32 getImpMinorVersion() { return sVersionMinor; }
48 // Returns the patch version of Imprudence
49 static S32 getImpPatchVersion() { return sVersionPatch; }
50 // Returns the test version of Imprudence
51 static std::string getImpTestVersion() { return sVersionTest; }
52 // Returns the name of the viewer. Currently always "Imprudence"
53 static std::string getImpViewerName() { return sViewerName; }
54
55 // Returns the major version of Second Life
56 static S32 getLLMajorVersion() { return LL_VERSION_MAJOR; }
57 // Returns the minor version of Second Life
58 static S32 getLLMinorVersion() { return LL_VERSION_MINOR; }
59 // Returns the patch version of Second Life
60 static S32 getLLPatchVersion() { return LL_VERSION_PATCH; }
61 // Returns the build version of Second Life
62 static S32 getLLBuildVersion() { return LL_VERSION_BUILD; }
63 // Returns the name of the LL viewer ("Second Life")
64 static std::string getLLViewerName() { return LL_VIEWER_NAME; }
65
66 // Note that the viewer channel is set in settings.xml
67 // as VersionChannelName. LL_VIEWER_CHANNEL is not
68 // used in Imprudence
69
70private:
71 static S32 sVersionMajor;
72 static S32 sVersionMinor;
73 static S32 sVersionPatch;
74 static std::string sVersionTest;
75
76 static const std::string sViewerName;
77};
78
79#endif // VIEWERVERSION_H