#ifndef VTXQUEUE_H_INCLUDED #define VTXQUEUE_H_INCLUDED /* $Id: vtxqueue.h,v 1.1 1997/04/28 01:58:12 mb Exp mb $ * * Copyright (c) 1994-96 Martin Buck * Read COPYING for more information */ #include #include "xevents.h" /* Usage of priorities: * PRI_LOW: Page-lookahead (use for pages which don't necessarily exist) * PRI_MED: Hotlist * PRI_HIGH: User-initiated background search (search even if page is in cache) * PRI_TOP: For TOP-text pseudo-pages (may even throw out other pages out of active DAUs) * PRI_FGROUND: Search page in foreground immediately. * PRI_FGROUND_NH: Like PRI_FGROUND, but don't update page-history */ enum { PRI_LOW = 1, PRI_MED, PRI_HIGH, PRI_TOP, PRI_FGROUND_NH, PRI_FGROUND, PRI_ALL }; enum { STAT_NEW, STAT_SEARCH, STAT_TIMEOUT, STAT_FOUND, STAT_READ, STAT_READ_MP, STAT_FOUND_MP, STAT_SEARCH_MP }; typedef struct { int page, subpage, firstsubpg, lastsubpg, priority, page_found, keep_running; time_t timeout; } queue_entry_t; extern int vtx_dev_open, dau_status_changed, clear_cache; extern queue_entry_t *dau_status; int get_page(int priority, int page, int subpage, int hour, byte_t *buffer, vtxpgwin_t *vtxwin); void top_getpage(int page, int hour, int minute); int top_flush_getpage(void); void stop_search(int page); int remove_priority(int priority); int queue_itimer(void); void history_insert(int page, int do_select); void history_reset(void); void history_set_status(int page, int status); int timeout_set(int page, int flag); int timeout_check(int page); void timeout_reset(void); #endif /* VTXQUEUE_H_INCLUDED */