2 * Copyright 2016, Dario Casalinuovo
3 * Distributed under the terms of the MIT License.
5 #ifndef _HTTP_MEDIA_IO_H
6 #define _HTTP_MEDIA_IO_H
10 #include <FileRequest.h>
12 #include <UrlContext.h>
13 #include <UrlProtocolAsynchronousListener.h>
18 class HTTPMediaIO
: public BAdapterIO
{
20 HTTPMediaIO(BUrl url
);
21 virtual ~HTTPMediaIO();
23 virtual void GetFlags(int32
* flags
) const;
25 virtual ssize_t
WriteAt(off_t position
,
26 const void* buffer
, size_t size
);
28 virtual status_t
SetSize(off_t size
);
30 virtual status_t
Open();
32 virtual bool IsRunning() const;
35 virtual status_t
SeekRequested(off_t position
);
41 friend class FileListener
;
44 FileListener
* fListener
;