aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/viewerinfo.h
blob: fe2e829dfa3c9243cef250e0305f4389a55dba64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
 * @file viewerinfo.h
 * @brief Functions for querying the viewer name, version, and other info.
 * @author Jacek Antonelli
 *
 * Copyright (c) 2010-2011, Jacek Antonelli
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2.1 of the License only.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

#ifndef VERSIONINFO_H
#define VERSIONINFO_H

#include "linden_common.h"

namespace ViewerInfo
{
	/// Returns the name of the viewer.
	const std::string& viewerName();

	/// Returns the viewer variant (e.g. "Experimental").
	/// May be empty, if no variant string was set.
	const std::string& viewerVariant();

	/// Returns a string with the viewer name and variant
	/// (if it has one).
	const std::string& nameWithVariant();

	/// Returns the major (first) version number.
	/// This number increases for each major release, and the
	/// minor, patch, and release numbers are reset to zero.
	S32 versionMajor();

	/// Returns the minor (second) version number.
	/// This number increases for each minor release, and the
	/// patch and release numbers are reset to zero.
	S32 versionMinor();

	/// Returns the patch (third) version number.
	/// This number increases for each patch (bugfix) release,
	/// and the release number is reset to zero.
	S32 versionPatch();

	/// Returns the release (fourth) version number.
	/// This number increases for each beta, release candidate,
	/// and final release.
	S32 versionRelease();

	/// Returns the extra version string (e.g. "beta 1", "RC1").
	/// May be empty, if no extra string was set.
	const std::string& versionExtra();

	/// Returns a three-segment dot-separated version string
  /// ("major.minor.patch"). Intended for human reading.
	const std::string& versionNumbers3();

	/// Returns a four-segment dot-separated version string
  /// ("major.minor.patch.release"). Intended for computer use, e.g.
  /// login channel or version number comparison.
	const std::string& versionNumbers4();

	/// Returns the three-segment version number with extra version
	/// string (if not empty). Intended for human reading.
	const std::string& prettyVersion();

	/// Returns the viewer name, variant (if not empty), and pretty
	/// version. Intended for human reading.
	const std::string& prettyInfo();

	/// Returns the the viewer name, variant (if not empty), and
	/// 4-segment version. Intended for computer use, e.g. login channel
	/// or version number comparison.
	const std::string& terseInfo();

	/// Returns a string with the viewer's Mac OS X bundle identifier.
	const std::string& bundleID();

}

#endif // VERSIONINFO_H