NetBurner 3.5.0
PDF Version
 
web_client.h
Go to the documentation of this file.
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
9#ifndef _WEB_CLIENT_H
10#define _WEB_CLIENT_H
11
69#include <nbstring.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)
89#define WEB_CLIENT_ERROR_LAST_STATE (10)
90
91extern const char *web_error_state_text[WEB_CLIENT_ERROR_LAST_STATE + 1];
92
93#ifndef WebErrorReporterFunc
94typedef void(WebErrorReporterFunc)(int ErrorState);
95#endif
96
101extern WebErrorReporterFunc *pWebErrorReporter;
102
111bool DoActualClientRequest(ParsedURI &TheUri, uint16_t &next_time_delay);
112
123bool StartWebClient(int prio, const char *url1, const char *url2 = NULL, bool bDoNtp = false);
124
135bool StartWebClient(int prio, const NBString &url1, const NBString &url2, bool bDoNtp = false);
136
146bool StartWebClient(int prio, const NBString &url1, bool bDoNtp = false);
147
148// Semaphore to wake web client early
149extern OS_SEM WebClientSem;
150
153#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
JSON HTTP functions.
NetBurner String Class.
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition nbrtos.h:386