2022-01-09 01:52:40 +00:00
|
|
|
#ifndef RESOURCESCHEMEHANDLER_H
|
|
|
|
#define RESOURCESCHEMEHANDLER_H
|
|
|
|
|
|
|
|
#include "article_netmgr.hh"
|
|
|
|
|
|
|
|
class ResourceSchemeHandler: public QWebEngineUrlSchemeHandler
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2023-07-20 08:02:22 +00:00
|
|
|
|
2022-01-09 01:52:40 +00:00
|
|
|
public:
|
2022-12-22 01:08:41 +00:00
|
|
|
ResourceSchemeHandler( ArticleNetworkAccessManager & articleNetMgr, QObject * parent = nullptr );
|
2022-01-09 01:52:40 +00:00
|
|
|
void requestStarted( QWebEngineUrlRequestJob * requestJob );
|
|
|
|
|
|
|
|
protected:
|
2023-10-06 01:13:55 +00:00
|
|
|
void replyJob( sptr< Dictionary::DataRequest > reply, QWebEngineUrlRequestJob * requestJob, QString content_type );
|
2022-01-09 01:52:40 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
ArticleNetworkAccessManager & mManager;
|
|
|
|
QMimeDatabase db;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RESOURCESCHEMEHANDLER_H
|