5#ifndef MOLYBDEN_NETWORK_EVENTS_HPP
6#define MOLYBDEN_NETWORK_EVENTS_HPP
11#include "molybden/base/event.hpp"
12#include "molybden/network/net_error.hpp"
13#include "molybden/network/url_request.hpp"
Events allow you to be notified when something happens in Molybden.
Definition event.hpp:25
A class that contains all network events.
Definition network_events.hpp:190
Event< RedirectResponseCodeReceived > onRedirectResponseCodeReceived
Invoked when a redirect response code (3xx) has been received for the URL request.
Definition network_events.hpp:236
Event< RequestDestroyed > onRequestDestroyed
Invoked when the URL request has been destroyed.
Definition network_events.hpp:258
Event< RequestCompleted > onRequestCompleted
Invoked when the URL request has been completed.
Definition network_events.hpp:247
Event< ResponseStarted > onResponseStarted
Invoked when the first byte of the URL response body has been received.
Definition network_events.hpp:283
Event< NetworkChanged > onNetworkChanged
Invoked when the current network connection has changed.
Definition network_events.hpp:213
Event< PacScriptErrorReceived > onPacScriptErrorReceived
Invoked when the PAC file processing has been failed.
Definition network_events.hpp:224
Event< ResponseBytesReceived > onResponseBytesReceived
Invoked when a part of HTTP response body has been received over the network.
Definition network_events.hpp:270
The NetworkEvents::onNetworkChanged event arguments.
Definition network_events.hpp:22
ConnectionType connection_type
The connection type of the network.
Definition network_events.hpp:31
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:26
The NetworkEvents::onPacScriptErrorReceived event arguments.
Definition network_events.hpp:37
std::string error_text
The description of the script processing error.
Definition network_events.hpp:51
uint32_t line_number
The line of code in the PAC script which caused the error.
Definition network_events.hpp:46
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:41
The NetworkEvents::onRedirectResponseCodeReceived event arguments.
Definition network_events.hpp:57
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:61
uint32_t response_code
The HTTP response code (e.g., 300, 301, and so on).
Definition network_events.hpp:72
UrlRequest url_request
The URL request that has been redirected.
Definition network_events.hpp:66
std::string new_url
The new location of the redirected URL request.
Definition network_events.hpp:79
The NetworkEvents::onRequestCompleted event arguments.
Definition network_events.hpp:85
NetError error_code
The URL request error code.
Definition network_events.hpp:111
uint32_t response_code
The HTTP response code or 0 if the request has been failed or canceled.
Definition network_events.hpp:99
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:89
UrlRequest url_request
The URL request that has been completed.
Definition network_events.hpp:94
UrlRequestStatus status
The status of the URL request.
Definition network_events.hpp:104
bool is_cached
True if the response has been taken from cache.
Definition network_events.hpp:116
The NetworkEvents::onRequestDestroyed event arguments.
Definition network_events.hpp:122
UrlRequest url_request
The URL request that has been destroyed.
Definition network_events.hpp:131
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:126
The NetworkEvents::onResponseBytesReceived event arguments.
Definition network_events.hpp:137
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:141
std::string charset
The charset in lower case retrieved from the HTTP response headers of this request or an empty string...
Definition network_events.hpp:159
UrlRequest url_request
The URL request associated with the response.
Definition network_events.hpp:146
std::string mime_type
The MIME type value retrieved from the Content-Type header of this request or an empty string if ther...
Definition network_events.hpp:152
std::string data
The received part of HTTP response body.
Definition network_events.hpp:164
The NetworkEvents::onResponseStarted event arguments.
Definition network_events.hpp:170
uint32_t response_code
The HTTP response code.
Definition network_events.hpp:184
std::shared_ptr< Network > network
The network instance initiated this event.
Definition network_events.hpp:174
UrlRequest url_request
The URL request associated with the response.
Definition network_events.hpp:179
The details about a URL request.
Definition url_request.hpp:185