Program Listing for omni/platforminfo/IOsInfo.h¶
↰ Return to documentation for omni/platforminfo/IOsInfo.h
// Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <omni/core/IObject.h>
namespace omni
{
namespace platforminfo
{
class IOsInfo;
enum class OMNI_ATTR("prefix=e") Os
{
eUnknown, ///< The OS is unknown or could not be determined.
eWindows, ///< Microsoft Windows.
eLinux, ///< Any flavour of Linux.
eMacOs, ///< Mac OS.
};
enum class OMNI_ATTR("prefix=e") Architecture
{
eUnknown, ///< The architecture is unknown or could not be determined.
eX86_64, ///< Intel X86 64 bit.
eAarch64, ///< ARM 64-bit.
};
struct OsVersion
{
uint32_t major; ///< Major version.
uint32_t minor; ///< Minor version.
uint32_t buildNumber; ///< OS specific build number.
};
struct CompositorInfo
{
const char* name; ///< The name of the active compositor. This must not be modified.
const char* vendor; ///< The vendor of the active compositor. This must not be modified.
int32_t releaseVersion; ///< The release version number of the active compositor.
};
class IOsInfo_abi : public omni::core::Inherits<omni::core::IObject, OMNI_TYPE_ID("omni.platforminfo.IOsInfo")>
{
protected:
virtual Architecture getArchitecture_abi() noexcept = 0;
virtual Os getOs_abi() noexcept = 0;
virtual OsVersion getOsVersion_abi() noexcept = 0;
virtual CompositorInfo getCompositorInfo_abi() noexcept = 0;
virtual const char* getPrettyName_abi() noexcept = 0;
virtual const char* getName_abi() noexcept = 0;
virtual const char* getDistroName_abi() noexcept = 0;
virtual const char* getCodeName_abi() noexcept = 0;
virtual const char* getKernelVersion_abi() noexcept = 0;
};
} // namespace platforminfo
} // namespace omni
#define OMNI_BIND_INCLUDE_INTERFACE_DECL
#include "IOsInfo.gen.h"
class omni::platforminfo::IOsInfo : public omni::core::Generated<omni::platforminfo::IOsInfo_abi>
{
};
#define OMNI_BIND_INCLUDE_INTERFACE_IMPL
#include "IOsInfo.gen.h"