mumble/src/OSInfo.h
Robert 56db3410c5 MAINT: Update copyright notice to 2021 (Part II)
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.
2021-04-09 15:41:49 +02:00

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