mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Apparently the first commit (59ae429972)
did not include all files.
Furthermore the used script tended to produce funny results in certain
cases. This has been fixed and as a result thereof a few more changes
were made in this second run.
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
// Copyright 2009-2021 The Mumble Developers. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license
|
|
// that can be found in the LICENSE file at the root of the
|
|
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
|
|
|
#ifndef MUMBLE_OSINFO_H_
|
|
#define MUMBLE_OSINFO_H_
|
|
|
|
#include <QtCore/QList>
|
|
#include <QtCore/QString>
|
|
|
|
class QDomDocument;
|
|
class QDomElement;
|
|
class QHostAddress;
|
|
|
|
class OSInfo {
|
|
public:
|
|
/// If \p build is false, returns the operating system architecture.
|
|
/// If \p build is true, returns the build architecture.
|
|
static QString getArchitecture(const bool build);
|
|
|
|
/// Returns an hash generated from the primary network interface's MAC address.
|
|
static QString getMacHash(const QList< QHostAddress > & = QList< QHostAddress >());
|
|
|
|
/// Returns the operating system's basename.
|
|
/// Examples: "Windows", "Linux", "macOS", "FreeBSD", "Unknown", etc.
|
|
static QString getOS();
|
|
|
|
/// Returns the complete operating system version.
|
|
///
|
|
/// Examples:
|
|
/// "Windows 10 Enterprise 2009 19042.804 [x64]"
|
|
/// "Debian GNU/Linux bullseye/sid [x64]"
|
|
///
|
|
/// The architecture is not explicitly added when \p appendArch is false.
|
|
static QString getOSDisplayableVersion(const bool appendArch = true);
|
|
|
|
/// Returns the operating system's version.
|
|
/// Examples: "10.0.19042.1", "10.16.0 20C69"
|
|
static QString getOSVersion();
|
|
|
|
static void fillXml(QDomDocument &doc, QDomElement &root, const QList< QHostAddress > & = {});
|
|
};
|
|
|
|
#endif
|