DVBCore  1.0
Open source DVB engine
dvb/inc/app.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  *******************************************************************************/
00027 #ifndef _APP_H
00028 #define _APP_H
00029 
00030 //---CONSTANT DEFINITIONS---------------------------------------------------------------------------
00031 // application events
00032 #define EV_SERVICE_NOT_RUNNING         0x0001
00033 #define EV_SERVICE_AUDIO_PID_UPDATE    0x0002
00034 #define EV_SERVICE_VIDEO_PID_UPDATE    0x0003
00035 #define EV_SERVICE_SUBTITLE_UPDATE     0x0004
00036 #define EV_SERVICE_SCRAMBLE_CHANGE     0x0005
00037 #define EV_SERVICE_ANALOG_LOCKED       0x0006
00038 #define EV_INDICATION_STATUS           0x0007
00039 #define EV_SERVICE_ANALOG_STARTED      0x0008
00040 #define EV_SERVICE_RUNNING             0x0009
00041 #define EV_SERVICE_EIT_NOW_UPDATE      0x000a
00042 #define EV_SERVICE_EIT_SCHED_UPDATE    0x000b
00043 #define EV_SERVICE_ECM_PID_UPDATE      0x000c
00044 #define EV_PVR_RECORDING_FAILED        0x000d
00045 #define EV_SERVICE_VIDEO_CODEC_CHANGED 0x000e
00046 #define EV_SERVICE_AUDIO_CODEC_CHANGED 0x000f
00047 #define EV_SERVICE_CHANGED             0x0010
00048 #define EV_SERVICE_STREAMS_CHANGED     0x0011
00049 #define EV_SERVICE_SI_PID_UPDATE       0x0012
00050 #define EV_TIME_CHANGED                0x0013
00051 #define EV_CIPLUS_TUNE_COMPLETED       0x0014
00052 #define EV_SERVICE_DELETED             0x0015
00053 #define EV_TIMER_TRIGGERED             0x0016
00054 
00055 #define APP_EVENT_SERVICE_NOT_RUNNING           EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_NOT_RUNNING)
00056 #define APP_EVENT_SERVICE_AUDIO_PID_UPDATE      EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_AUDIO_PID_UPDATE)
00057 #define APP_EVENT_SERVICE_VIDEO_PID_UPDATE      EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_VIDEO_PID_UPDATE)
00058 #define APP_EVENT_SERVICE_SUBTITLE_UPDATE       EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_SUBTITLE_UPDATE)
00059 #define APP_EVENT_SERVICE_SCRAMBLE_CHANGE       EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_SCRAMBLE_CHANGE)
00060 #define APP_EVENT_SERVICE_ANALOG_LOCKED         EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_ANALOG_LOCKED)
00061 #define APP_EVENT_SERVICE_ANALOG_STARTED        EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_ANALOG_STARTED)
00062 #define APP_EVENT_INDICATION_STATUS             EVENT_CODE(EV_CLASS_APPLICATION, EV_INDICATION_STATUS)
00063 #define APP_EVENT_SERVICE_RUNNING               EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_RUNNING)
00064 #define APP_EVENT_SERVICE_EIT_NOW_UPDATE        EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_EIT_NOW_UPDATE)
00065 #define APP_EVENT_SERVICE_EIT_SCHED_UPDATE      EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_EIT_SCHED_UPDATE)
00066 #define APP_EVENT_SERVICE_ECM_PID_UPDATE        EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_ECM_PID_UPDATE)
00067 #define APP_EVENT_PVR_RECORDING_FAILED          EVENT_CODE(EV_CLASS_APPLICATION, EV_PVR_RECORDING_FAILED)
00068 #define APP_EVENT_SERVICE_VIDEO_CODEC_CHANGED   EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_VIDEO_CODEC_CHANGED)
00069 #define APP_EVENT_SERVICE_AUDIO_CODEC_CHANGED   EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_AUDIO_CODEC_CHANGED)
00070 #define APP_EVENT_SERVICE_CHANGED               EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_CHANGED)
00071 #define APP_EVENT_SERVICE_STREAMS_CHANGED       EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_STREAMS_CHANGED)
00072 #define APP_EVENT_SERVICE_SI_PID_UPDATE         EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_SI_PID_UPDATE)
00073 #define APP_EVENT_TIME_CHANGED                  EVENT_CODE(EV_CLASS_APPLICATION, EV_TIME_CHANGED)
00074 #define APP_EVENT_CIPLUS_TUNE_COMPLETED         EVENT_CODE(EV_CLASS_APPLICATION, EV_CIPLUS_TUNE_COMPLETED)
00075 #define APP_EVENT_SERVICE_DELETED               EVENT_CODE(EV_CLASS_APPLICATION, EV_SERVICE_DELETED)
00076 #define APP_EVENT_TIMER_TRIGGERED               EVENT_CODE(EV_CLASS_APPLICATION, EV_TIMER_TRIGGERED)
00077 
00078 #define DISK_NAME_LEN               40    /* Max length for the name of a disk */
00079 
00080 //---TYPEDEFS-STRUCTS-ENUMERATIONS------------------------------------------------------------------
00081 typedef enum
00082 {
00083    ACB_GET_SUBTITLE_PREF,
00084    ACB_GET_AD_PREF,
00085    ACB_GET_UI_LANG_PREF,
00086    ACB_NUM_INFO_TYPES
00087 } E_ACB_INFO_TYPE;
00088 
00089 typedef struct
00090 {
00091    BOOLEAN pref;
00092 } S_ACB_SUBTITLE_PREF;
00093 
00094 typedef struct
00095 {
00096    BOOLEAN pref;
00097 } S_ACB_AD_PREF;
00098 
00099 typedef struct
00100 {
00101    E_ACB_INFO_TYPE type;
00102    union
00103    {
00104       S_ACB_SUBTITLE_PREF subtitle;
00105       S_ACB_AD_PREF ad;
00106       U8BIT ui_lang_id;
00107    } u;
00108 } S_ACB_UI_INFO;
00109 
00110 /*!**************************************************************************
00111  * @brief   Callback function implemented in the UI. This function is called
00112  *          by the DVB module to query values defined in the UI (e.g. user
00113  *          preferences)
00114  * @param   S_ACB_UI_INFO (IN/OUT) pointer to the structure that contains
00115  *          the type of request and other fields to exchange information
00116  *          between the DVB and the UI. These fields can be input or output
00117  *          values depending on the query type.
00118  * @return  TRUE if the information is returned, FALSE otherwise
00119  ****************************************************************************/
00120 typedef BOOLEAN (*ACB_INFO_CALLBACK)(S_ACB_UI_INFO *info);
00121 
00122 //---DEFINE THE GLOBAL VARIABLES--------------------------------------------------------------------
00123 
00124 //---FUNCTION PROTOTYPES----------------------------------------------------------------------------
00125 BOOLEAN APP_InitialiseDVB(void (*event_handler)(U32BIT event, void *event_data, U32BIT data_size));
00126 
00127 void APP_TerminateDVB(void);
00128 
00129 // version string/Number retrieval
00130 U8BIT* App_GetVersionString(void);
00131 U32BIT App_GetVersionNumber(void);
00132 
00133 void APP_RegisterUIInfoCallback(ACB_INFO_CALLBACK ui_info_callback);
00134 
00135 #endif //  _APP_H
00136 //**************************************************************************************************
00137 // End of File
00138 //**************************************************************************************************
00139 
 All Data Structures Files Functions Typedefs Defines