A client for the SmartREST protocol from Cumulocity.

Dependencies:   HTTPClient SmartRest

Committer:
vwochnik
Date:
Fri Jan 24 11:39:32 2014 +0000
Revision:
2:1038411466a6
Child:
3:ce2f116369bd
added abstraction

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vwochnik 2:1038411466a6 1 #ifndef HTTPGENERATORWRAPPER_H
vwochnik 2:1038411466a6 2 #define HTTPGENERATORWRAPPER_H
vwochnik 2:1038411466a6 3
vwochnik 2:1038411466a6 4 #include "DataGenerator.h"
vwochnik 2:1038411466a6 5 #include "MbedDataSink.h"
vwochnik 2:1038411466a6 6 #include "IHTTPData.h"
vwochnik 2:1038411466a6 7
vwochnik 2:1038411466a6 8 class HTTPGeneratorWrapper, public HTTPDataOut {
vwochnik 2:1038411466a6 9 public:
vwochnik 2:1038411466a6 10 HTTPGeneratorWrapper(DataGenerator& generator);
vwochnik 2:1038411466a6 11
vwochnik 2:1038411466a6 12 protected:
vwochnik 2:1038411466a6 13 void readReset();
vwochnik 2:1038411466a6 14 int read(char* buf, size_t len, size_t* pReadLen);
vwochnik 2:1038411466a6 15 int getDataType(char* type, size_t maxTypeLen);
vwochnik 2:1038411466a6 16 bool getIsChunked();
vwochnik 2:1038411466a6 17 size_t getDataLen();
vwochnik 2:1038411466a6 18
vwochnik 2:1038411466a6 19 private:
vwochnik 2:1038411466a6 20 MbedDataSink _sink;
vwochnik 2:1038411466a6 21 size_t _len;
vwochnik 2:1038411466a6 22 size_t _pos;
vwochnik 2:1038411466a6 23 };
vwochnik 2:1038411466a6 24
vwochnik 2:1038411466a6 25 #endif