Represents a load event More...
Header: | #include <oxideqloadevent.h> |
Instantiated By: | LoadEvent |
enum | ErrorDomain { ErrorDomainNone, ErrorDomainInternal, ErrorDomainConnection, ErrorDomainCertificate, ..., ErrorDomainDNS } |
enum | Type { TypeStarted, TypeStopped, TypeSucceeded, TypeFailed, TypeCommitted, TypeRedirected } |
OxideQLoadEvent(const OxideQLoadEvent &other) | |
~OxideQLoadEvent() | |
int | errorCode() const |
ErrorDomain | errorDomain() const |
QString | errorString() const |
int | httpStatusCode() const |
bool | isError() const |
QUrl | originalUrl() const |
Type | type() const |
QUrl | url() const |
bool | operator!=(const OxideQLoadEvent &other) const |
OxideQLoadEvent | operator=(const OxideQLoadEvent &other) |
bool | operator==(const OxideQLoadEvent &other) const |
Represents a load event
OxideQLoadEvent represents a load event. Load events are associated with a url, and have a type.
For load events where the type is TypeFailed, the event will provide details of the error via errorDomain, errorString and errorCode.
For load events where the type is TypeCommitted, TypeSucceeded or TypeRedirected, and url is a http: or https: URL, httpStatusCode will indicate the HTTP status code returned from the server. Load events where type is TypeFailed may also provide the HTTP status code if the failure is post-commit.
Load events where type is TypeRedirected will provide the original URL via originalUrl.
This enum represents the error category for a load event
Constant | Value | Description |
---|---|---|
OxideQLoadEvent::ErrorDomainNone | 0 | No error. |
OxideQLoadEvent::ErrorDomainInternal | 1 | An internal error occurred. |
OxideQLoadEvent::ErrorDomainConnection | 2 | A connection error occurred, such as a SSL error, TCP protocol error or name resolution failure |
OxideQLoadEvent::ErrorDomainCertificate | 3 | A certificate error occurred, such as the server responding with a certificate whose common name is invalid, is expired or signed by an authority that isn't trusted. This error won't be seen for main frame loads. |
OxideQLoadEvent::ErrorDomainHTTP | 4 | A HTTP error occurred, such as a redirect loop or other invalid HTTP response. |
OxideQLoadEvent::ErrorDomainCache | 5 | A cache error occurred |
OxideQLoadEvent::ErrorDomainFTP | 6 | A FTP error occurred |
OxideQLoadEvent::ErrorDomainDNS | 7 | An error occurred during name resolution, such as a timeout or invalid response |
This enum represents the type of a load event
Constant | Value | Description |
---|---|---|
OxideQLoadEvent::TypeStarted | 0 | A started event is the first event in a load event sequence. It occurs before any request is sent over the network. At this point, the previous document still exists. |
OxideQLoadEvent::TypeStopped | 1 | A stopped event occurs when the load is stopped by the application, a non-overridable certificate error occurs in the main frame, a certificate error is denied by the application, or the load is cancelled by some other mechanism. |
OxideQLoadEvent::TypeSucceeded | 2 | A succeeded event occurs when a load completes successfully. |
OxideQLoadEvent::TypeFailed | 3 | A failed event occurs when a load fails. |
OxideQLoadEvent::TypeCommitted | 4 | A committed event occurs when a response is received from the remote server. At this point, the new document has replaced the previous document. |
OxideQLoadEvent::TypeRedirected | 5 | A redirected event occurs when the server responds with a 3xx response. |
Copy constructs a load event from other.
Destroys the load event.
Returns the error code for this load event. The error code matches the internal code provided by the Chromium networking stack.
Applications shouldn't make any assumption about the meaning of these error codes, and shouldn't assume that specific errors will produce the same error code in future releases of Oxide.
See also errorDomain and errorString.
Returns the error domain for this load event. If type is not TypeFailed, this will return ErrorDomainNone.
See also errorString and errorCode.
Returns a description of the error for this load event, suitable for display in an application UI. If type is not TypeFailed, this will return an empty string.
See also errorDomain and errorCode.
Returns the HTTP status code returned from the remote server for this load. This will return 0 for load events where type is TypeStarted or TypeStopped, or url is not a http: or https: URL. It will also return 0 for load events where type is TypeFailed and the load hasn't committed yet.
Returns true if the load event is associated with an error page. If a load fails, Chromium will proceed to load a (currently empty) error page.
Returns the original URL for load events where type is TypeRedirected. For all other load events, this returns an empty URL.
Returns the type of this load event.
Returns the url associated with this load event.
Returns true if this load event does not equal other.
Assigns other to this load event.
Returns true if this load event equals other. A load event will only be equal to one that it was copied from.