|
FAUST compiler
0.9.9.6b8
|
#include <stdlib.h>#include <stdio.h>#include <string.h>#include <ctype.h>#include <errno.h>#include <sys/types.h>#include <strings.h>#include <netdb.h>#include <unistd.h>#include <netinet/in.h>#include <sys/socket.h>#include <sys/time.h>#include "compatibility.hh"#include "sourcefetcher.hh"
Go to the source code of this file.
Macros | |
| #define | VERSION "0" |
Functions | |
| int | http_fetch (const char *url_tmp, 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) |
Variables | |
| int | timeout = DEFAULT_READ_TIMEOUT |
| char * | userAgent = NULL |
| char * | referer = NULL |
| int | hideUserAgent = 0 |
| int | hideReferer = 1 |
| static int | followRedirects = DEFAULT_REDIRECTS |
| const char * | http_errlist [] |
| char | convertedError [128] |
| static int | errorSource = 0 |
| static int | http_errno = 0 |
| static int | errorInt = 0 |
| #define VERSION "0" |
Definition at line 48 of file sourcefetcher.cpp.
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_tmp, |
| 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().

| char convertedError |
Definition at line 87 of file sourcefetcher.cpp.
Referenced by http_strerror().
|
static |
Definition at line 64 of file sourcefetcher.cpp.
Referenced by _http_read_header(), http_fetch(), http_perror(), and http_strerror().
|
static |
Definition at line 62 of file sourcefetcher.cpp.
Referenced by _http_read_header(), http_fetch(), http_parseFilename(), http_perror(), http_setReferer(), http_setUserAgent(), http_strerror(), and makeSocket().
|
static |
Definition at line 56 of file sourcefetcher.cpp.
Referenced by http_fetch(), and http_setRedirects().
| int hideReferer = 1 |
Definition at line 55 of file sourcefetcher.cpp.
Referenced by http_fetch(), and http_setReferer().
| int hideUserAgent = 0 |
Definition at line 54 of file sourcefetcher.cpp.
Referenced by http_fetch(), and http_setUserAgent().
| const char * http_errlist |
Definition at line 67 of file sourcefetcher.cpp.
Referenced by http_perror(), and http_strerror().
|
static |
Definition at line 63 of file sourcefetcher.cpp.
Referenced by _http_read_header(), http_fetch(), http_parseFilename(), http_perror(), and http_strerror().
| char* referer = NULL |
Definition at line 53 of file sourcefetcher.cpp.
Referenced by http_fetch(), and http_setReferer().
| int timeout = DEFAULT_READ_TIMEOUT |
Definition at line 51 of file sourcefetcher.cpp.
Referenced by _http_read_header(), http_fetch(), and http_setTimeout().
| char* userAgent = NULL |
Definition at line 52 of file sourcefetcher.cpp.
Referenced by http_fetch(), and http_setUserAgent().
1.8.7