diff options
author | Jacek Antonelli | 2011-05-19 00:19:12 -0500 |
---|---|---|
committer | Jacek Antonelli | 2011-05-19 00:32:29 -0500 |
commit | e3660b2fdf88f70a0c0f573523e7ef1c372e2c37 (patch) | |
tree | e5e7623756c5f4ae0681377a8fa66f74b6b661a8 /linden/indra/newview/viewerinfo.h | |
parent | Merge branch '1.3-maint' into next (diff) | |
download | meta-impy-e3660b2fdf88f70a0c0f573523e7ef1c372e2c37.zip meta-impy-e3660b2fdf88f70a0c0f573523e7ef1c372e2c37.tar.gz meta-impy-e3660b2fdf88f70a0c0f573523e7ef1c372e2c37.tar.bz2 meta-impy-e3660b2fdf88f70a0c0f573523e7ef1c372e2c37.tar.xz |
Ported viewerinfo.cpp from Kokua.
It defines the ViewerInfo module/namespace, which contains a variety
of functions for querying the viewer name and version. It is designed
to be a replacement for viewerversion.cpp and viewerversion.xml.
viewerversion.cpp has been removed, but viewerversion.xml remains
(albeit with a bogus version number) until the packaging system no
longer uses it.
Diffstat (limited to 'linden/indra/newview/viewerinfo.h')
-rw-r--r-- | linden/indra/newview/viewerinfo.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/linden/indra/newview/viewerinfo.h b/linden/indra/newview/viewerinfo.h new file mode 100644 index 0000000..fe2e829 --- /dev/null +++ b/linden/indra/newview/viewerinfo.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /** | ||
2 | * @file viewerinfo.h | ||
3 | * @brief Functions for querying the viewer name, version, and other info. | ||
4 | * @author Jacek Antonelli | ||
5 | * | ||
6 | * Copyright (c) 2010-2011, Jacek Antonelli | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public | ||
10 | * License as published by the Free Software Foundation; | ||
11 | * version 2.1 of the License only. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * Lesser General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public | ||
19 | * License along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | * Boston, MA 02110-1301 USA | ||
22 | */ | ||
23 | |||
24 | #ifndef VERSIONINFO_H | ||
25 | #define VERSIONINFO_H | ||
26 | |||
27 | #include "linden_common.h" | ||
28 | |||
29 | namespace ViewerInfo | ||
30 | { | ||
31 | /// Returns the name of the viewer. | ||
32 | const std::string& viewerName(); | ||
33 | |||
34 | /// Returns the viewer variant (e.g. "Experimental"). | ||
35 | /// May be empty, if no variant string was set. | ||
36 | const std::string& viewerVariant(); | ||
37 | |||
38 | /// Returns a string with the viewer name and variant | ||
39 | /// (if it has one). | ||
40 | const std::string& nameWithVariant(); | ||
41 | |||
42 | /// Returns the major (first) version number. | ||
43 | /// This number increases for each major release, and the | ||
44 | /// minor, patch, and release numbers are reset to zero. | ||
45 | S32 versionMajor(); | ||
46 | |||
47 | /// Returns the minor (second) version number. | ||
48 | /// This number increases for each minor release, and the | ||
49 | /// patch and release numbers are reset to zero. | ||
50 | S32 versionMinor(); | ||
51 | |||
52 | /// Returns the patch (third) version number. | ||
53 | /// This number increases for each patch (bugfix) release, | ||
54 | /// and the release number is reset to zero. | ||
55 | S32 versionPatch(); | ||
56 | |||
57 | /// Returns the release (fourth) version number. | ||
58 | /// This number increases for each beta, release candidate, | ||
59 | /// and final release. | ||
60 | S32 versionRelease(); | ||
61 | |||
62 | /// Returns the extra version string (e.g. "beta 1", "RC1"). | ||
63 | /// May be empty, if no extra string was set. | ||
64 | const std::string& versionExtra(); | ||
65 | |||
66 | /// Returns a three-segment dot-separated version string | ||
67 | /// ("major.minor.patch"). Intended for human reading. | ||
68 | const std::string& versionNumbers3(); | ||
69 | |||
70 | /// Returns a four-segment dot-separated version string | ||
71 | /// ("major.minor.patch.release"). Intended for computer use, e.g. | ||
72 | /// login channel or version number comparison. | ||
73 | const std::string& versionNumbers4(); | ||
74 | |||
75 | /// Returns the three-segment version number with extra version | ||
76 | /// string (if not empty). Intended for human reading. | ||
77 | const std::string& prettyVersion(); | ||
78 | |||
79 | /// Returns the viewer name, variant (if not empty), and pretty | ||
80 | /// version. Intended for human reading. | ||
81 | const std::string& prettyInfo(); | ||
82 | |||
83 | /// Returns the the viewer name, variant (if not empty), and | ||
84 | /// 4-segment version. Intended for computer use, e.g. login channel | ||
85 | /// or version number comparison. | ||
86 | const std::string& terseInfo(); | ||
87 | |||
88 | /// Returns a string with the viewer's Mac OS X bundle identifier. | ||
89 | const std::string& bundleID(); | ||
90 | |||
91 | } | ||
92 | |||
93 | #endif // VERSIONINFO_H | ||