Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
50
Src/filereader/HTTPReader.h
Normal file
50
Src/filereader/HTTPReader.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef NULLSOFT_HTTPREADER_H
|
||||
#define NULLSOFT_HTTPREADER_H
|
||||
|
||||
#include "api/service/svcs/svc_fileread.h"
|
||||
|
||||
class HttpReader;
|
||||
|
||||
class HTTPReader : public svc_fileReader
|
||||
{
|
||||
public:
|
||||
HTTPReader() {}
|
||||
virtual ~HTTPReader() { close(); }
|
||||
|
||||
int isMine( const wchar_t *filename, int mode = SvcFileReader::READ );
|
||||
int open( const wchar_t *filename, int mode = SvcFileReader::READ );
|
||||
|
||||
size_t read( int8_t *buffer, size_t length );
|
||||
size_t write( const int8_t *buffer, size_t length ) { return 0; }
|
||||
|
||||
uint64_t bytesAvailable( uint64_t requested );
|
||||
|
||||
void close();
|
||||
void abort();
|
||||
|
||||
uint64_t getLength();
|
||||
uint64_t getPos();
|
||||
|
||||
int canSeek();
|
||||
int seek( uint64_t position );
|
||||
|
||||
int hasHeaders();
|
||||
const char *getHeader( const char *header );
|
||||
|
||||
void setMetaDataCallback( api_readercallback *cb );
|
||||
|
||||
int canPrefetch() { return 0; } // no info fetch on HTTP files
|
||||
|
||||
/*int remove(const char *filename) { return 0; }
|
||||
int move(const char *filename, const char *destfilename) { return 0; }*/
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
|
||||
private:
|
||||
HttpReader *reader = NULL;
|
||||
int hasConnected = 0;
|
||||
char *m_filename = 0;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue