lib/curl: add "noexcept"

This commit is contained in:
Max Kellermann
2017-11-12 17:49:58 +01:00
parent c582a9faae
commit 9d47b220a4
14 changed files with 71 additions and 65 deletions

View File

@@ -80,7 +80,7 @@ public:
*/
CurlRequest(CurlGlobal &_global, const char *url,
CurlResponseHandler &_handler);
~CurlRequest();
~CurlRequest() noexcept;
CurlRequest(const CurlRequest &) = delete;
CurlRequest &operator=(const CurlRequest &) = delete;
@@ -91,16 +91,16 @@ public:
*
* This method must be called in the event loop thread.
*/
void Start();
void Start() noexcept;
/**
* Unregister this request via CurlGlobal::Remove().
*
* This method must be called in the event loop thread.
*/
void Stop();
void Stop() noexcept;
CURL *Get() {
CURL *Get() noexcept {
return easy.Get();
}
@@ -115,36 +115,36 @@ public:
*/
struct Pause {};
void Resume();
void Resume() noexcept;
/**
* A HTTP request is finished. Called by #CurlGlobal.
*/
void Done(CURLcode result);
void Done(CURLcode result) noexcept;
private:
/**
* Frees the current "libcurl easy" handle, and everything
* associated with it.
*/
void FreeEasy();
void FreeEasy() noexcept;
void FinishHeaders();
void FinishBody();
size_t DataReceived(const void *ptr, size_t size);
size_t DataReceived(const void *ptr, size_t size) noexcept;
void HeaderFunction(StringView s);
void HeaderFunction(StringView s) noexcept;
void OnPostponeError();
void OnPostponeError() noexcept;
/** called by curl when new data is available */
static size_t _HeaderFunction(void *ptr, size_t size, size_t nmemb,
void *stream);
void *stream) noexcept;
/** called by curl when new data is available */
static size_t WriteFunction(void *ptr, size_t size, size_t nmemb,
void *stream);
void *stream) noexcept;
};
#endif