ai_event.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /**
  2. * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. *
  6. * @brief The header file of ai event module
  7. *
  8. */
  9. #ifndef _AI_EVENT_H_
  10. #define _AI_EVNET_H_
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #include "al_basictypes.h"
  15. #include "al_database.h"
  16. #include "al_event.h"
  17. /**<Define message type of event component */
  18. typedef enum
  19. {
  20. AL_EVENT_NOWNEXT_EVNET_UPDATE,
  21. AL_EVENT_SCHEDULE_EVNET_UPDATE,
  22. AL_EVENT_PREF_SERVICE_NAME_UPDATE,
  23. AL_EVENT_SERIES_EVENT_UPDATE,
  24. } AI_Event_Message_Type_t;
  25. /**< call back function prototype for up layer to register */
  26. typedef al_int32 (* AI_EventCallback)(AI_Event_Message_Type_t EventType, al_void* pParam);
  27. /**< Data struct to initialize al event module */
  28. typedef struct
  29. {
  30. #ifdef CONFIG_USE_COMPRESSED_EPGMODULE
  31. al_uint32 TotalSize;
  32. #else
  33. al_uint32 TotalChannel;
  34. al_uint32 TotalEvent;
  35. al_uint32 TotalExtendEvent;
  36. #endif
  37. AI_EventCallback fpcallback;
  38. } AI_Event_Init_t;
  39. /**
  40. * @brief Initializes the event component.
  41. *
  42. * @param DBType - Specify database on which to build
  43. *
  44. * @param pstInit - pointer to initial parameters
  45. *
  46. * @retval AL_SUCCESS means succss. AL_INITIALIZE_ALREADY means already initialised.
  47. * AL_FAILURE means failed
  48. */
  49. AL_Return_t AI_Event_Init(AL_DB_EDBType_t DBType, AI_Event_Init_t *pstInit);
  50. /**
  51. * @brief Terminates the event component.
  52. *
  53. * @param DBType - Specify database on which to build
  54. *
  55. * @retval AL_SUCCESS means succss. AL_INITIALIZE_ALREADY means already initialised.
  56. * AL_FAILURE means failed
  57. */
  58. AL_Return_t AI_Event_Term(AL_DB_EDBType_t DBType);
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif /* _AI_EVENT_H_ */