Andrew Boyson / net

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Wed Aug 28 07:11:58 2019 +0000
Revision:
156:be12b8fd5b21
Parent:
154:ba9879b19d9f
Update HttpShim to pass connection status

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 61:aad055f1b0d1 1 #include <stdbool.h>
andrewboyson 61:aad055f1b0d1 2 #include <stdarg.h>
andrewboyson 61:aad055f1b0d1 3 #include <stdint.h>
andrewboyson 127:fcdfbfad8770 4 #include <time.h>
andrewboyson 61:aad055f1b0d1 5
andrewboyson 156:be12b8fd5b21 6 extern void HttpAddChar (char c);
andrewboyson 156:be12b8fd5b21 7 extern void HttpFillChar (char c, int length);
andrewboyson 156:be12b8fd5b21 8 extern int HttpAddText (const char* text);
andrewboyson 156:be12b8fd5b21 9 extern int HttpAddV (char *fmt, va_list argptr);
andrewboyson 156:be12b8fd5b21 10 extern int HttpAddF (char *fmt, ...);
andrewboyson 156:be12b8fd5b21 11 extern void HttpAddData (const char* data, int length);
andrewboyson 156:be12b8fd5b21 12 extern void HttpAddStream (void (*startFunction)(void), int (*enumerateFunction)(void));
andrewboyson 156:be12b8fd5b21 13 extern void HttpAddNibbleAsHex (int value);
andrewboyson 156:be12b8fd5b21 14 extern void HttpAddByteAsHex (int value);
andrewboyson 156:be12b8fd5b21 15 extern void HttpAddInt12AsHex (int value);
andrewboyson 156:be12b8fd5b21 16 extern void HttpAddInt16AsHex (int value);
andrewboyson 156:be12b8fd5b21 17 extern void HttpAddInt32AsHex (int value);
andrewboyson 156:be12b8fd5b21 18 extern void HttpAddInt64AsHex (int64_t value);
andrewboyson 156:be12b8fd5b21 19 extern void HttpAddBytesAsHex (const uint8_t* value, int size);
andrewboyson 156:be12b8fd5b21 20 extern void HttpAddBytesAsHexRev(const uint8_t* value, int size);
andrewboyson 152:80a3840fc9f8 21
andrewboyson 156:be12b8fd5b21 22 extern void HttpAddTm (struct tm* ptm);
andrewboyson 156:be12b8fd5b21 23 extern bool HttpBufFilled (void);
andrewboyson 54:84ef2b29cf7e 24
andrewboyson 141:25047f31dbab 25 extern void HttpOk(const char* contentType, const char* cacheControl, const char* lastModifiedDate, const char* lastModifiedTime);
andrewboyson 141:25047f31dbab 26 extern char* HttpOkCookieName;
andrewboyson 141:25047f31dbab 27 extern char* HttpOkCookieValue;
andrewboyson 141:25047f31dbab 28 extern int HttpOkCookieMaxAge;
andrewboyson 141:25047f31dbab 29
andrewboyson 156:be12b8fd5b21 30 extern void HttpNotFound (void);
andrewboyson 156:be12b8fd5b21 31 extern void HttpNotModified (void);
andrewboyson 141:25047f31dbab 32
andrewboyson 156:be12b8fd5b21 33 extern int HttpRequestRead(char *p, int len, char** ppMethod, char** ppPath, char** ppQuery, char** ppLastModified, char** ppCookies, int* pContentLength);
andrewboyson 110:67c96c143c2a 34
andrewboyson 129:9c57197fb698 35 extern char* HttpCookiesSplit (char* pCookies, char** ppName, char** ppValue);
andrewboyson 129:9c57197fb698 36 extern char* HttpQuerySplit (char* pQuery, char** ppName, char** ppValue);
andrewboyson 129:9c57197fb698 37 extern int HttpQueryValueAsInt(char* pValue);
andrewboyson 129:9c57197fb698 38 extern void HttpQueryUnencode (char* pValue);
andrewboyson 54:84ef2b29cf7e 39
andrewboyson 54:84ef2b29cf7e 40 extern bool HttpTrace;
andrewboyson 54:84ef2b29cf7e 41
andrewboyson 54:84ef2b29cf7e 42 extern void HttpDateFromDateTime(const char* date, const char *ptime, char* ptext);
andrewboyson 54:84ef2b29cf7e 43 extern void HttpDateFromNow(char* pText);
andrewboyson 54:84ef2b29cf7e 44
andrewboyson 118:067cb5bce7e3 45 extern bool HttpSameStr (const char* pa, const char* pb);
andrewboyson 118:067cb5bce7e3 46 extern bool HttpSameStrCaseInsensitive(const char* pa, const char* pb);
andrewboyson 118:067cb5bce7e3 47 extern bool HttpSameDate (const char* date, const char* time, const char* pOtherDate);
andrewboyson 109:bca6ebe63e32 48
andrewboyson 54:84ef2b29cf7e 49 #define HTTP_DATE_LENGTH 30
andrewboyson 54:84ef2b29cf7e 50
andrewboyson 156:be12b8fd5b21 51 extern void (*HttpFunctionReset )(int connection);
andrewboyson 156:be12b8fd5b21 52 extern void (*HttpFunctionRequest)(int connection, int size, char* pRequestStream, uint32_t positionInRequestStream);
andrewboyson 156:be12b8fd5b21 53 extern bool (*HttpFunctionPoll )(int connection, bool clientFinished);
andrewboyson 145:206bf0d073c7 54