NetBurner 3.5.6
PDF Version
web_client.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
9#ifndef _WEB_CLIENT_H
10#define _WEB_CLIENT_H
11
69#include <nbstring.h>
70#include <webclient/http_funcs.h>
71
77#define WEB_CLIENT_ERROR_NO_ETHERNET (1)
78#define WEB_CLIENT_ERROR_NO_ADDRESS (2)
79#define WEB_CLIENT_ERROR_NO_GATEWAY (3)
80#define WEB_CLIENT_ERROR_GATEWAY_WRONG (4)
81#define WEB_CLIENT_ERROR_NO_DNS_ADDR (5)
82#define WEB_CLIENT_ERROR_NO_DNS_RESOLVE (6)
83#define WEB_CLIENT_ERROR_NO_NTP (7)
84#define WEB_CLIENT_ERROR_NO_SERVER_RESPONSE (8)
85#define WEB_CLIENT_ERROR_NO_SERVER_CONNECT (9)
86#define WEB_CLIENT_ERROR_NO_ERROR (10)
87#define WEB_CLIENT_ERROR_INVALID_REQ (11)
90#define WEB_CLIENT_ERROR_LAST_STATE (10)
91
92extern const char *web_error_state_text[WEB_CLIENT_ERROR_LAST_STATE + 1];
93
94#ifndef WebErrorReporterFunc
95typedef void(WebErrorReporterFunc)(int ErrorState);
96#endif
97
102extern WebErrorReporterFunc *pWebErrorReporter;
103
112bool DoActualClientRequest(ParsedURI &TheUri, uint16_t &next_time_delay);
113
124bool StartWebClient(int prio, const char *url1, const char *url2 = NULL, bool bDoNtp = false);
125
136bool StartWebClient(int prio, const NBString &url1, const NBString &url2, bool bDoNtp = false);
137
147bool StartWebClient(int prio, const NBString &url1, bool bDoNtp = false);
148
149// Semaphore to wake web client early
150extern OS_SEM WebClientSem;
151
154#endif
Lightweight alternative to C++ CString class.
Definition nbstring.h:118
Parsed Uniform Resource Identifier Class (URI)
Definition http_funcs.h:62
WebErrorReporterFunc * pWebErrorReporter
Set this variable to a callback function to specify a handler for errors.
bool StartWebClient(int prio, const char *url1, const char *url2=NULL, bool bDoNtp=false)
Start the web client using a URL string.
bool DoActualClientRequest(ParsedURI &TheUri, uint16_t &next_time_delay)
Callback to specify for performing and handle a WebClient request.
Definition WebClient/FindMyIpTask/src/main.cpp:26