#pragma once

#include <QVariantMap>
#include <QJsonObject>

namespace Genuine
{

class LicenseInfo
{
public:
    bool    IsGenuine = false;
    // For XP
    int     ActivationRequired = -1;
    // For Vista or later
    bool    BootLoaderHack = false;
    int     LicenseStatus = -1;
    int     LicenseStatusReason = -1;

    QString ProductKey;
    QString PartialProductKey;
    QString ProductKeyChannel;
    QString KeyManagementServiceMachine;
    QString Description;

    QByteArray toJson() const;
    QJsonObject toObject() const;
};

QVariantMap
GetWin32OperatingSystem();

bool IsWindowsVistaOrGreater();

QString
GetKey(const QString &regPath);

QString
GetWindowsKey();

LicenseInfo
QueryGenuineInfo();

}
