1 | // Copyright (C) 2016 Research In Motion. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QQMLABSTRACTURLINTERCEPTOR_H |
5 | #define QQMLABSTRACTURLINTERCEPTOR_H |
6 | |
7 | #include <QtQml/qtqmlglobal.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QUrl; |
12 | |
13 | class Q_QML_EXPORT QQmlAbstractUrlInterceptor |
14 | { |
15 | public: |
16 | enum DataType { //Matches QQmlDataBlob::Type |
17 | QmlFile = 0, |
18 | JavaScriptFile = 1, |
19 | QmldirFile = 2, |
20 | UrlString = 0x1000 |
21 | }; |
22 | |
23 | QQmlAbstractUrlInterceptor() = default; |
24 | virtual ~QQmlAbstractUrlInterceptor() = default; |
25 | virtual QUrl intercept(const QUrl &path, DataType type) = 0; |
26 | }; |
27 | |
28 | QT_END_NAMESPACE |
29 | #endif |
30 | |