/* Simple BBC News ticker client
 * (c) Darren Salt
 * GPL applies
 * $Id: fetch.h,v 1.4 2003/06/02 16:58:26 ds Exp $
 */

#ifndef _Ticker_FETCH_H_
#define _Ticker_FETCH_H_

typedef struct
{
  char allowed, aborted;
}
fetch_status;

extern fetch_status fetch;
extern char *headings_data, *stories_data;


char *fetch_file (const char path[], int *dlen, const char extra_headers[],
		  const char desc[], int lead_lf);

int init_stories (void);
int fetch_stories_file (int lead_lf);
void free_stories (void);
char *append_story (int num, char *ptr);
char *append_resource (char *ptr);

int fetch_ticker (int force);
void abort_fetch (void);

void click_proxy_auth (void);
int key_proxy_auth (void);

int time_to_update (void);
int get_next_update_time (void);
void free_old_data (void);

int is_fetch_allowed (void);

#endif
