|
FAUST compiler
0.9.9.6b8
|

Go to the source code of this file.
Macros | |
| #define | FETCHER_ERROR 0 |
| #define | ERRNO 1 |
| #define | H_ERRNO 2 |
| #define | HF_SUCCESS 0 |
| #define | HF_METAERROR 1 |
| #define | HF_NULLURL 2 |
| #define | HF_HEADTIMEOUT 3 |
| #define | HF_DATATIMEOUT 4 |
| #define | HF_FRETURNCODE 5 |
| #define | HF_CRETURNCODE 6 |
| #define | HF_STATUSCODE 7 |
| #define | HF_CONTENTLEN 8 |
| #define | HF_HERROR 9 |
| #define | HF_CANTREDIRECT 10 |
| #define | HF_MAXREDIRECTS 11 |
| #define | PORT_NUMBER 80 |
| #define | HTTP_VERSION "HTTP/1.0" |
| #define | DEFAULT_USER_AGENT "HTTP Fetcher" |
| #define | DEFAULT_READ_TIMEOUT |
| #define | REQUEST_BUF_SIZE 1024 |
| #define | HEADER_BUF_SIZE 1024 |
| #define | DEFAULT_PAGE_BUF_SIZE 1024 * 200 /* 200K should hold most things */ |
| #define | DEFAULT_REDIRECTS 3 /* Number of HTTP redirects to follow */ |
Functions | |
| int | http_fetch (const char *url, char **fileBuf) |
| int | http_setUserAgent (const char *newAgent) |
| int | http_setReferer (const char *newReferer) |
| void | http_setTimeout (int seconds) |
| void | http_setRedirects (int redirects) |
| int | http_parseFilename (const char *url, char **filename) |
| void | http_perror (const char *string) |
| const char * | http_strerror () |
| int | _http_read_header (int sock, char *headerPtr) |
| int | makeSocket (char *host) |
| int | _checkBufSize (char **buf, int *bufsize, int more) |
| #define DEFAULT_PAGE_BUF_SIZE 1024 * 200 /* 200K should hold most things */ |
Definition at line 50 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define DEFAULT_READ_TIMEOUT |
Definition at line 45 of file sourcefetcher.hh.
| #define DEFAULT_REDIRECTS 3 /* Number of HTTP redirects to follow */ |
Definition at line 51 of file sourcefetcher.hh.
| #define DEFAULT_USER_AGENT "HTTP Fetcher" |
Definition at line 44 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define ERRNO 1 |
Definition at line 25 of file sourcefetcher.hh.
Referenced by _http_read_header(), http_fetch(), http_parseFilename(), http_perror(), http_setReferer(), http_setUserAgent(), http_strerror(), and makeSocket().
| #define FETCHER_ERROR 0 |
Definition at line 24 of file sourcefetcher.hh.
Referenced by _http_read_header(), http_fetch(), http_parseFilename(), http_perror(), and http_strerror().
| #define H_ERRNO 2 |
Definition at line 26 of file sourcefetcher.hh.
Referenced by http_perror(), http_strerror(), and makeSocket().
| #define HEADER_BUF_SIZE 1024 |
Definition at line 49 of file sourcefetcher.hh.
Referenced by _http_read_header(), and http_fetch().
| #define HF_CANTREDIRECT 10 |
Definition at line 39 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_CONTENTLEN 8 |
Definition at line 37 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_CRETURNCODE 6 |
Definition at line 35 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_DATATIMEOUT 4 |
Definition at line 33 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_FRETURNCODE 5 |
Definition at line 34 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_HEADTIMEOUT 3 |
Definition at line 32 of file sourcefetcher.hh.
Referenced by _http_read_header().
| #define HF_HERROR 9 |
Definition at line 38 of file sourcefetcher.hh.
Referenced by http_strerror().
| #define HF_MAXREDIRECTS 11 |
Definition at line 40 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_METAERROR 1 |
Definition at line 30 of file sourcefetcher.hh.
Referenced by http_strerror().
| #define HF_NULLURL 2 |
Definition at line 31 of file sourcefetcher.hh.
Referenced by http_fetch(), and http_parseFilename().
| #define HF_STATUSCODE 7 |
Definition at line 36 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define HF_SUCCESS 0 |
Definition at line 29 of file sourcefetcher.hh.
| #define HTTP_VERSION "HTTP/1.0" |
Definition at line 43 of file sourcefetcher.hh.
Referenced by http_fetch().
| #define PORT_NUMBER 80 |
Definition at line 42 of file sourcefetcher.hh.
Referenced by makeSocket().
| #define REQUEST_BUF_SIZE 1024 |
Definition at line 48 of file sourcefetcher.hh.
Referenced by http_fetch().
| int _checkBufSize | ( | char ** | buf, |
| int * | bufsize, | ||
| int | more | ||
| ) |
Definition at line 827 of file sourcefetcher.cpp.
Referenced by http_fetch().

| int _http_read_header | ( | int | sock, |
| char * | headerPtr | ||
| ) |
Definition at line 720 of file sourcefetcher.cpp.
References ERRNO, errorInt, errorSource, FETCHER_ERROR, HEADER_BUF_SIZE, HF_HEADTIMEOUT, http_errno, and timeout.
Referenced by http_fetch().

| int http_fetch | ( | const char * | url, |
| char ** | fileBuf | ||
| ) |
Definition at line 95 of file sourcefetcher.cpp.
References _checkBufSize(), _http_read_header(), DEFAULT_PAGE_BUF_SIZE, DEFAULT_USER_AGENT, ERRNO, errorInt, errorSource, FETCHER_ERROR, followRedirects, HEADER_BUF_SIZE, HF_CANTREDIRECT, HF_CONTENTLEN, HF_CRETURNCODE, HF_DATATIMEOUT, HF_FRETURNCODE, HF_MAXREDIRECTS, HF_NULLURL, HF_STATUSCODE, hideReferer, hideUserAgent, http_errno, HTTP_VERSION, makeSocket(), referer, REQUEST_BUF_SIZE, timeout, userAgent, and VERSION.
Referenced by check_url(), and SourceReader::parse().


| int http_parseFilename | ( | const char * | url, |
| char ** | filename | ||
| ) |
Definition at line 598 of file sourcefetcher.cpp.
References ERRNO, errorSource, FETCHER_ERROR, HF_NULLURL, and http_errno.
| void http_perror | ( | const char * | string | ) |
Definition at line 632 of file sourcefetcher.cpp.
References ERRNO, errorInt, errorSource, FETCHER_ERROR, H_ERRNO, http_errlist, and http_errno.
Referenced by SourceReader::parse().

| void http_setRedirects | ( | int | redirects | ) |
| int http_setReferer | ( | const char * | newReferer | ) |
Definition at line 535 of file sourcefetcher.cpp.
References ERRNO, errorSource, hideReferer, and referer.
| void http_setTimeout | ( | int | seconds | ) |
Definition at line 569 of file sourcefetcher.cpp.
References timeout.
| int http_setUserAgent | ( | const char * | newAgent | ) |
Definition at line 502 of file sourcefetcher.cpp.
References ERRNO, errorSource, hideUserAgent, and userAgent.
| const char* http_strerror | ( | ) |
Definition at line 675 of file sourcefetcher.cpp.
References abs(), convertedError, ERRNO, errorInt, errorSource, FETCHER_ERROR, H_ERRNO, HF_HERROR, HF_METAERROR, http_errlist, and http_errno.
Referenced by check_url().


| int makeSocket | ( | char * | host | ) |
Definition at line 779 of file sourcefetcher.cpp.
References ERRNO, errorSource, H_ERRNO, and PORT_NUMBER.
Referenced by http_fetch().

1.8.7