libdvbpsi  1.2.0
cat.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * cat.h
3  * Copyright (C) 2001-2011 VideoLAN
4  * $Id$
5  *
6  * Authors: Johann Hanne
7  * heavily based on pmt.h which was written by
8  * Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
9  * Jean-Paul Saman <jpsaman@videolan.org>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24  *
25  *****************************************************************************/
26 
36 #ifndef _DVBPSI_CAT_H_
37 #define _DVBPSI_CAT_H_
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /*****************************************************************************
44  * dvbpsi_cat_t
45  *****************************************************************************/
57 typedef struct dvbpsi_cat_s
58 {
59  uint8_t i_version;
64 } dvbpsi_cat_t;
65 
66 /*****************************************************************************
67  * dvbpsi_cat_callback
68  *****************************************************************************/
74 typedef void (* dvbpsi_cat_callback)(void* p_cb_data, dvbpsi_cat_t* p_new_cat);
75 
76 /*****************************************************************************
77  * dvbpsi_cat_attach
78  *****************************************************************************/
88 bool dvbpsi_cat_attach(dvbpsi_t *p_dvbpsi, dvbpsi_cat_callback pf_callback,
89  void* p_cb_data);
90 
91 /*****************************************************************************
92  * dvbpsi_cat_detach
93  *****************************************************************************/
103 void dvbpsi_cat_detach(dvbpsi_t *p_dvbpsi);
104 
105 /*****************************************************************************
106  * dvbpsi_cat_init/dvbpsi_cat_new
107  *****************************************************************************/
117 void dvbpsi_cat_init(dvbpsi_cat_t* p_cat,
118  uint8_t i_version, bool b_current_next);
119 
129 
130 /*****************************************************************************
131  * dvbpsi_cat_empty/dvbpsi_cat_delete
132  *****************************************************************************/
139 void dvbpsi_cat_empty(dvbpsi_cat_t* p_cat);
140 
147 void dvbpsi_cat_delete(dvbpsi_cat_t *p_cat);
148 
149 /*****************************************************************************
150  * dvbpsi_cat_descriptor_add
151  *****************************************************************************/
165  uint8_t i_tag, uint8_t i_length,
166  uint8_t* p_data);
167 
168 /*****************************************************************************
169  * dvbpsi_cat_sections_generate
170  *****************************************************************************/
181 
182 #ifdef __cplusplus
183 };
184 #endif
185 
186 #else
187 #error "Multiple inclusions of cat.h"
188 #endif
189