Transfer interface. More...
#include <public/extensions/IWebternet.h>
Public Member Functions | |
| virtual | ~IWebTransfer () |
| Virtual destructor. Call delete to release the resources. | |
| virtual const char * | LastErrorMessage ()=0 |
| Returns a human-readable error message from the last failure. | |
| virtual int | LastErrorCode ()=0 |
| Returns the last error code, if any. | |
| virtual bool | SetHeaderReturn (bool recv_hdr)=0 |
| Sets whether header information is returned, if any. | |
| virtual bool | Download (const char *url, ITransferHandler *handler, void *data)=0 |
| Downloads a URL. | |
| virtual bool | PostAndDownload (const char *url, IWebForm *form, ITransferHandler *handler, void *data)=0 |
| Downloads a URL with POST options. | |
| virtual bool | SetFailOnHTTPError (bool fail)=0 |
| Sets whether an HTTP failure (>= 400) returns false from Download(). | |
Transfer interface.
Though one instance may be used across multiple threads, the interface cannot be modified while a transfer is in progress.
Definition at line 126 of file IWebternet.h.
| virtual const char* SourceMod::IWebTransfer::LastErrorMessage | ( | ) | [pure virtual] |
Returns a human-readable error message from the last failure.
| virtual int SourceMod::IWebTransfer::LastErrorCode | ( | ) | [pure virtual] |
Returns the last error code, if any.
| virtual bool SourceMod::IWebTransfer::SetHeaderReturn | ( | bool | recv_hdr | ) | [pure virtual] |
Sets whether header information is returned, if any.
| recv_hdr | True to return headers, false otherwise. |
| virtual bool SourceMod::IWebTransfer::Download | ( | const char * | url, | |
| ITransferHandler * | handler, | |||
| void * | data | |||
| ) | [pure virtual] |
Downloads a URL.
| url | URL to download. | |
| handler | Handler object. | |
| userdata | User data pointer. |
| virtual bool SourceMod::IWebTransfer::PostAndDownload | ( | const char * | url, | |
| IWebForm * | form, | |||
| ITransferHandler * | handler, | |||
| void * | data | |||
| ) | [pure virtual] |
Downloads a URL with POST options.
| url | URL to download. | |
| form | Form to read POST info from. | |
| handler | Handler object. | |
| userdata | User data pointer. |
| virtual bool SourceMod::IWebTransfer::SetFailOnHTTPError | ( | bool | fail | ) | [pure virtual] |
Sets whether an HTTP failure (>= 400) returns false from Download().
Note: defaults to false.
| fail | True to fail, false otherwise. |
1.7.1