Debian Codegraph @

src/librssguard/network-web/adblock/adblockrequestinfo.h

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.
2
3 #ifndef ADBLOCKREQUESTINFO_H
4 #define ADBLOCKREQUESTINFO_H
5
6 #if defined(NO_LITE)
7 #include <QWebEngineUrlRequestInfo>
8 #endif
9
10 #include <QUrl>
11
12 class AdblockRequestInfo {
13 public:
14 #if defined(NO_LITE)
15 explicit AdblockRequestInfo(const QWebEngineUrlRequestInfo& webengine_info);
16 #endif
17
18 explicit AdblockRequestInfo(const QUrl& url);
19
20 QString resourceType() const;
21 void setResourceType(const QString& resource_type);
22
23 QUrl requestUrl() const;
24 void setRequestUrl(const QUrl& request_url);
25
26 QUrl firstPartyUrl() const;
27 void setFirstPartyUrl(const QUrl& first_party_url);
28
29 QByteArray requestMethod() const;
30 void setRequestMethod(const QByteArray& request_method);
31
32 private:
33 void initialize(const QUrl& url);
34
35 #if defined(NO_LITE)
36 void initialize(const QWebEngineUrlRequestInfo& webengine_info);
37 QString convertResourceType(QWebEngineUrlRequestInfo::ResourceType rt) const;
38 #endif
39
40 private:
41 QString m_resourceType;
42 QUrl m_requestUrl;
43 QUrl m_firstPartyUrl;
44 QUrl m_initiator;
45 QByteArray m_requestMethod;
46 };
47
48 #endif // ADBLOCKREQUESTINFO_H