Newer
Older
#ifndef HANDLERS_XDGURL_H
#define HANDLERS_XDGURL_H
#include <QObject>
namespace Core {
class Config;
class Network;
}
namespace Handlers {
class XdgUrl : public QObject
{
Q_OBJECT
private:
Core::Config *_appConfig;
Core::Config *_userConfig;
Core::Network *_asyncNetwork;
QJsonObject _destinations;
QJsonObject _archiveTypes;
explicit XdgUrl(const QString &xdgUrl, Core::Config *appConfig, Core::Config *userConfig, Core::Network *asyncNetwork, QObject *parent = 0);
QJsonObject _loadDestinations();
QJsonObject _loadArchiveTypes();
bool _installPlasmapkg(const QString &path, const QString &type = "plasmoid");
bool _uncompressArchive(const QString &path, const QString &targetDir);
void _saveDownloadedFile(QNetworkReply *reply);
void _installDownloadedFile(QNetworkReply *reply);
};
} // namespace Handlers
#endif // HANDLERS_XDGURL_H