1 #ifndef DALI_WEB_ENGINE_LOAD_ERROR_H
2 #define DALI_WEB_ENGINE_LOAD_ERROR_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
27 * @brief A class WebEngineLoadError for loading error of web engine.
29 class WebEngineLoadError
33 * @brief Enumeration for indicating error code of page loading.
37 UNKNOWN = 0, ///< Unknown.
38 CANCELED, ///< User canceled.
39 CANT_SUPPORT_MIMETYPE, ///< Can't show the page for this MIME type.
40 FAILED_FILE_IO, ///< File IO error.
41 CANT_CONNECT, ///< Cannot connect to the network.
42 CANT_LOOKUP_HOST, ///< Fail to look up host from the DNS.
43 FAILED_TLS_HANDSHAKE, ///< Fail to SSL/TLS handshake.
44 INVALID_CERTIFICATE, ///< Received certificate is invalid.
45 REQUEST_TIMEOUT, ///< Connection timeout.
46 TOO_MANY_REDIRECTS, ///< Too many redirects.
47 TOO_MANY_REQUESTS, ///< Too many requests during this load.
48 BAD_URL, ///< Malformed URL.
49 UNSUPPORTED_SCHEME, ///< Unsupported scheme.
50 AUTHENTICATION, ///< User authentication failed on the server.
51 INTERNAL_SERVER, ///< Web server has an internal server error.
52 OTHER, ///< other error.
56 * @brief Enumeration that provides type of loading error.
72 WebEngineLoadError() = default;
77 virtual ~WebEngineLoadError() = default;
80 * @brief Query failing URL for this error.
81 * @return URL that failed to load
83 virtual std::string GetUrl() const = 0;
86 * @brief Query the error code.
87 * @return The error code
89 virtual ErrorCode GetCode() const = 0;
92 * @brief Query description for this error.
93 * @return SeverityLevel indicating the console message level
95 virtual std::string GetDescription() const = 0;
98 * @brief Query type for this error.
99 * @return the error type
101 virtual ErrorType GetType() const = 0;
106 #endif // DALI_WEB_ENGINE_LOAD_ERROR_H