input/curl: add public function to construct an instance
This commit is contained in:
parent
f392e13077
commit
1ad21c27c9
@ -468,6 +468,14 @@ CurlInputStream::Open(const char *url,
|
|||||||
return std::make_unique<IcyInputStream>(std::move(c), std::move(icy));
|
return std::make_unique<IcyInputStream>(std::move(c), std::move(icy));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InputStreamPtr
|
||||||
|
OpenCurlInputStream(const char *uri,
|
||||||
|
const std::multimap<std::string, std::string> &headers,
|
||||||
|
Mutex &mutex, Cond &cond)
|
||||||
|
{
|
||||||
|
return CurlInputStream::Open(uri, headers, mutex, cond);
|
||||||
|
}
|
||||||
|
|
||||||
static InputStreamPtr
|
static InputStreamPtr
|
||||||
input_curl_open(const char *url, Mutex &mutex, Cond &cond)
|
input_curl_open(const char *url, Mutex &mutex, Cond &cond)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,26 @@
|
|||||||
#ifndef MPD_INPUT_CURL_HXX
|
#ifndef MPD_INPUT_CURL_HXX
|
||||||
#define MPD_INPUT_CURL_HXX
|
#define MPD_INPUT_CURL_HXX
|
||||||
|
|
||||||
|
#include "input/Ptr.hxx"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
class Mutex;
|
||||||
|
class Cond;
|
||||||
|
|
||||||
extern const struct InputPlugin input_plugin_curl;
|
extern const struct InputPlugin input_plugin_curl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a #CurlInputStream with custom request headers.
|
||||||
|
*
|
||||||
|
* This stream does not support Icy metadata.
|
||||||
|
*
|
||||||
|
* Throws on error.
|
||||||
|
*/
|
||||||
|
InputStreamPtr
|
||||||
|
OpenCurlInputStream(const char *uri,
|
||||||
|
const std::multimap<std::string, std::string> &headers,
|
||||||
|
Mutex &mutex, Cond &cond);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user