/* SPDX-License-Identifier: LGPL-2.1-only OR BSD-3-Clause */
/******************************************************************************
 *
 * This file is provided under a dual license.  When you use or
 * distribute this software, you may choose to be licensed under
 * version 2.1 of the GNU Lesser General Public License
 * ("LGPLv2.1 License") or BSD License.
 *
 * LGPLv2.1 License
 *
 * Copyright(C) 2019 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more
 * details.
 *
 * BSD LICENSE
 *
 * Copyright(C) 2019 MediaTek Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/

/*----------------------------------------------------------------------------*/
/*! @file c_atsc_si_eng.h 
 *  $RCSfile: $
 *  $Revision: #1 $
 *  $Date: 2015/05/29 $
 *  $Author: brianpc.huang $
 *  
 *  @par Description:
 *         This header file contains ATSC-SI engine specific definitions,
 *         which are exported for applications.
 */
/*----------------------------------------------------------------------------*/

#ifndef _C_ATSC_SI_H_
#define _C_ATSC_SI_H_    /**< atsc si c interface header file */

/*----------------------------------------------------------------------------*/
/*! @defgroup groupMW_TBL_MNGR_ATSC_SI_ENG ATSC SI Engine
 *
 *  @ingroup groupMW_TBL_MNGR
 *  @brief Load and get PSIP table information for Application
 *
 *  %MW Application API would be used by Application, lot of these APIs would
 *   be wrapped from Exported API. Using these APIs, application could load or get
 *   the detail information of PSIP table
 *   
 *  @see groupMW_TBL_MNGR
 *  @{ 
 */
/*----------------------------------------------------------------------------*/

/*-----------------------------------------------------------------------------
                    include files
-----------------------------------------------------------------------------*/

#include "u_atsc_si_eng.h"


/*-----------------------------------------------------------------------------
                    macros, defines, typedefs, enums
 ----------------------------------------------------------------------------*/


/*-----------------------------------------------------------------------------
                    functions declarations
 ----------------------------------------------------------------------------*/

/*------------------------------------------------------------------*/
/*! @brief This API returns a version number of the given table object.
 *  @param [in]  h_obj              - References a table object.
 *  @param [out] pui1_tbl_version   - Contains the table version number.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_tbl_version (HANDLE_T    h_obj,
                                        UINT8*      pui1_tbl_version,
                                        TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a protocol version number of the given 
 *         table object.
 *  @param [in]  h_obj              - References a table object.
 *  @param [out] pui1_prot_version  - Contains the protocol version number.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_prot_version (HANDLE_T    h_obj,
                                         UINT8*      pui1_prot_version,
                                         TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of entries of the given MGT 
 *          table object.
 *  @param [in]  h_mgt              - References an MGT table object.
 *  @param [out] pui2_num_entries   - Contains the number of entries.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_num_mgt_entries (HANDLE_T    h_mgt,
                                            UINT16*     pui2_num_entries,
                                            TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns an entry of the given MGT table object.
 *  @param [in]  h_mgt              - References an MGT table object.
 *  @param [in]  ui2_idx            - Specifies the table_type entry by index.
 *  @param [out] pt_mgt_info        - Contains the MGT entry structure.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_mgt_entry (HANDLE_T             h_mgt,
                                      UINT16               ui2_idx,
                                      ATSC_SI_MGT_INFO_T*  pt_mgt_info,
                                      TM_COND_T*           pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns TS id of the given VCT table object.
 *  @param [in]  h_vct              - References a VCT table object.
 *  @param [out] pui2_ts_id         - Contains the transport steam id.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_vct_ts_id (HANDLE_T    h_vct,
                                      UINT16*     pui2_ts_id,
                                      TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of entries of the given VCT 
 *         table object.
 *  @param [in]  h_vct              - References a VCT table object.
 *  @param [out] pui2_num_entries   - Contains the number of entries.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_num_vct_entries (HANDLE_T    h_vct,
                                            UINT16*     pui2_num_entries,
                                            TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a channel entry of the given VCT table object.
 *  @param [in]  h_vct              - References a VCT table object.
 *  @param [in]  ui2_idx            - Specifies the virtual channel entry by index.
 *  @param [out] pt_cvct_info       - Contains the VCT entry structure.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_vct_entry (HANDLE_T             h_vct,
                                      UINT16               ui2_idx,
                                      ATSC_SI_VCT_INFO_T*  pt_cvct_info,
                                      TM_COND_T*           pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns region id of the given RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [out] pui1_region        - Contains the region id.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_rrt_region (HANDLE_T    h_rrt,
                                       UINT8*      pui1_region,
                                       TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a dimension entry of the given RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [in]  ui2_idx            - Specifies the rating dimension by index.
 *  @param [out] pt_rrt_info        - Contains the RRT entry structure.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_rrt_entry (HANDLE_T             h_rrt,
                                      UINT16               ui2_idx,
                                      ATSC_SI_RRT_INFO_T*  pt_rrt_info,
                                      TM_COND_T*           pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns source id of the given EIT table object.
 *  @param [in]  h_eit              - References an EIT table object.
 *  @param [out] pui2_src_id        - Contains the channel source id.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eit_src_id (HANDLE_T    h_eit,
                                       UINT16*     pui2_src_id,
                                       TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of entries of the given EIT table object.
 *  @param [in]  h_eit              - References an EIT table object.
 *  @param [out] pui2_num_entries   - Contains the number of entries.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_num_eit_entries (HANDLE_T    h_eit,
                                            UINT16*     pui2_num_entries,
                                            TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns an event entry of the given EIT table object.
 *  @param [in]  h_eit              - References an EIT table object.
 *  @param [in]  ui2_idx            - Specifies the event by index.
 *  @param [out] pt_eit_info        - Contains the EIT entry structure.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eit_entry (HANDLE_T             h_eit,
                                      UINT16               ui2_idx,
                                      ATSC_SI_EIT_INFO_T*  pt_eit_info,
                                      TM_COND_T*           pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns source id of the given ETT table object.
 *  @param [in]  h_ett              - References an ETT table object.
 *  @param [out] pui4_etm_id        - Contains the ETM id.
 *  @param [out] pe_cond            - Contains the condition of the 
 *                                    table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_ett_etm_id (HANDLE_T    h_ett,
                                       UINT32*     pui4_etm_id,
                                       TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of strings with different languages
 *         of the given multi string structure handle.
 *  @param [in]  h_txt              - References a txt table object.
 *  @param [out] pui2_num_lang      - Contains the number of strings.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_num_lang (HANDLE_T    h_txt,
                                         UINT16*     pui2_num_lang);

/*------------------------------------------------------------------*/
/*! @brief This API returns the information about the specified language
 *         of the given multi string structure handle.
 *  @param [in]  h_txt              - References a txt table object.
 *  @param [in]  ui2_lang_idx       - Contains the language index.
 *  @param [out] pt_lang_info       - Contains the information about the language.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_info (HANDLE_T                  h_txt,
                                     UINT16                    ui2_lang_idx,
                                     ATSC_SI_TXT_LANG_INFO_T*  pt_lang_info);

/*------------------------------------------------------------------*/
/*! @brief This API returns the information about the specified segment
 *         of the given multi string structure handle.
 *  @param [in]  h_txt              - References a txt table object.
 *  @param [in]  ui2_lang_idx       - Contains the language index.
 *  @param [in]  ui2_seg_idx        - Contains the segment index.
 *  @param [out] pt_text_seg_info   - Contains the information about the segment.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_seg_info (HANDLE_T                 h_txt,
                                         UINT16                   ui2_lang_idx,
                                         UINT16                   ui2_seg_idx,
                                         ATSC_SI_TXT_SEG_INFO_T*  pt_text_seg_info);

/*------------------------------------------------------------------*/
/*! @brief This API returns the text of the specified segment of
 *         the given multi string structure handle.
 *  @param [in]  h_txt              - References a txt table object.
 *  @param [in]  ui2_lang_idx       - Contains the language index.
 *  @param [in]  ui2_seg_idx        - Contains the segment index.
 *  @param [in]  pz_txt_len         - Contains the size of the buffer ps_txt.
 *  @param [out] pt_text_seg_info   - Contains the segment string.
 *  @param [out] pz_txt_len         - Contains the actual length of ps_txt.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt (HANDLE_T  h_txt,
                                UINT16    ui2_lang_idx,
                                UINT16    ui2_seg_idx,
                                CHAR*     ps_txt,
                                SIZE_T*   pz_txt_len);

/*------------------------------------------------------------------*/
/*! @brief This API returns the text of the first segment of
 *         the given multi string structure handle.
 *  @param [in]  h_txt              - References a txt table object.
 *  @param [out] pz_txt_len         - Contains the length of the first segment.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_len (HANDLE_T  h_txt,
                                    SIZE_T*   pz_txt_len);

/*------------------------------------------------------------------*/
/*! @brief This function gets the length of the text in the requested 
 *         language from the text handle.
 *  @param [in]  h_txt              - Contains the text handle.
 *  @param [in]  t_lang             - Contains the ISO 639 language code.
 *  @param [out] pz_event_info_len  - Contains the length of the text in the
 *                                    requested language if the routine was 
 *                                    successfully returned.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Success.
 *  @retval TMR_INV_ARG             - Fail. Invalid arguments.
 *  @retval TMR_INV_GET_INFO        - Fail. The requested info was not found.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_len_by_lang (HANDLE_T        h_txt,
                                            ISO_639_LANG_T  t_lang,
                                            SIZE_T*         pz_event_info_len);

/*------------------------------------------------------------------*/
/*! @brief this function gets the text in the requested language from 
 *         the text handle.
 *  @param [in]  h_txt              - Contains the text handle.
 *  @param [in]  t_lang             - Contains the ISO 639 language code.
 *  @param [in]  pz_event_info_len  - Contains the length of the buffer ps_txt.
 *  @param [out] pz_event_info_len  - Contains the length of the text in the
 *                                    requested language if the routine was 
 *                                    successfully returned.
 *  @param [out] ps_txt             - Contains the requested text if the routine
 *                                    was successfully returned. 
 *  @return Return the error code.
 *  @retval TMR_OK                  - Success.
 *  @retval TMR_INV_ARG             - Fail. Invalid arguments.
 *  @retval TMR_INV_GET_INFO        - Fail. The requested info was not found.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_txt_by_lang (HANDLE_T        h_txt,
                                        ISO_639_LANG_T  t_lang,
                                        SIZE_T*         pz_event_info_len,
                                        CHAR*           ps_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns the event data of the given EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] pt_eas_info        - Contains the EAS entry structure.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_event_data (HANDLE_T     h_eas,
                                           EAS_EVENT_T* pt_eas_info,
                                           TM_COND_T*   pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the event code length of the given EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] pz_evt_code_len    - Contains the length of event code text.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_evt_code_len (HANDLE_T   h_eas,
                                             SIZE_T*    pz_evt_code_len,
                                             TM_COND_T* pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the event code text of the given EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [in]  pz_evt_code_len    - Contains the size of the buffer ps_evt_code.
 *  @param [out] ps_evt_code        - Contains the event code text.
 *  @param [out] pz_evt_code_len    - Contains the actual length of event code text.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_evt_code (HANDLE_T   h_eas,
                                         CHAR*      ps_evt_code,  
                                         SIZE_T*    pz_evt_code_len,
                                         TM_COND_T* pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of location entries of the given 
 *         EAS table object
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] pui2_num_entries   - Contains the number of entries.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_num_loc_entries (HANDLE_T    h_eas,
                                                UINT16*     pui2_num_entries,
                                                TM_COND_T*  pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a location entry of the given EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [in]  ui2_idx            - Specifies the location by index.
 *  @param [out] pt_location        - Contains the location entry structure.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_loc_entry (HANDLE_T          h_eas,
                                          UINT16            ui2_idx,
                                          EAS_LOC_INFO_T*   pt_location,
                                          TM_COND_T*        pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns the number of exception entries of the given 
 *         EAS table object
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] pui2_num_entries   - Contains the number of entries.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_num_xcept_entries (HANDLE_T      h_eas,
                                                  UINT16*       pui2_num_entries,
                                                  TM_COND_T*    pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a exception entries of the given EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [in]  ui2_idx            - Specifies the location by index.
 *  @param [out] pt_xcept           - Contains the exception entry structure.
 *  @param [out] pe_cond            - Contains the condition of the table object.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_get_eas_xcept_entry (HANDLE_T            h_eas,
                                            UINT16              ui2_idx,
                                            EAS_XCEPT_INFO_T*   pt_xcept,
                                            TM_COND_T*          pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the short name of 
 *         a virtual channel from a VCT table object.
 *  @param [in]  h_vct              - References a TVCT/CVCT table object.
 *  @param [in]  ui2_idx            - Contains the index of the required virtual channel.
 *  @param [out] ph_txt             - Contains the handle which references the virtual channel
 *                                    short name.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_vct_sname (HANDLE_T   h_vct,
                                          UINT16     ui2_idx,
                                          HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the name of 
 *         a rating region from an RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [out] ph_txt             - Contains the handle which references the ratign region
 *                                    name.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_rrt_region (HANDLE_T   h_rrt,
                                           HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the dimension 
 *         name of a rating region from an RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [in]  ui2_dim_idx        - Contains the index of the required rating dimension.
 *  @param [out] ph_txt             - Contains the handle which references the dimension
 *                                    name.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_rrt_dim (HANDLE_T   h_rrt,
                                        UINT16     ui2_dim_idx,
                                        HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the abbreviation 
 *         of a rating dimension value from an RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [in]  ui2_dim_idx        - Contains the index of the required rating dimension.
 *  @param [in]  ui2_val_idx        - Contains the index of value of the specified dimension.
 *  @param [out] ph_txt             - Contains the handle which references the abbreviation.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_rrt_abrv_rating (HANDLE_T   h_rrt,
                                                UINT16     ui2_dim_idx,
                                                UINT16     ui2_val_idx,
                                                HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the name 
 *         of a rating dimension value from an RRT table object.
 *  @param [in]  h_rrt              - References an RRT table object.
 *  @param [in]  ui2_dim_idx        - Contains the index of the required rating dimension.
 *  @param [in]  ui2_val_idx        - Contains the index of value of the specified dimension.
 *  @param [out] ph_txt             - Contains the handle which references the value's name.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_rrt_rating (HANDLE_T   h_rrt,
                                           UINT16     ui2_dim_idx,
                                           UINT16     ui2_val_idx,
                                           HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the title of 
 *              a program event from an EIT table object.
 *  @param [in]  h_eit              - References an EIT table object.
 *  @param [in]  ui2_idx            - Contains the index of the required program event.
 *  @param [out] ph_txt             - Contains the handle which references the title.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_INV_GET_INFO        - Invalid get operation data.
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_eit_title (HANDLE_T   h_eit,
                                          UINT16     ui2_idx,
                                          HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the extended
 *         text message from an ETT table object.
 *  @param [in]  h_ett              - References an ETT table object.
 *  @param [out] ph_txt             - Contains the handle which references the extended text
 *                                    message.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_ett_ext_text (HANDLE_T   h_ett,
                                             HANDLE_T*  ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the multiple
 *         string on the given buffer.
 *  @param [in]  h_obj              - References a table object, which contains the descriptor,
 *                                    where the buffer pui1_multi_lang_txt comes from.
 *  @param [in]  pui1_multi_lang_txt- References a multiple string structure data.
 *  @param [out] ph_txt             - Contains the handle which references the multiple string
 *                                    structure data.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_descr (HANDLE_T      h_obj,
                                      const UINT8*  pui1_multi_lang_txt,
                                      HANDLE_T*     ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the nature of 
 *         activation from an EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] ph_txt             - Contains the handle which references the nature of
 *                                    activation.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_eas_nat_of_act (HANDLE_T     h_eas,
                                               HANDLE_T*    ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API returns a handle, in order to retrieve the alert
 *         message from an EAS table object.
 *  @param [in]  h_eas              - References an EAS table object.
 *  @param [out] ph_txt             - Contains the handle which references the alert message.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_txt_loc_eas_alert (HANDLE_T  h_eas,
                                          HANDLE_T* ph_txt);

/*------------------------------------------------------------------*/
/*! @brief This API loads an STT table.
 *  @param [in]  h_root             - References the root table object.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_stt             - Contains a handle which references the STT table.
 *  @param [out] pe_cond            - Contains the condition of the STT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_stt (HANDLE_T       h_root,
                                 VOID*          pv_nfy_tag,
                                 x_tm_nfy_fct   pf_nfy,
                                 HANDLE_T*      ph_stt,
                                 TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an MGT table given a transport stream id.
 *  @param [in]  h_root             - References the root table object.
 *  @param [in]  ui2_ts_id          - Contains the MGT's transport stream id.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_mgt             - Contains a handle which references the MGT table.
 *  @param [out] pe_cond            - Contains the condition of the MGT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_mgt_by_ts_id (HANDLE_T       h_root,
                                          UINT16         ui2_ts_id,
                                          TM_SRC_TYPE_T  e_src_type,
                                          VOID*          pv_src_info,
                                          VOID*          pv_nfy_tag,
                                          x_tm_nfy_fct   pf_nfy,
                                          HANDLE_T*      ph_mgt,
                                          TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an MGT table given a transport stream description.
 *  @param [in]  h_root             - References the root table object.
 *  @param [in]  pt_ts_descr        - Contains the MGT's transport stream description.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_mgt             - Contains a handle which references the MGT table.
 *  @param [out] pe_cond            - Contains the condition of the MGT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_mgt_by_ts_descr (HANDLE_T       h_root,
                                             TS_DESCR_T*    pt_ts_descr,
                                             TM_SRC_TYPE_T  e_src_type,
                                             VOID*          pv_src_info,
                                             VOID*          pv_nfy_tag,
                                             x_tm_nfy_fct   pf_nfy,
                                             HANDLE_T*      ph_mgt,
                                             TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads a CVCT table given an MGT handle.
 *  @param [in]  h_mgt              - References the MGT table object.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_cvct            - Contains a handle which references the CVCT table.
 *  @param [out] pe_cond            - Contains the condition of the CVCT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_cvct (HANDLE_T       h_mgt,
                                  TM_SRC_TYPE_T  e_src_type,
                                  VOID*          pv_src_info,
                                  VOID*          pv_nfy_tag,
                                  x_tm_nfy_fct   pf_nfy,
                                  HANDLE_T*      ph_cvct,
                                  TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads a TVCT table given an MGT handle.
 *  @param [in]  h_mgt              - References the MGT table object.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_tvct            - Contains a handle which references the TVCT table.
 *  @param [out] pe_cond            - Contains the condition of the TVCT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_tvct (HANDLE_T       h_mgt,
                                  TM_SRC_TYPE_T  e_src_type,
                                  VOID*          pv_src_info,
                                  VOID*          pv_nfy_tag,
                                  x_tm_nfy_fct   pf_nfy,
                                  HANDLE_T*      ph_tvct,
                                  TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an RRT table given an MGT handle and a region id.
 *  @param [in]  h_mgt              - References the MGT table object.
 *  @param [in]  ui1_region         - Contains the RRT's region id.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_rrt             - Contains a handle which references the RRT table.
 *  @param [out] pe_cond            - Contains the condition of the RRT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_rrt (HANDLE_T       h_mgt,
                                 UINT8          ui1_region,
                                 TM_SRC_TYPE_T  e_src_type,
                                 VOID*          pv_src_info,
                                 VOID*          pv_nfy_tag,
                                 x_tm_nfy_fct   pf_nfy,
                                 HANDLE_T*      ph_rrt,
                                 TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an EIT table given a TVCT/CVCT handle, an index,
 *         and time.
 *  @param [in]  h_vct              - References the TVCT/CVCT table object.
 *  @param [in]  ui2_idx            - Specifies the channel by index.
 *  @param [in]  t_time             - Specifies the time covered by the requested EIT table
 *                                    object.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_eit             - Contains a handle which references the EIT table.
 *  @param [out] pe_cond            - Contains the condition of the EIT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_eit_by_idx (HANDLE_T       h_vct,
                                        UINT16         ui2_idx,
                                        TIME_T         t_time,
                                        TM_SRC_TYPE_T  e_src_type,
                                        VOID*          pv_src_info,
                                        VOID*          pv_nfy_tag,
                                        x_tm_nfy_fct   pf_nfy,
                                        HANDLE_T*      ph_eit,
                                        TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an EIT table given an MGT/TVCT/CVCT handle, a 
 *         source id, and time.
 *  @param [in]  h_obj              - References the MGT, TVCT or CVCT table object.
 *  @param [in]  ui2_src_id         - Specifies the channel source id.
 *  @param [in]  t_time             - Specifies the time covered by the requested EIT table
 *                                    object.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_eit             - Contains a handle which references the EIT table.
 *  @param [out] pe_cond            - Contains the condition of the EIT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_eit_by_src_id (HANDLE_T       h_obj,
                                           UINT16         ui2_src_id,
                                           TIME_T         t_time,
                                           TM_SRC_TYPE_T  e_src_type,
                                           VOID*          pv_src_info,
                                           VOID*          pv_nfy_tag,
                                           x_tm_nfy_fct   pf_nfy,
                                           HANDLE_T*      ph_eit,
                                           TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an EIT-0 table given a TVCT/CVCT handle and an
 *         index.
 *  @param [in]  h_vct              - References the TVCT/CVCT table object.
 *  @param [in]  ui2_idx            - Specifies the channel by index.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_eit             - Contains a handle which references the EIT table.
 *  @param [out] pe_cond            - Contains the condition of the EIT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_eit_0_by_idx (HANDLE_T       h_vct,
                                         UINT16         ui2_idx,
                                         TM_SRC_TYPE_T  e_src_type,
                                         VOID*          pv_src_info,
                                         VOID*          pv_nfy_tag,
                                         x_tm_nfy_fct   pf_nfy,
                                         HANDLE_T*      ph_eit,
                                         TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an EIT-0 table given an MGT/TVCT/CVCT handle,
 *         and a source id.
 *  @param [in]  h_obj              - References the MGT, TVCT or CVCT table object.
 *  @param [in]  ui2_src_id         - Specifies the channel source id.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_eit             - Contains a handle which references the EIT table.
 *  @param [out] pe_cond            - Contains the condition of the EIT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_eit_0_by_src_id (HANDLE_T       h_obj,
                                            UINT16         ui2_src_id,
                                            TM_SRC_TYPE_T  e_src_type,
                                            VOID*          pv_src_info,
                                            VOID*          pv_nfy_tag,
                                            x_tm_nfy_fct   pf_nfy,
                                            HANDLE_T*      ph_eit,
                                            TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an ETT table given a VCT or EIT handle and an index.
 *  @param [in]  h_obj              - References the VCT or EIT table object.
 *  @param [in]  ui2_idx            - Specifies the channel by index.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_ett             - Contains a handle which references the ETT table.
 *  @param [out] pe_cond            - Contains the condition of the ETT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_ett_by_idx (HANDLE_T       h_obj,
                                        UINT16         ui2_idx,
                                        TM_SRC_TYPE_T  e_src_type,
                                        VOID*          pv_src_info,
                                        VOID*          pv_nfy_tag,
                                        x_tm_nfy_fct   pf_nfy,
                                        HANDLE_T*      ph_ett,
                                        TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads a channel ETT table given an MGT handle and a 
 *         source id.
 *  @param [in]  h_mgt              - References the MGT table object.
 *  @param [in]  ui2_src_id         - Specifies the channel source id.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_ett             - Contains a handle which references the ETT table.
 *  @param [out] pe_cond            - Contains the condition of the ETT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_ett_by_src_id (HANDLE_T       h_mgt,
                                           UINT16         ui2_src_id,
                                           TM_SRC_TYPE_T  e_src_type,
                                           VOID*          pv_src_info,
                                           VOID*          pv_nfy_tag,
                                           x_tm_nfy_fct   pf_nfy,
                                           HANDLE_T*      ph_ett,
                                           TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an event ETT table given an MGT handle, a source
 *         id, an event id, and time.
 *  @param [in]  h_mgt              - References the MGT table object.
 *  @param [in]  ui2_src_id         - Specifies the channel source id.
 *  @param [in]  ui2_evt_id         - Specifies the event id.
 *  @param [in]  t_time             - Specifies the time which the event covers.
 *  @param [in]  e_src_type         - Specifies the source type for loading the requested
 *                                    table.
 *  @param [in]  pv_src_info        - Contains additional information describing the source.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_ett             - Contains a handle which references the ETT table.
 *  @param [out] pe_cond            - Contains the condition of the ETT table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_ett_by_src_evt_id (HANDLE_T       h_mgt,
                                               UINT16         ui2_src_id,
                                               UINT16         ui2_evt_id,
                                               TIME_T         t_time,
                                               TM_SRC_TYPE_T  e_src_type,
                                               VOID*          pv_src_info,
                                               VOID*          pv_nfy_tag,
                                               x_tm_nfy_fct   pf_nfy,
                                               HANDLE_T*      ph_ett,
                                               TM_COND_T*     pe_cond);

/*------------------------------------------------------------------*/
/*! @brief This API loads an EAS table given a TM root handle.
 *  @param [in]  h_root             - References the root table object.
 *  @param [in]  pv_nfy_tag         - Contains a notify tag value.
 *  @param [in]  pf_nfy             - References the notify function.
 *  @param [out] ph_eas             - Contains a handle which references the EAS table.
 *  @param [out] pe_cond            - Contains the condition of the EAS table.
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_NOT_INIT            - The Table Manager is not initialized.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 *  @retval TMR_INV_HANDLE          - Invalid handle.
 *  @retval TMR_INV_HANDLE_STATE    - Invalid handle state
 *  @retval TMR_OUT_OF_HANDLES      - No handles available.
 *  @retval TMR_OUT_OF_RESOURCES    - Out of resources.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_load_eas (HANDLE_T       h_root,
                                 VOID*          pv_nfy_tag,
                                 x_tm_nfy_fct   pf_nfy,
                                 HANDLE_T*      ph_eas,
                                 TM_COND_T*     pe_cond);


/*------------------------------------------------------------------*/
/*! @brief This API registera a callback to get raw data of section.
 *  @param [in]  pf_nfy         - Notify fuction will be called when 
 *                                raw data is update.
 *  @param [out]                -
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_INV_ARG             - One or more of the arguments contain 
 *                                    invalid data.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_reg_raw_mem_nfy (atsc_si_rm_nfy_fct pf_nfy);

/*------------------------------------------------------------------*/
/*! @brief This API set operation to handle the raw memory.
 *  @param [in]  e_set_type      - set type of raw memory.
 *  @param [out]                 -
 *  @return Return the error code.
 *  @retval TMR_OK                  - Routine successful.
 *  @retval TMR_ALREADY_INIT        - The raw memory is already initialized.
 *  @retval TMR_NOT_INIT            - The raw memory  is not initialized.
 *  @retval TMR_UNAVAILABLE         - The callback to copy raw memory is null.
 */
/*------------------------------------------------------------------*/
extern INT32 c_atsc_si_raw_mem_set (ATSC_SI_RM_SET_T e_set_type);

/*----------------------------------------------------------------------------*/
/*! @} */                              /* end of groupMW_TBL_MNGR_ATSC_SI_ENG */
/*----------------------------------------------------------------------------*/

#endif /* _C_ATSC_SI_H_ */
