main_app_external.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /*****************************************************************************
  2. ** File: main_app_external.h
  3. **
  4. ** Description:
  5. **
  6. ** Copyright(c) 2008 Sunmedia Technologies - All Rights Reserved
  7. **
  8. ** Author : qin.he
  9. **
  10. ** $Id: $
  11. *****************************************************************************/
  12. #ifndef _APPLICAION_MAIN_APP_EXTERNAL_T_
  13. #define _APPLICAION_MAIN_APP_EXTERNAL_T_
  14. #include "al_fw.h"
  15. #ifdef CONFIG_SUPPORT_PVR
  16. #include "mid_recorder.h"
  17. #endif
  18. #define MAINAPP_DATABASE_NOSYNC (2<<16)
  19. typedef enum
  20. {
  21. ENTERSTANDBY_NOMAL = 0,
  22. ENTERSTANDBY_UPGRADE,
  23. ENTERSTANDBY_MAX,
  24. }EnterStandbyType_e;
  25. /*****************************************************************************
  26. ** FUNCTION : MAINAPP_InitFlow
  27. **
  28. ** DESCRIPTION :
  29. ** whole system initialize flow
  30. **
  31. ** PARAMETERS :
  32. ** param : total sys app number
  33. **
  34. ** RETURN VALUES:
  35. ** None
  36. *****************************************************************************/
  37. int MAINAPP_InitFlow(void *param);
  38. int MAINAPP_EnterStandby(EnterStandbyType_e type);
  39. /*****************************************************************************
  40. ** FUNCTION : MAINAPP_FinalizeFlow
  41. **
  42. ** DESCRIPTION :
  43. ** whole system finalize flow
  44. **
  45. ** PARAMETERS :
  46. ** dParam - Finalize flow
  47. **
  48. ** RETURN VALUES:
  49. ** None
  50. *****************************************************************************/
  51. int MAINAPP_FinalizeFlow(UINT32 dParam);
  52. /*****************************************************************************
  53. ** FUNCTION : MAINAPP_OnTimerUpdate
  54. **
  55. ** DESCRIPTION :
  56. ** main app 100ms message handler
  57. **
  58. ** PARAMETERS :
  59. ** None
  60. **
  61. ** RETURN VALUES:
  62. ** None
  63. *****************************************************************************/
  64. int MAINAPP_OnTimerUpdate(void);
  65. /*****************************************************************************
  66. ** FUNCTION : MAINAPP_OnEvent
  67. **
  68. ** DESCRIPTION :
  69. ** main app external event handler
  70. **
  71. ** PARAMETERS :
  72. ** dMessage : message
  73. ** dParam : the parameter for dMessage
  74. **
  75. ** RETURN VALUES:
  76. ** None
  77. *****************************************************************************/
  78. int MAINAPP_OnEvent(UINT32 dMessage, UINT32 dParam);
  79. /*****************************************************************************
  80. ** FUNCTION : _MAINAPP_FW_Callback
  81. **
  82. ** DESCRIPTION :
  83. ** Process messages received from AFW Framework
  84. **
  85. ** PARAMETERS :
  86. ** event - Event sent by FW component
  87. ** param - User parameter
  88. **
  89. ** RETURN VALUES:
  90. ** None
  91. *****************************************************************************/
  92. void MAINAPP_FW_Callback(AFW_event_t event, void *param);
  93. /*****************************************************************************
  94. ** FUNCTION : MAINAPP_FW_GetContext
  95. **
  96. ** DESCRIPTION :
  97. ** call back use to read/write information
  98. **
  99. ** PARAMETERS :
  100. ** ContextType - context type
  101. ** op - read/write
  102. ** pContext - callback
  103. ** Param - User parameter
  104. **
  105. ** RETURN VALUES:
  106. ** None
  107. *****************************************************************************/
  108. al_uint32 MAINAPP_FW_GetContext(AL_FW_Context_Type_t ContextType, al_uint32 opera,al_void * pContext, al_uint32 Param);
  109. /*****************************************************************************
  110. ** FUNCTION : MAINAPP_GetPowerOffState
  111. **
  112. ** DESCRIPTION :
  113. ** Get power off state
  114. **
  115. ** PARAMETERS :
  116. ** None
  117. **
  118. ** RETURN VALUES:
  119. ** g_bPowerOffFlag: power off state
  120. *****************************************************************************/
  121. Boolean MAINAPP_GetPowerOffState(void);
  122. void MAINAPP_SetPowerOffState(Boolean PowerOffFlag);
  123. void tv_SetSysTimetoRTC(void);
  124. void umf_GetData(void);
  125. void tv_SetBaseTimetoSystem(time_t rtcsec);
  126. #ifdef CONFIG_SUPPORT_PVR
  127. int _RecorderList_Callback(MID_PVRRecListParseMsg_t dPVRRecListCallbackType);
  128. #endif
  129. void MAINAPP_AddEevnetToTable(UINT32 dMessage,UINT32 dParm);
  130. void MAINAPP_ResendEventTableInTransition(void);
  131. #ifdef CONFIG_SUPPORT_MIRACAST
  132. int WriteP2pConfigToFlash(void);
  133. INT32 LoadP2pConfigFromFlash(void);
  134. #endif
  135. #ifdef CONFIG_KEYPAD_SINGLE_REUSE
  136. void APP_GetSingleKeyPadEvent(UINT32 *dMessage);
  137. #endif
  138. #endif