Hide CURLWrapper::cancel_stream().

This commit is contained in:
tastytea 2020-01-10 18:57:42 +01:00
parent 796e159cdc
commit 7ac1bc1377
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
3 changed files with 20 additions and 16 deletions

View File

@ -181,10 +181,16 @@ public:
*/
vector<event_type> get_new_events();
//! @copydoc CURLWrapper::cancel_stream
inline void cancel_stream()
{
CURLWrapper::cancel_stream();
}
private:
Instance &_instance;
const string_view _baseuri;
[[nodiscard]]
string endpoint_to_uri(const endpoint_variant &endpoint) const;
};

View File

@ -152,17 +152,6 @@ public:
*/
void set_proxy(string_view proxy);
/*!
* @brief Cancel the stream.
*
* The stream will be cancelled, usually whithin a second. The @link
* answer_type::curl_error_code curl_error_code @endlink of the answer will
* be set to 42 (`CURLE_ABORTED_BY_CALLBACK`).
*
* @since 0.1.0
*/
void cancel_stream();
protected:
/*!
* @brief Mutex for #get_buffer a.k.a. _curl_buffer_body.
@ -199,6 +188,20 @@ protected:
return _curl_buffer_body;
}
/*!
* @brief Cancel the stream.
*
* The stream will be cancelled, usually whithin a second. The @link
* answer_type::curl_error_code curl_error_code @endlink of the answer will
* be set to 42 (`CURLE_ABORTED_BY_CALLBACK`).
*
* @since 0.1.0
*/
inline void cancel_stream()
{
_stream_cancelled = true;
}
/*!
* @brief Set OAuth 2.0 Bearer Access Token.
*

View File

@ -74,11 +74,6 @@ void CURLWrapper::set_proxy(const string_view proxy)
}
}
void CURLWrapper::cancel_stream()
{
_stream_cancelled = true;
}
answer_type CURLWrapper::make_request(const http_method &method, string uri,
const parametermap &parameters)
{