omni/platforminfo/IOsInfo.h

File members: omni/platforminfo/IOsInfo.h

// Copyright (c) 2021-2023, 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 "../core/IObject.h"

namespace omni
{
namespace platforminfo
{

class IOsInfo;

enum class OMNI_ATTR("prefix=e") Os
{
    eUnknown,
    eWindows,
    eLinux,
    eMacOs,
};

enum class OMNI_ATTR("prefix=e") Architecture
{
    eUnknown,
    eX86_64,
    eAarch64,
};

struct OsVersion
{
    uint32_t major;
    uint32_t minor;
    uint32_t buildNumber;
};

struct CompositorInfo
{
    const char* name;
    const char* vendor;
    int32_t releaseVersion;
};

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"