/*                                                     W3C Sample Code Library libwww HISTORY
                                     HISTORY MANAGER
                                             
 */
/*
**      (c) COPYRIGHT MIT 1995.
**      Please first read the full copyright statement in the file COPYRIGH.
*/
/*

   or non-destructive backtrack, and list sequencing (previous, next) operations.
   
   If you are building a client, you don't have to use this: just don't call it. This
   module is not used by any other modules in the libwww, so if you don't refer to it you
   don't get it in your linked application.
   
   This module is implemented by HTHist.c, and it is a part of the W3C Sample Code
   Library.
   
 */
#ifndef HTHISTORY_H
#define HTHISTORY_H

#include "HTAnchor.h"
/*

CREATION AND DELETION METHODS

 */
typedef struct _HTHistory HTHistory;

extern HTHistory *HTHistory_new         (void);
extern BOOL HTHistory_delete            (HTHistory *old);
/*

ADD AND DELETE HISTORY ELEMENTS

  Record an entry in a list
  
 */
extern BOOL HTHistory_record            (HTHistory *hist, HTAnchor *cur);
/*

  Replace list with new element
  
      before: a b c d e
      
      after : a b f
      
 */
extern BOOL HTHistory_replace           (HTHistory *hist, HTAnchor *cur);
/*

  Delete last entry in a list
  
 */
extern BOOL HTHistory_removeLast        (HTHistory *hist);
/*

  Remove the History list from position
  
 */
extern BOOL HTHistory_removeFrom        (HTHistory *hist, int pos);
/*

  Number of elements stored
  
 */
extern int HTHistory_count              (HTHistory *hist);
/*

  Current Position
  
 */
extern int HTHistory_position           (HTHistory *hist);
/*

  Find and re-register visited anchor
  
   is updated.
   
 */
extern HTAnchor * HTHistory_recall      (HTHistory *hist, int pos);
/*

  Find Entry at position
  
   HTHistory_recall but without re-registration. Un success, the current position is
   updated to the value 'pos' value.
   
 */
extern HTAnchor * HTHistory_find        (HTHistory *hist, int pos);
/*

  List the History List
  
   HTHistory_find() but does not update the current position
   
 */
extern HTAnchor * HTHistory_list        (HTHistory *hist, int pos);
/*

NAVIGATION

  Can we back in history
  
 */
extern BOOL HTHistory_canBacktrack      (HTHistory *hist);
/*

  Backtrack with deletion
  
 */
extern HTAnchor * HTHistory_backtrack   (HTHistory *hist);
/*

  Backtrack without deletion
  
 */
extern HTAnchor * HTHistory_back        (HTHistory *hist);
/*

  Can we go forward
  
 */
extern BOOL HTHistory_canForward        (HTHistory *hist);
/*

  Forward
  
 */
extern HTAnchor * HTHistory_forward     (HTHistory *hist);

#endif /* HTHISTORY_H */
/*

   
   ___________________________________
   
                            @(#) $Id: HTHist.html,v 2.14 1998/05/14 02:10:32 frystyk Exp $
                                                                                          
   */
