|
a/src/mediaserver/cdplugins/curlfetch.h |
|
b/src/mediaserver/cdplugins/curlfetch.h |
|
... |
|
... |
27 |
class CurlFetch {
|
27 |
class CurlFetch {
|
28 |
public:
|
28 |
public:
|
29 |
CurlFetch(const std::string& url);
|
29 |
CurlFetch(const std::string& url);
|
30 |
~CurlFetch();
|
30 |
~CurlFetch();
|
31 |
|
31 |
|
|
|
32 |
const std::string& url();
|
|
|
33 |
|
32 |
void setTimeout(int secs);
|
34 |
void setTimeout(int secs);
|
33 |
|
35 |
|
34 |
/// Start the transfer to the output queue.
|
36 |
/// Start the transfer to the output queue.
|
35 |
bool start(BufXChange<ABuffer*> *queue, uint64_t offset = 0);
|
37 |
bool start(BufXChange<ABuffer*> *queue, uint64_t offset = 0);
|
36 |
|
38 |
|
|
... |
|
... |
41 |
bool headerValue(const std::string& nm, std::string& val);
|
43 |
bool headerValue(const std::string& nm, std::string& val);
|
42 |
|
44 |
|
43 |
// Check if the curl thread is done and retrieve the results if it
|
45 |
// Check if the curl thread is done and retrieve the results if it
|
44 |
// is. This does not wait, it returns false if the transfer is
|
46 |
// is. This does not wait, it returns false if the transfer is
|
45 |
// still running.
|
47 |
// still running.
|
46 |
bool curlDone(int *curlcode, long *http_code);
|
48 |
bool curlDone(int *curlcode, int *http_code);
|
|
|
49 |
|
|
|
50 |
/// Reset after transfer done, for retrying for exemple.
|
|
|
51 |
void reset();
|
47 |
|
52 |
|
48 |
// Callbacks
|
53 |
// Callbacks
|
49 |
|
54 |
|
50 |
// A function to create the first buffer (typically for prepending
|
55 |
// A function to create the first buffer (typically for prepending
|
51 |
// a wav header to a raw pcm stream. If set this is called from
|
56 |
// a wav header to a raw pcm stream. If set this is called from
|