NetBurner 3.1
web_client.h
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
5 #ifndef _WEB_CLIENT_H
6 #define _WEB_CLIENT_H
7 
8 #include <nbstring.h>
9 #include <webclient/http_funcs.h>
10 
11 #define WEB_CLIENT_ERROR_NO_ETHERNET (1)
12 #define WEB_CLIENT_ERROR_NO_ADDRESS (2)
13 #define WEB_CLIENT_ERROR_NO_GATEWAY (3)
14 #define WEB_CLIENT_ERROR_GATEWAY_WRONG (4)
15 #define WEB_CLIENT_ERROR_NO_DNS_ADDR (5)
16 #define WEB_CLIENT_ERROR_NO_DNS_RESOLVE (6)
17 #define WEB_CLIENT_ERROR_NO_NTP (7)
18 #define WEB_CLIENT_ERROR_NO_SERVER_RESPONSE (8)
19 #define WEB_CLIENT_ERROR_NO_SERVER_CONNECT (9)
20 #define WEB_CLIENT_ERROR_NO_ERROR (10)
21 
22 #define WEB_CLIENT_ERROR_LAST_STATE (10)
23 
24 extern const char *web_error_state_text[WEB_CLIENT_ERROR_LAST_STATE + 1];
25 
26 #ifndef WebErrorReporterFunc
27 typedef void(WebErrorReporterFunc)(int ErrorState);
28 #endif
29 
30 extern WebErrorReporterFunc *pWebErrorReporter;
31 
32 bool DoActualClientRequest(ParsedURI &TheUri, uint16_t &next_time_delay);
33 bool StartWebClient(int prio, const char *url1, const char *url2 = NULL, bool bDoNtp = false);
34 bool StartWebClient(int prio, const NBString &Url1, const NBString &url2, bool bDoNtp = false);
35 bool StartWebClient(int prio, const NBString &Url1, bool bDoNtp = false);
36 
37 // Semaphore to wake web client early
38 extern OS_SEM WebClientSem;
39 
40 #endif
Semaphores are used to control access to shared resource critical section, or to communicate between ...
Definition: nbrtos.h:318
#define NULL
Definition: nm_bsp.h:76