/* 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 u_handle_grp.h 
 *  $RCSfile: $
 *  $Revision: #2 $
 *  $Date: 2015/07/21 $
 *  $Author: jiangtao.xu $
 *  
 *  @par Description:
 *         This header file contains handle group definitions which are known
 *         to the whole Middleware, Drivers and Applications.
 */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/*! @addtogroup groupMW_HANDLE
 *  @{ 
 */
/*----------------------------------------------------------------------------*/
#ifndef _U_HANDLE_GRP_H_
#define _U_HANDLE_GRP_H_


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

#include "u_handle.h"


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

/* Specify handle groups */
#define HT_GROUP_SIZE     ((HANDLE_TYPE_T) 64)    /**<  size of one group      */

/* A handle type of value '0' will be reserved as invalid handle. */
/* The first HT_GROUP_SIZE handle type values are reserved by the */
/* handle library. The first group starts at value HT_GROUP_SIZE. */
#define HT_RES_BY_HANDLE_LIB  HT_GROUP_SIZE    /**< size of one group       */

#define HT_GROUP_RM       ((HANDLE_TYPE_T) ( 1 * HT_GROUP_SIZE))  /**< Resource Manager */
#define HT_GROUP_OS       ((HANDLE_TYPE_T) ( 2 * HT_GROUP_SIZE))  /**< OS */
#define HT_GROUP_CM       ((HANDLE_TYPE_T) ( 3 * HT_GROUP_SIZE))  /**< Connection Manager */
#define HT_GROUP_SM       ((HANDLE_TYPE_T) ( 4 * HT_GROUP_SIZE))  /**< Stream Manager */
#define HT_GROUP_FM       ((HANDLE_TYPE_T) ( 5 * HT_GROUP_SIZE))  /**< File Manager */
#define HT_GROUP_TM       ((HANDLE_TYPE_T) ( 6 * HT_GROUP_SIZE))  /**< Table Manager RESERVE 128 TYPES. */
#define HT_GROUP_COMMON   ((HANDLE_TYPE_T) ( 8 * HT_GROUP_SIZE))  /**< Common libraries */
#define HT_GROUP_CDB      ((HANDLE_TYPE_T) ( 9 * HT_GROUP_SIZE))  /**< Core DB library */
#define HT_GROUP_PM       ((HANDLE_TYPE_T) (10 * HT_GROUP_SIZE))  /**< Process Manager */
#define HT_GROUP_GL       ((HANDLE_TYPE_T) (11 * HT_GROUP_SIZE))  /**< Graphic library */
#define HT_GROUP_BRDCST   ((HANDLE_TYPE_T) (12 * HT_GROUP_SIZE))  /**< Broadcast handler */
#define HT_GROUP_IOM      ((HANDLE_TYPE_T) (13 * HT_GROUP_SIZE))  /**< IO Manager */
#define HT_GROUP_CL       ((HANDLE_TYPE_T) (14 * HT_GROUP_SIZE))  /**< Compression / Decompression library */
#define HT_GROUP_WGL      ((HANDLE_TYPE_T) (15 * HT_GROUP_SIZE))  /**< Widget library. RESERVE 256 TYPES. */
#define HT_GROUP_EVCTX    ((HANDLE_TYPE_T) (20 * HT_GROUP_SIZE))  /**< Event context */
#define HT_GROUP_SVCTX    ((HANDLE_TYPE_T) (21 * HT_GROUP_SIZE))  /**< Service context */
#define HT_GROUP_FLM      ((HANDLE_TYPE_T) (22 * HT_GROUP_SIZE))  /**< Favorites List Manager context */
#define HT_GROUP_SVL_BLDR ((HANDLE_TYPE_T) (23 * HT_GROUP_SIZE))  /**< SVL builder. */
#define HT_GROUP_AEE      ((HANDLE_TYPE_T) (24 * HT_GROUP_SIZE))  /**< AEE Manager */
#define HT_GROUP_FONT     ((HANDLE_TYPE_T) (25 * HT_GROUP_SIZE))  /**< Font engine */
#define HT_GROUP_ATV      ((HANDLE_TYPE_T) (26 * HT_GROUP_SIZE))  /**< ATV engine */
#define HT_GROUP_CFG      ((HANDLE_TYPE_T) (27 * HT_GROUP_SIZE))  /**< Configuration Manager */
#define HT_GROUP_IMG      ((HANDLE_TYPE_T) (28 * HT_GROUP_SIZE))  /**< Image library */
#define HT_GROUP_SCDB     ((HANDLE_TYPE_T) (29 * HT_GROUP_SIZE))  /**< Stream Component database module */
#define HT_GROUP_SVL      ((HANDLE_TYPE_T) (30 * HT_GROUP_SIZE))  /**< Service List library */
#define HT_GROUP_TSL      ((HANDLE_TYPE_T) (31 * HT_GROUP_SIZE))  /**< Transport Stream List library */
#define HT_GROUP_DT       ((HANDLE_TYPE_T) (32 * HT_GROUP_SIZE))  /**< DateTime library */
#define HT_GROUP_OOB      ((HANDLE_TYPE_T) (33 * HT_GROUP_SIZE))  /**< Out-of-band handler */
#define HT_GROUP_1394     ((HANDLE_TYPE_T) (34 * HT_GROUP_SIZE))  /**< 1394 handler */
#define HT_GROUP_POD      ((HANDLE_TYPE_T) (35 * HT_GROUP_SIZE))  /**< POD stack */
#define HT_GROUP_DSM      ((HANDLE_TYPE_T) (36 * HT_GROUP_SIZE))  /**< Device Status Manager */
#define HT_GROUP_ABRDCST  ((HANDLE_TYPE_T) (37 * HT_GROUP_SIZE))  /**< Analog Broadcast handler */
#define HT_GROUP_AVC      ((HANDLE_TYPE_T) (38 * HT_GROUP_SIZE))  /**< AVC handler */
#define HT_GROUP_RRCTX    ((HANDLE_TYPE_T) (39 * HT_GROUP_SIZE))  /**< Rating Recion Context */
#define HT_GROUP_PCL      ((HANDLE_TYPE_T) (40 * HT_GROUP_SIZE))  /**< Power Control Library */
#define HT_GROUP_NETWORK  ((HANDLE_TYPE_T) (41 * HT_GROUP_SIZE))  /**< Network Libraries */
#define HT_GROUP_VBIF     ((HANDLE_TYPE_T) (42 * HT_GROUP_SIZE))  /**< VBI Filter */
#define HT_GROUP_MHEG_5   ((HANDLE_TYPE_T) (43 * HT_GROUP_SIZE))  /**< MHEG5 */
#define HT_GROUP_PLAYBACK ((HANDLE_TYPE_T) (44 * HT_GROUP_SIZE))  /**< Playback handler */
#define HT_GROUP_MSVCTX   ((HANDLE_TYPE_T) (45 * HT_GROUP_SIZE))  /**< Media service context handler */
#define HT_GROUP_MINFO    ((HANDLE_TYPE_T) (46 * HT_GROUP_SIZE))  /**< Media info handler */
#define HT_GROUP_MIDXBULD ((HANDLE_TYPE_T) (47 * HT_GROUP_SIZE))  /**< Media index builder handler */
#define HT_GROUP_CECM     ((HANDLE_TYPE_T) (48 * HT_GROUP_SIZE))  /**< CEC Manager */
#define HT_GROUP_DM       ((HANDLE_TYPE_T) (49 * HT_GROUP_SIZE))  /**< Device Manager */
#define HT_GROUP_SSUM     ((HANDLE_TYPE_T) (50 * HT_GROUP_SIZE))  /**< SSU/OAD Manager */
#define HT_GROUP_TVGUIDE  ((HANDLE_TYPE_T) (51 * HT_GROUP_SIZE))  /**< TV Guide */
#define HT_GROUP_MTP      ((HANDLE_TYPE_T) (52 * HT_GROUP_SIZE))  /**< MTP Manager */
#define HT_GROUP_NWL      ((HANDLE_TYPE_T) (53 * HT_GROUP_SIZE))  /**< Network List */
#define HT_GROUP_DRM      ((HANDLE_TYPE_T) (54 * HT_GROUP_SIZE))  /**< DRM */
#define HT_GROUP_DF_MNGR  ((HANDLE_TYPE_T) (55 * HT_GROUP_SIZE))  /**< DFM */
#define HT_GROUP_LOL      ((HANDLE_TYPE_T) (56 * HT_GROUP_SIZE))  /**< LOL */
#define HT_GROUP_REC_UTIL ((HANDLE_TYPE_T) (57 * HT_GROUP_SIZE))  /**< Record Utility*/
#define HT_GROUP_SATL     ((HANDLE_TYPE_T) (58 * HT_GROUP_SIZE))  /**< Satellite List */
#define HT_GROUP_CAP      ((HANDLE_TYPE_T) (59 * HT_GROUP_SIZE))  /**< Capture */
#define HT_GROUP_DMX_UTIL ((HANDLE_TYPE_T) (60 * HT_GROUP_SIZE))  /**< Demux Utility */
#define HT_GROUP_EDB      ((HANDLE_TYPE_T) (61 * HT_GROUP_SIZE))  /**< event database */
#define HT_GROUP_GINGA    ((HANDLE_TYPE_T) (62 * HT_GROUP_SIZE))  /**< SBTVD Ginga */
#define HT_GROUP_MUX_UTIL ((HANDLE_TYPE_T) (63 * HT_GROUP_SIZE))  /**< Record Utility*/
#define HT_GROUP_CMPB     ((HANDLE_TYPE_T) (64 * HT_GROUP_SIZE))  /**< Cmpb>*/
#define HT_GROUP_REC_RAPR ((HANDLE_TYPE_T) (65 * HT_GROUP_SIZE))  /**< record wrapper>*/
#define HT_GROUP_RAW_SECT ((HANDLE_TYPE_T) (66 * HT_GROUP_SIZE))  /**< RAW SECTION FILTER.> */
#define HT_GROUP_ENCFS    ((HANDLE_TYPE_T) (67 * HT_GROUP_SIZE))  /**< ENCFS>*/
#define HT_GROUP_RECORD   ((HANDLE_TYPE_T) (68 * HT_GROUP_SIZE))  /*For timeshift and pvr*/
#define HT_GROUP_OP_HBBTV ((HANDLE_TYPE_T) (69 * HT_GROUP_SIZE))  /**< opera hbbtv.> */
#define HT_GROUP_EWS_PA   ((HANDLE_TYPE_T) (70 * HT_GROUP_SIZE))  /**< EWS_PA.> */
#define HT_GROUP_BSL	  ((HANDLE_TYPE_T) (71 * HT_GROUP_SIZE))
#define HT_GROUP_FD_COMP  ((HANDLE_TYPE_T) (72 * HT_GROUP_SIZE))  /**< Fusiondale Component>*/
#define HT_GROUP_FKT      ((HANDLE_TYPE_T) (73 * HT_GROUP_SIZE))  /**<Fake tuner>*/
#define HT_GROUP_MSCTX    ((HANDLE_TYPE_T) (74 * HT_GROUP_SIZE))  /**< Mutilple Stream context */
#define HT_GROUP_TTS      ((HANDLE_TYPE_T) (75 * HT_GROUP_SIZE))  /**<Fake tuner>*/
#define HT_GROUP_MTDT     ((HANDLE_TYPE_T) (76 * HT_GROUP_SIZE))  /**< METADATA.> */
#define HT_GROUP_BML      ((HANDLE_TYPE_T) (77 * HT_GROUP_SIZE))  /**< BML.> */
#define HT_NB_GROUPS  (78)    /**<        */

#endif /* _U_HANDLE_GRP_H_ */
/*----------------------------------------------------------------------------*/
/*! @} */                                             /* end of groupMW_HANDLE */
/*----------------------------------------------------------------------------*/

