OxideQLoadEvent Class

Represents a load event More...

Header: #include <oxideqloadevent.h>
Instantiated By: LoadEvent

Public Types

enum ErrorDomain { ErrorDomainNone, ErrorDomainInternal, ErrorDomainConnection, ErrorDomainCertificate, ..., ErrorDomainDNS }
enum Type { TypeStarted, TypeStopped, TypeSucceeded, TypeFailed, TypeCommitted, TypeRedirected }

Public Functions

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

Detailed Description

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.

Member Type Documentation

enum OxideQLoadEvent::ErrorDomain

This enum represents the error category for a load event

ConstantValueDescription
OxideQLoadEvent::ErrorDomainNone0No error.
OxideQLoadEvent::ErrorDomainInternal1An internal error occurred.
OxideQLoadEvent::ErrorDomainConnection2A connection error occurred, such as a SSL error, TCP protocol error or name resolution failure
OxideQLoadEvent::ErrorDomainCertificate3A 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::ErrorDomainHTTP4A HTTP error occurred, such as a redirect loop or other invalid HTTP response.
OxideQLoadEvent::ErrorDomainCache5A cache error occurred
OxideQLoadEvent::ErrorDomainFTP6A FTP error occurred
OxideQLoadEvent::ErrorDomainDNS7An error occurred during name resolution, such as a timeout or invalid response

enum OxideQLoadEvent::Type

This enum represents the type of a load event

ConstantValueDescription
OxideQLoadEvent::TypeStarted0A 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::TypeStopped1A 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::TypeSucceeded2A succeeded event occurs when a load completes successfully.
OxideQLoadEvent::TypeFailed3A failed event occurs when a load fails.
OxideQLoadEvent::TypeCommitted4A committed event occurs when a response is received from the remote server. At this point, the new document has replaced the previous document.
OxideQLoadEvent::TypeRedirected5A redirected event occurs when the server responds with a 3xx response.

Member Function Documentation

OxideQLoadEvent::OxideQLoadEvent(const OxideQLoadEvent &other)

Copy constructs a load event from other.

OxideQLoadEvent::~OxideQLoadEvent()

Destroys the load event.

int OxideQLoadEvent::errorCode() const

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.

ErrorDomain OxideQLoadEvent::errorDomain() const

Returns the error domain for this load event. If type is not TypeFailed, this will return ErrorDomainNone.

See also errorString and errorCode.

QString OxideQLoadEvent::errorString() const

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.

int OxideQLoadEvent::httpStatusCode() const

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.

bool OxideQLoadEvent::isError() const

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.

QUrl OxideQLoadEvent::originalUrl() const

Returns the original URL for load events where type is TypeRedirected. For all other load events, this returns an empty URL.

Type OxideQLoadEvent::type() const

Returns the type of this load event.

QUrl OxideQLoadEvent::url() const

Returns the url associated with this load event.

bool OxideQLoadEvent::operator!=(const OxideQLoadEvent &other) const

Returns true if this load event does not equal other.

OxideQLoadEvent OxideQLoadEvent::operator=(const OxideQLoadEvent &other)

Assigns other to this load event.

bool OxideQLoadEvent::operator==(const OxideQLoadEvent &other) const

Returns true if this load event equals other. A load event will only be equal to one that it was copied from.