#ifndef DEVICE_MAP_H
#define DEVICE_MAP_H

#include <QString>
#include <QMap>
#include <QObject>

class DeviceMap : public QObject
{
    Q_OBJECT
private:
    struct DevInfo
    {
        QString path;
        QString uri;
        QString deviceId;
    };


    QMap<QString, DevInfo> m_devMp;
    bool generateMap();
    bool jsonRead();
    int jsonWrite();

    DeviceMap(/* args */);
    
public:
    static DeviceMap *getInstance();
    bool checkPathAdd(const QString &path);
    bool checkPathRemove(const QString &path);
    bool checkPath(const QString &handle, const QString &path);
    ~DeviceMap();
public slots:
    void doPrinterRemove(const QString &prtName);
    void doPrinterAdd(const QString &prtName);
};

#endif // DEVICE_MAP_H
