Main Page | Class List | File List | Class Members | File Members

fetch.c File Reference

Fetch and process the rss file. More...

#include "fetch.h"

Go to the source code of this file.

Functions

int find_in_file (FILE *fd, char *string)
void process_rss (xmlNode *root_node, int config_item_i)
time_t string_to_time (char *data)
enum HTTP_STATE process_header (char *data, int len, int config_item_i)
void * fetch_thread (void *parameters)
char * fetch (int *responsesize, const char *host, const uint16_t port, const char *request)


Detailed Description

Fetch and process the rss file.

Definition in file fetch.c.


Function Documentation

char* fetch int *  responsesize,
const char *  host,
const uint16_t  port,
const char *  request
 

Definition at line 286 of file fetch.c.

References DEBUG1, DEBUG2, FETCH_BUFFER_SIZE, and WRITE_BUFFER_SIZE.

Referenced by fetch_thread().

void* fetch_thread void *  parameters  ) 
 

Definition at line 207 of file fetch.c.

References config, config_item::cookies, config_item::cookies_count, DEBUG2, cookie::expires, fetch(), HTTP_STATE_ERROR, HTTP_STATE_OK, HTTP_STATE_REDIRECT, MIN, process_header(), process_rss(), and strlcpy().

Referenced by main().

int find_in_file FILE *  fd,
char *  string
 

Find line exact to null terminated string in opened for read file

Parameters:
fd file descriptor
string null terminated string to be found (without end-of-line char)

Definition at line 33 of file fetch.c.

References DEBUG3.

Referenced by process_rss().

enum HTTP_STATE process_header char *  data,
int  len,
int  config_item_i
 

Definition at line 117 of file fetch.c.

References config, config_item::cookies, config_item::cookies_count, cookie::data, DEBUG2, DEBUG4, cookie::expires, config_item::host, HTTP_STATE, HTTP_STATE_ERROR, HTTP_STATE_OK, HTTP_STATE_REDIRECT, MIN, parse_url(), config_item::port, config_item::request, string_to_time(), and strlcpy().

Referenced by fetch_thread().

void process_rss xmlNode *  root_node,
int  config_item_i
 

Definition at line 49 of file fetch.c.

References config, directory, execute(), find_in_file(), md5(), PATH_MAX, and replace_fields().

Referenced by fetch_thread().

time_t string_to_time char *  data  ) 
 

Definition at line 109 of file fetch.c.

Referenced by process_header().


Generated on Fri May 26 08:40:18 2006 for RSSbgr by doxygen 1.3.6