input/Tidal*Request: add Start() method
The caller should be able to safely store the instance pointer before his callback is invoked.
This commit is contained in:
@@ -46,6 +46,8 @@ public:
|
||||
|
||||
/**
|
||||
* An asynchronous request for the streaming URL of a Tidal track.
|
||||
*
|
||||
* After construction, call Start() to initiate the request.
|
||||
*/
|
||||
class TidalTrackRequest final : CurlResponseHandler {
|
||||
CurlSlist request_headers;
|
||||
@@ -74,6 +76,10 @@ public:
|
||||
|
||||
~TidalTrackRequest() noexcept;
|
||||
|
||||
void Start() {
|
||||
request.StartIndirect();
|
||||
}
|
||||
|
||||
private:
|
||||
/* virtual methods from CurlResponseHandler */
|
||||
void OnHeaders(unsigned status,
|
||||
|
||||
Reference in New Issue
Block a user