#pragma once

#include <QObject>
#include <QScopedPointer>
#include <QVariantMap>

#include "systeminfo.h"

namespace Win
{

class WmiObjectPrivate;
class WmiObject : public QObject
{
    Q_OBJECT
public:
    WmiObject(QObject *parent = Q_NULLPTR);
    ~WmiObject();

    QList<DiskInfo> QueryXPDiskInfo();
    QList<DiskInfo> QueryDiskInfo();
    QList<QVariantMap> Query(const QString &wql, const QStringList &props);
    QList<QVariantMap> Monitor(const QString &wql);

Q_SIGNALS:
    void wmiEventIndicate(const QString &type, QMap<QString, QVariant> data);

private:
    QScopedPointer<WmiObjectPrivate> dd_ptr;
    Q_DECLARE_PRIVATE_D(qGetPtrHelper(dd_ptr), WmiObject)
};

WmiObject *GetWmiObject();
}
