MPD: CurlRequest Class Reference

MPD 0.20.15

Data Structures | Public Member Functions
CurlRequest Class Referencefinal

`#include <Request.hxx>`

Inheritance diagram for CurlRequest:
[legend]
Collaboration diagram for CurlRequest:
[legend]

## Data Structures
struct | Pause
| CurlResponseHandler::OnData() shall throw this to pause the stream. More...

## Public Member Functions
| CurlRequest (CurlGlobal &_global, const char *url, CurlResponseHandler &_handler)
| To start sending the request, call Start(). More...
| ~CurlRequest ()
| CurlRequest (const CurlRequest &)=delete
CurlRequest & | operator= (const CurlRequest &)=delete
void | Start ()
| Register this request via CurlGlobal::Add(), which starts the request. More...
void | Stop ()
| Unregister this request via CurlGlobal::Remove(). More...
CURL * | Get ()
template<typename T >
void | SetOption (CURLoption option, T value)
void | Resume ()
void | Done (CURLcode result)
| A HTTP request is finished. More...

## Detailed Description

Definition at line 44 of file Request.hxx.

## Constructor & Destructor Documentation

## ◆ CurlRequest() [1/2]

CurlRequest::CurlRequest | ( | CurlGlobal & | _global,
|  | const char * | url,
|  | CurlResponseHandler & | _handler
| ) |  |

To start sending the request, call Start().

## ◆ ~CurlRequest()

CurlRequest::~CurlRequest | ( |  | ) |

## ◆ CurlRequest() [2/2]

CurlRequest::CurlRequest | ( | const CurlRequest & |  | ) |
| delete

## Member Function Documentation

## ◆ Done()

void CurlRequest::Done | ( | CURLcode | result | ) |

A HTTP request is finished.

Called by CurlGlobal.

## ◆ Get()

CURL* CurlRequest::Get | ( |  | ) |
| inline

Definition at line 101 of file Request.hxx.

## ◆ operator=()

CurlRequest& CurlRequest::operator= | ( | const CurlRequest & |  | ) |
| delete

## ◆ Resume()

void CurlRequest::Resume | ( |  | ) |

## ◆ SetOption()

template<typename T >

void CurlRequest::SetOption | ( | CURLoption | option,
|  | T | value
| ) |  |
| inline

Definition at line 106 of file Request.hxx.

## ◆ Start()

void CurlRequest::Start | ( |  | ) |

Register this request via CurlGlobal::Add(), which starts the request.

This method must be called in the event loop thread.

## ◆ Stop()

void CurlRequest::Stop | ( |  | ) |

Unregister this request via CurlGlobal::Remove().

This method must be called in the event loop thread.

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

- lib/curl/Request.hxx