20 #ifndef URLPROTOCOLHANDLER_H_
21 #define URLPROTOCOLHANDLER_H_
25 #include <com/avpkit/core/io/IO.h>
27 #include <com/avpkit/core/io/URLProtocolHandlerFactory.h>
29 namespace com {
namespace avpkit {
namespace core {
namespace io
31 class URLProtocolHandlerFactory;
35 typedef enum SeekFlags {
41 typedef enum OpenFlags {
47 typedef enum SeekableFlags {
48 SK_NOT_SEEKABLE =0x00000000,
49 SK_SEEKABLE_NORMAL=0x00000001,
52 virtual const char* getProtocolName();
56 virtual int url_open(
const char *url,
int flags)=0;
57 virtual int url_close()=0;
58 virtual int url_read(
unsigned char* buf,
int size)=0;
59 virtual int url_write(
const unsigned char* buf,
int size)=0;
60 virtual int64_t url_seek(int64_t position,
int whence)=0;
61 virtual SeekableFlags url_seekflags(
const char* url,
int flags)=0;
A class for managing custom io protocols.
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...