libadblockplus
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | List of all members
AdblockPlus::IWebRequest Struct Referenceabstract

Web request interface used to implement XMLHttpRequest. More...

#include <IWebRequest.h>

Public Types

enum  MozillaStatusCode {
  NS_OK = 0, NS_ERROR_FAILURE = 0x80004005, NS_ERROR_OUT_OF_MEMORY = 0x8007000e, NS_ERROR_MALFORMED_URI = 0x804b000a,
  NS_ERROR_CONNECTION_REFUSED = 0x804b000d, NS_ERROR_NET_TIMEOUT = 0x804b000e, NS_ERROR_NO_CONTENT = 0x804b0011, NS_ERROR_UNKNOWN_PROTOCOL = 0x804b0012,
  NS_ERROR_NET_RESET = 0x804b0014, NS_ERROR_UNKNOWN_HOST = 0x804b001e, NS_ERROR_REDIRECT_LOOP = 0x804b001f, NS_ERROR_UNKNOWN_PROXY_HOST = 0x804b002a,
  NS_ERROR_NET_INTERRUPT = 0x804b0047, NS_ERROR_UNKNOWN_PROXY_CONNECTION_REFUSED = 0x804b0048, NS_CUSTOM_ERROR_BASE = 0x80850000, NS_ERROR_NOT_INITIALIZED = 0xc1f30001
}
 Possible Mozilla status codes.
 
typedef std::function< void(const
ServerResponse &)> 
GetCallback
 Callback type invoked when the server response is ready. More...
 

Public Member Functions

virtual void GET (const std::string &url, const HeaderList &requestHeaders, const GetCallback &getCallback)=0
 Performs a GET request. More...
 

Detailed Description

Web request interface used to implement XMLHttpRequest.

Member Typedef Documentation

typedef std::function<void(const ServerResponse&)> AdblockPlus::IWebRequest::GetCallback

Callback type invoked when the server response is ready.

The parameter is the server response.

Member Function Documentation

virtual void AdblockPlus::IWebRequest::GET ( const std::string &  url,
const HeaderList requestHeaders,
const GetCallback getCallback 
)
pure virtual

Performs a GET request.

Parameters
urlRequest URL.
requestHeadersRequest headers.
getCallbackto invoke when the server response is ready.

The documentation for this struct was generated from the following file: