/* Copyright 1997 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/***************************************************/
/* File   : History.h                              */
/*                                                 */
/* Purpose: Handles the browser History.           */
/*                                                 */
/* Author : A.D.Hodgkinson                         */
/*                                                 */
/* History: 07-Feb-97: Created.                    */
/*                                                 */
/*          06-Nov-97: Major revision, largely a   */
/*                     complete rewrite to make    */
/*                     the system more flexible    */
/*                     and less prone to bugs (but */
/*                     still do Back/Forward as in */
/*                     Navigator 2, rather than    */
/*                     Navigator 3).               */
/***************************************************/

/* Function prototypes */

_kernel_oserror * history_record           (browser_data * b, const char * url);
_kernel_oserror * history_inherit          (browser_data * parent, browser_data * child);
void              history_remove           (browser_data * b, const char * url);

_kernel_oserror * history_add_title        (const char * url, const char * title);
char            * history_return_title     (char * url);

_kernel_oserror * history_expire           (browser_data * b, unsigned int time);
int               history_count            (void);
_kernel_oserror * history_limit            (unsigned int size);

int               history_visited          (const char * url);

int               history_empty            (browser_data * b);
int               history_can_go_backwards (browser_data * b);
int               history_can_go_forwards  (browser_data * b);
_kernel_oserror * history_fetch_backwards  (browser_data * b, int new_view);
_kernel_oserror * history_fetch_forwards   (browser_data * b, int new_view);

_kernel_oserror * history_menu_popup       (browser_data * b, ObjectId object, ComponentId component, int global, int show_urls);
_kernel_oserror * history_build_menu       (browser_data * b, int x, int y, int global, int show_urls, int subtract);
_kernel_oserror * history_menu_selection   (browser_data * b, WimpPollBlock * block);

_kernel_oserror * history_load             (char * pathname);
_kernel_oserror * history_save             (char * pathname);
_kernel_oserror * history_save_as_html     (char * pathname, browser_data * b);

int               history_find_match       (char * buffer, int buffer_size);