Added callback support to HTTP parser

This commit is contained in:
Ramoe 2020-02-20 10:46:42 +01:00 committed by Thulinma
parent 1d0e68c5a4
commit 4ed5dd21e3
4 changed files with 111 additions and 39 deletions

View file

@ -6,6 +6,7 @@
#include <map>
#include <stdint.h>
#include <stdlib.h>
#include "defines.h"
namespace Util{
bool isDirectory(const std::string &path);
@ -18,6 +19,15 @@ namespace Util{
uint64_t ftell(FILE *stream);
uint64_t fseek(FILE *stream, uint64_t offset, int whence);
class DataCallback{
public:
virtual void dataCallback(const char * ptr, size_t size){
INFO_MSG("default callback, size: %llu", size);
}
};
extern Util::DataCallback defaultDataCallback;
//Forward declaration
class FieldAccX;