// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QOHOSDEVICEINFO_H
#define QOHOSDEVICEINFO_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//

#include <QtCore/private/qohoscommon_p.h>
#include <QtCore/qmap.h>
#include <QtCore/qvariant.h>

QT_BEGIN_NAMESPACE

namespace QOhosDeviceInfo {
enum class Type {
    deviceType,
    manufacture,
    brand,
    marketName,
    productSeries,
    productModel,
    softwareModel,
    hardwareModel,
    hardwareProfile,
    serial,
    bootloaderVersion,
    abiList,
    securityPatchTag,
    displayVersion,
    incrementalVersion,
    osReleaseType,
    osFullName,
    majorVersion,
    seniorVersion,
    featureVersion,
    buildVersion,
    sdkApiVersion,
    firstApiVersion,
    versionId,
    buildType,
    buildUser,
    buildHost,
    buildTime,
    buildRootHash,
    udid,
    distributionOSName,
    distributionOSVersion,
    distributionOSApiVersion,
    distributionOSReleaseType,
};

enum class RecognizedDeviceType {
    _2in1,
    tablet,
    phone,
};

Q_CORE_EXPORT void init(QMap<Type, QVariant> devinfo);
Q_CORE_EXPORT QVariant getProperty(Type prop);

Q_CORE_EXPORT QOhosOptional<RecognizedDeviceType> tryGetRecognizedDeviceType();
Q_CORE_EXPORT bool isTablet();
Q_CORE_EXPORT bool is2in1();
Q_CORE_EXPORT bool isPhone();
Q_CORE_EXPORT int sdkApiVersion();
Q_CORE_EXPORT bool isCurrentDeviceSupported();

}

QT_END_NAMESPACE

#endif // QOHOSDEVICEINFO_H
