1 /*
2  * Copyright (C) by Camila Ayres <hello@camila.codes>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12  * for more details.
13  */
14 
15 #ifndef ICONJOB_H
16 #define ICONJOB_H
17 
18 #include "account.h"
19 #include "accountfwd.h"
20 #include "owncloudlib.h"
21 
22 #include <QObject>
23 #include <QByteArray>
24 #include <QNetworkAccessManager>
25 #include <QNetworkRequest>
26 #include <QNetworkReply>
27 
28 namespace OCC {
29 
30 /**
31  * @brief Job to fetch a icon
32  * @ingroup gui
33  */
34 class OWNCLOUDSYNC_EXPORT IconJob : public QObject
35 {
36     Q_OBJECT
37 public:
38     explicit IconJob(AccountPtr account, const QUrl &url, QObject *parent = nullptr);
39 
40 signals:
41     void jobFinished(QByteArray iconData);
42     void error(QNetworkReply::NetworkError errorType);
43 
44 private slots:
45     void finished();
46 };
47 }
48 
49 #endif // ICONJOB_H
50