00001 /***************************************************************************** 00002 * vlc_epg.h: Electronic Program Guide 00003 ***************************************************************************** 00004 * Copyright (C) 2007 the VideoLAN team 00005 * $Id: ded3f7f09ffda3c734db3ee33b03af974a9b955c $ 00006 * 00007 * Authors: Laurent Aimar <fenrir@via.ecp.fr> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00022 *****************************************************************************/ 00023 00024 #ifndef VLC_EPG_H 00025 #define VLC_EPG_H 1 00026 00027 /** 00028 * \file 00029 * This file defines functions and structures for storing dvb epg information 00030 */ 00031 00032 typedef struct 00033 { 00034 int64_t i_start; /* Interpreted as a value return by time() */ 00035 int i_duration; /* Duration of the event in second */ 00036 00037 char *psz_name; 00038 char *psz_short_description; 00039 char *psz_description; 00040 00041 } vlc_epg_event_t; 00042 00043 typedef struct 00044 { 00045 char *psz_name; 00046 vlc_epg_event_t *p_current; /* Can be null or should be the same than one of pp_event entry */ 00047 00048 int i_event; 00049 vlc_epg_event_t **pp_event; 00050 } vlc_epg_t; 00051 00052 /** 00053 * It initializes a vlc_epg_t. 00054 * 00055 * You must call vlc_epg_Clean to release the associated resource. 00056 */ 00057 VLC_EXPORT(void, vlc_epg_Init, (vlc_epg_t *p_epg, const char *psz_name)); 00058 00059 /** 00060 * It releases all resources associated to a vlc_epg_t 00061 */ 00062 VLC_EXPORT(void, vlc_epg_Clean, (vlc_epg_t *p_epg)); 00063 00064 /** 00065 * It creates and appends a new vlc_epg_event_t to a vlc_epg_t. 00066 * 00067 * \see vlc_epg_t for the definitions of the parameters. 00068 */ 00069 VLC_EXPORT(void, vlc_epg_AddEvent, (vlc_epg_t *p_epg, int64_t i_start, int i_duration, const char *psz_name, const char *psz_short_description, const char *psz_description)); 00070 00071 /** 00072 * It creates a new vlc_epg_t* 00073 * 00074 * You must call vlc_epg_Delete to release the associated resource. 00075 */ 00076 VLC_EXPORT(vlc_epg_t *, vlc_epg_New, (const char *psz_name)); 00077 00078 /** 00079 * It releases a vlc_epg_t*. 00080 */ 00081 VLC_EXPORT(void, vlc_epg_Delete, (vlc_epg_t *p_epg)); 00082 00083 /** 00084 * It set the current event of a vlc_epg_t given a start time 00085 */ 00086 VLC_EXPORT(void, vlc_epg_SetCurrent, (vlc_epg_t *p_epg, int64_t i_start)); 00087 00088 /** 00089 * It merges all the event of \p p_src and \p p_dst into \p p_dst. 00090 * 00091 * \p p_src is not modified. 00092 */ 00093 VLC_EXPORT(void, vlc_epg_Merge, (vlc_epg_t *p_dst, const vlc_epg_t *p_src)); 00094 00095 #endif 00096
1.5.6