#ifndef KMPERMISSIONCONFIG_H
#define KMPERMISSIONCONFIG_H

#include <memory>
#include <set>

#include "common/KMKeyFile.h"
#include "common/KMSingleton.h"

/**
 * @brief permission config
 */
class KMPermissionConfig : public KMKeyFile, public KMSingleton<KMPermissionConfig>
{
public:
    enum PermissionFlags
    {
        Perm_None = 0,
        Perm_Network = 1,
        Perm_Camera = 1 << 1,
        Perm_Filesystem = 1 << 2
    };

    KMPermissionConfig(token, const std::string &id);
    ~KMPermissionConfig();

    PermissionFlags getFlags();
    std::set<std::string> getDisabledDBus();

private:
    class Private;
    std::shared_ptr<Private> m_dPtr;

    void init();
};

#endif