history.h
上传用户:riyaled888
上传日期:2009-03-27
资源大小:7338k
文件大小:3k
源码类别:

多媒体

开发平台:

MultiPlatform

  1. /*****************************************************************************
  2.  * history.h: vlc_history_t (web-browser-like back/forward history) handling
  3.  *****************************************************************************
  4.  * Copyright (C) 2004 Commonwealth Scientific and Industrial Research
  5.  *                    Organisation (CSIRO) Australia
  6.  * Copyright (C) 2004 VideoLAN
  7.  *
  8.  * $Id: history.h 7397 2004-04-20 17:27:30Z sam $
  9.  *
  10.  * Authors: Andre Pang <Andre.Pang@csiro.au>
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version.
  16.  *
  17.  * This program is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20.  * GNU General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU General Public License
  23.  * along with this program; if not, write to the Free Software
  24.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  25.  *****************************************************************************/
  26. #ifndef __VLC_HISTORY_H__
  27. #define __VLC_HISTORY_H__
  28. #define XARRAY_EMBED_IN_HOST_C_FILE
  29. #include "xarray.h"
  30. struct history_item_t
  31. {
  32.     char * psz_name;
  33.     char * psz_uri;
  34. };
  35. struct history_t
  36. {
  37.     unsigned int i_index; /* current index into history */
  38.     XArray * p_xarray;
  39. };
  40. typedef struct history_item_t history_item_t;
  41. typedef struct history_t history_t;
  42. /*****************************************************************************
  43.  * Exported prototypes
  44.  *****************************************************************************/
  45. history_t       * history_New                        ();
  46. vlc_bool_t        history_GoBackSavingCurrentItem    ( history_t *,
  47.                                                        history_item_t * );
  48. vlc_bool_t        history_GoForwardSavingCurrentItem ( history_t *,
  49.                                                        history_item_t * );
  50. vlc_bool_t        history_CanGoBack                  ( history_t * );
  51. vlc_bool_t        history_CanGoForward               ( history_t * );
  52. history_item_t  * history_Item                       ( history_t * );
  53. void              history_Prune                      ( history_t * );
  54. void              history_PruneAndInsert             ( history_t *,
  55.                                                        history_item_t * );
  56. unsigned int      history_Count                      ( history_t * );
  57. unsigned int      history_Index                      ( history_t * );
  58. history_item_t  * historyItem_New                    ( char *, char * );
  59. #endif /* __VLC_HISTORY_H__ */