libdvbpsi  1.3.0
rst.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * rst.h
00003  * Copyright (c) 2012 VideoLAN
00004  * $Id$
00005  *
00006  * Authors: Corno Roberto <corno.roberto@gmail.com>
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021  *
00022  *****************************************************************************/
00023 
00033 #ifndef _DVBPSI_RST_H_
00034 #define _DVBPSI_RST_H_
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 /*****************************************************************************
00041  * dvbpsi_rst_event_t
00042  *****************************************************************************/
00054 typedef struct dvbpsi_rst_event_s
00055 {
00056   uint16_t                  i_ts_id;                
00057   uint16_t                  i_orig_network_id;      
00058   uint16_t                  i_service_id;           
00059   uint16_t                  i_event_id;             
00060   uint8_t                   i_running_status;       
00062   struct dvbpsi_rst_event_s * p_next;               
00065 } dvbpsi_rst_event_t;
00066 
00067 /*****************************************************************************
00068  * dvbpsi_rst_t
00069  *****************************************************************************/
00081 typedef struct dvbpsi_rst_s
00082 {
00083   dvbpsi_rst_event_t *      p_first_event;      
00084 } dvbpsi_rst_t;
00085 
00086 
00087 /*****************************************************************************
00088  * dvbpsi_rst_callback
00089  *****************************************************************************/
00095 typedef void (* dvbpsi_rst_callback)(void* p_cb_data, dvbpsi_rst_t* p_new_rst);
00096 
00097 /*****************************************************************************
00098  * dvbpsi_rst_attach
00099  *****************************************************************************/
00109 bool dvbpsi_rst_attach(dvbpsi_t *p_dvbpsi, dvbpsi_rst_callback pf_callback,
00110                       void* p_cb_data);
00111 
00112 /*****************************************************************************
00113  * dvbpsi_rst_detach
00114  *****************************************************************************/
00124 void dvbpsi_rst_detach(dvbpsi_t *p_dvbpsi);
00125 
00126 /*****************************************************************************
00127  * dvbpsi_rst_init/dvbpsi_rst_new
00128  *****************************************************************************/
00135 void dvbpsi_rst_init(dvbpsi_rst_t* p_rst);
00136 
00142 dvbpsi_rst_t *dvbpsi_rst_new(void);
00143 
00144 /*****************************************************************************
00145  * dvbpsi_rst_empty/dvbpsi_rst_delete
00146  *****************************************************************************/
00153 void dvbpsi_rst_empty(dvbpsi_rst_t* p_rst);
00154 
00161 void dvbpsi_rst_delete(dvbpsi_rst_t *p_rst);
00162 
00163 /*****************************************************************************
00164  * dvbpsi_rst_event_add
00165  *****************************************************************************/
00182 dvbpsi_rst_event_t* dvbpsi_rst_event_add(dvbpsi_rst_t* p_rst,
00183                                             uint16_t i_ts_id,
00184                                             uint16_t i_orig_network_id,
00185                                             uint16_t i_service_id,
00186                                             uint16_t i_event_id,
00187                                             uint8_t i_running_status);
00188 
00189 /*****************************************************************************
00190  * dvbpsi_rst_sections_generate
00191  *****************************************************************************/
00201 dvbpsi_psi_section_t* dvbpsi_rst_sections_generate(dvbpsi_t *p_dvbpsi, dvbpsi_rst_t* p_rst);
00202 
00203 #ifdef __cplusplus
00204 };
00205 #endif
00206 
00207 #else
00208 #error "Multiple inclusions of rst.h"
00209 #endif