history.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * history.h: vlc_history_t (web-browser-like back/forward history) handling
00003  *****************************************************************************
00004  * Copyright (C) 2004 Commonwealth Scientific and Industrial Research
00005  *                    Organisation (CSIRO) Australia
00006  * Copyright (C) 2004 the VideoLAN team
00007  *
00008  * $Id$
00009  *
00010  * Authors: Andre Pang <Andre.Pang@csiro.au>
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00025  *****************************************************************************/
00026 
00027 #ifndef __VLC_HISTORY_H__
00028 #define __VLC_HISTORY_H__
00029 
00030 #include "xarray.h"
00031 
00032 struct history_item_t
00033 {
00034     char * psz_name;
00035     char * psz_uri;
00036 };
00037 
00038 struct history_t
00039 {
00040     unsigned int i_index; /* current index into history */
00041     XArray * p_xarray;
00042 };
00043 
00044 typedef struct history_item_t history_item_t;
00045 typedef struct history_t history_t;
00046 
00047 
00048 /*****************************************************************************
00049  * Exported prototypes
00050  *****************************************************************************/
00051 history_t       * history_New                        ( void );
00052 bool        history_GoBackSavingCurrentItem    ( history_t *,
00053                                                        history_item_t * );
00054 bool        history_GoForwardSavingCurrentItem ( history_t *,
00055                                                        history_item_t * );
00056 bool        history_CanGoBack                  ( history_t * );
00057 bool        history_CanGoForward               ( history_t * );
00058 history_item_t  * history_Item                       ( history_t * );
00059 void              history_Prune                      ( history_t * );
00060 void              history_PruneAndInsert             ( history_t *,
00061                                                        history_item_t * );
00062 unsigned int      history_Count                      ( history_t * );
00063 unsigned int      history_Index                      ( history_t * );
00064 
00065 history_item_t  * historyItem_New                    ( char *, char * );
00066 
00067 #endif /* __VLC_HISTORY_H__ */
00068 

Generated on Wed Mar 31 08:05:20 2010 for VLC by  doxygen 1.5.6