HTTP Client data container for form(multipart/form-data)
Dependencies: mbed EthernetInterface HTTPClient mbed-rtos
Diff: HTTPNull.cpp
- Revision:
- 1:77c616a1ab54
diff -r fcd577a3925b -r 77c616a1ab54 HTTPNull.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HTTPNull.cpp Tue Aug 28 14:39:29 2012 +0000 @@ -0,0 +1,48 @@ +/* HTTPNull.cpp */ +//Debug is disabled by default +#if 1 +//Enable debug +#include <cstdio> +#define DBG(x, ...) std::printf("[HTTPNull : DBG]"x"\r\n", ##__VA_ARGS__); +//#define DBG(x, ...) +#define WARN(x, ...) std::printf("[HTTPNull : WARN]"x"\r\n", ##__VA_ARGS__); +#define ERR(x, ...) std::printf("[HTTPNull : ERR]"x"\r\n", ##__VA_ARGS__); + +#else +//Disable debug +#define DBG(x, ...) +#define WARN(x, ...) +#define ERR(x, ...) + +#endif + +#include "HTTPNull.h" + +#define OK 0 + +HTTPNull::HTTPNull() +{ + +} + +//IHTTPDataOut +/*virtual*/ int HTTPNull::write(const char* buf, size_t len) +{ + DBG("write(%p, %d)", buf, len); + return OK; +} + +/*virtual*/ void HTTPNull::setDataType(const char* type) //Internet media type from Content-Type header +{ + DBG("setDataType(%s)", type); +} + +/*virtual*/ void HTTPNull::setIsChunked(bool chunked) //From Transfer-Encoding header +{ + +} + +/*virtual*/ void HTTPNull::setDataLen(size_t len) //From Content-Length header, or if the transfer is chunked, next chunk length +{ + DBG("setDataLen(%d)", len); +}