DVBCore  1.0
Open source DVB engine
midware/stb/inc/stbsiflt.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00025 // pre-processor mechanism so multiple inclusions don't cause compilation error
00026 
00027 #ifndef _STBSIFLT_H
00028 #define _STBSIFLT_H
00029 
00030 //---Constant and macro definitions for public use-----------------------------
00031 
00032 // macros for use in calls to STB_SIRequestTable
00033 #define SI_BUFFER_1K                1024
00034 #define SI_BUFFER_2K                2048
00035 #define SI_BUFFER_4K                4096
00036 #define SI_BUFFER_8K                8192
00037 #define SI_BUFFER_16K               16384
00038 #define SI_BUFFER_32K               32768
00039 #define SI_BUFFER_64K               65535
00040 #define SI_XTID_MATCH_DONT_CARE     0x0000
00041 #define SI_XTID_MASK_DONT_CARE      0x0000
00042 
00043 
00044 
00045 //---Enumerations for public use-----------------------------------------------
00046 
00047 // SI events passed to the application event handler
00048 typedef enum
00049 {
00050    STOP_SI,
00051    START_SI_SEARCHING,
00052    START_SI_UPDATING_NEW_TRANSPORT,
00053    START_SI_UPDATING_SAME_TRANSPORT,
00054    SI_TIMEOUT
00055 } E_APP_SI_EVENT_TYPE;
00056 
00057 // enumerations used to define filter requests
00058 typedef enum
00059 {
00060    ONE_SHOT_REQUEST,
00061    CONTINUOUS_REQUEST
00062 } E_SI_REQUEST_TYPE;
00063 
00064 typedef enum
00065 {
00066    SINGLE_SECT,      // single section tables have short header up to section length only e.g. TOT
00067    MULTI_SECT        // multi section table headers include version num, section num and last section e.g. PAT
00068 } E_SI_TABLE_FORMAT_TYPE;
00069 
00070 
00071 
00072 //------------------------
00073 // Table record structures
00074 typedef struct si_section_record
00075 {
00076    struct si_section_record *next;
00077    U8BIT sect_num;
00078    U16BIT data_len;
00079    U8BIT data_start;
00080 } SI_SECTION_RECORD;
00081 
00082 typedef struct si_table_record
00083 {
00084    U8BIT path;
00085    U8BIT tid;
00086    U16BIT xtid;
00087    U8BIT version;
00088    U16BIT num_sect;
00089    SI_SECTION_RECORD *section_list;
00090 } SI_TABLE_RECORD;
00091 
00092 typedef void (*F_AppSiEventHandler)(U8BIT, E_APP_SI_EVENT_TYPE);
00093 
00094 //---Global type defs for public use-------------------------------------------
00095 
00096 //---Global Function prototypes for public use---------------------------------
00097 
00098 void STB_SIReportCurrentPmt(U16BIT service_id, SI_TABLE_RECORD *table_rec, BOOLEAN new_serv,
00099    BOOLEAN new_pmt_version);
00100 
00108 F_AppSiEventHandler STB_SIRegisterAppSiEventHandler(F_AppSiEventHandler func_ptr);
00109 
00110 void* STB_SIRequestTable(U8BIT path, U16BIT pid, U8BIT tid_match, U8BIT tid_mask,
00111    E_SI_TABLE_FORMAT_TYPE format, U16BIT expected_tables,
00112    U16BIT xtid_match, U16BIT xtid_mask, E_SI_REQUEST_TYPE req_type,
00113    U16BIT buff_size, BOOLEAN crc, BOOLEAN low_priority,
00114    void (*callback)(void *, U32BIT, SI_TABLE_RECORD *), U32BIT ret_param);
00115 
00116 void STB_SIModifyTableRequest(void *filter_handle, U8BIT tid_match, U8BIT tid_mask,
00117    U16BIT xtid_match, U16BIT xtid_mask, U16BIT expected_tables);
00118 
00119 void STB_SIRestartTableRequest(void *filter_handle);
00120 
00121 void STB_SICancelTableRequest(void *filter_ptr);
00122 
00123 void STB_SIReleaseTableRecord(SI_TABLE_RECORD *table_rec);
00124 
00125 void STB_SISearchComplete(U8BIT path, BOOLEAN success, void *event_data, U32BIT data_size);
00126 
00132 BOOLEAN STB_SIReportCat(SI_TABLE_RECORD *table_rec);
00133 
00139 BOOLEAN STB_SIReportBat(SI_TABLE_RECORD *table_rec);
00140 
00146 BOOLEAN STB_SIReportNit(SI_TABLE_RECORD *table_rec);
00147 
00148 #endif //  _STBSIFLT_H
00149 
00150 //*****************************************************************************
00151 // End of file
00152 //*****************************************************************************
00153 
 All Data Structures Files Functions Typedefs Defines