123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- /******************************************************************************
- ** al_prog_reminder.h: Program reminder Component Header file.
- **
- ** Copyright(c) 2008 Wipro Technologies - All Rights Reserved
- ** Author : Soumya Pandiyattu
- **
- ** $Id: app_dvb_prog_reminder.h,v 1.1.1.1 2009/04/15 03:24:32 junluo Exp $
- ******************************************************************************/
- #ifndef __AL_PR_H__
- #define __AL_PR_H__
- #include "al_basictypes.h"
- #include "al_database.h"
- #include "al_scheduler.h"
- #define PR_MUXTEX_NAME "PR_Mutex"
- /* Value of Zero for the Service or Event
- ** reminder means that both share the total
- ** reminders. If both wants fixed number of the reminders
- ** then different values to be provided and total of
- ** both should match the total reminders */
- #define AL_PR_MAX_NO_SRV_REMINDERS (0)
- #define AL_PR_MAX_NO_EVT_REMINDERS (0)
- typedef al_uint16 AL_PR_index_t;
- typedef struct
- {
- al_int8 MaxNumOfReminders;
- AL_SCH_time_t app_schd_time[AL_SCH_MAX_NO_OF_CALLBACK];
- }AL_PR_Init_Param_t;
- typedef enum
- {
- AL_PR_INVALID_REM =0,
- AL_PR_EVT_REM = 1<<0,
- AL_PR_SRV_REM = 1<<1,
- AL_PR_ANA_EVT_REM = 1<<2
- } AL_PR_type_t;
- typedef enum
- {
- AL_PR_REC_FIRST,
- AL_PR_REC_LAST,
- AL_PR_REC_NEXT,
- AL_PR_REC_PREV
- } AL_PR_record_type_t;
- typedef struct
- {
- AL_RecHandle_t handle;
- AL_RecHandle_t Eventhandle;
- al_uint32 event_end_time_insec;
- } AL_PR_schedule_details_t;
- typedef struct
- {
- AL_DB_EDBType_t db_type;
- AL_PR_type_t rem_type;
- AL_PR_schedule_details_t rem_details;
- AL_SCH_sched_id_t sch_id;
- al_uint32 start_local_time_secs;
- al_uint32 snooze_time_secs;
- al_int8 gmt_offset;
- al_bool enable;
- al_bool weekday;
- } AL_PR_details_t;
- typedef struct PR_persistent_info_t_{
- AL_DB_EDBType_t db_type;
- AL_PR_type_t rem_type;
- AL_PR_schedule_details_t rem_details;
- al_uint32 start_local_time_secs;
- al_uint32 snooze_time_secs;
- al_int8 gmt_offset;
- al_bool enable;
- al_bool occupied;
- al_bool weekday;
- } PR_persistent_info_t;
- typedef struct PR_details_t_{
- PR_persistent_info_t details;
- AL_SCH_sched_id_t sch_id;
- al_uint8 next_index;
- } PR_details_t;
- /*****************************************************************************
- ** FUNCTION : AL_FW_PR_SetInitParam
- **
- ** DESCRIPTION :
- ** Set init Param for Prog Reminder.
- **
- ** PARAMETERS :
- ** AL_PR_Init_Param_t
- **
- ** RETURN VALUES:
- ** void
- *****************************************************************************/
- al_void AL_PR_SetInitParam(AL_PR_Init_Param_t *Init_param);
- /*****************************************************************************
- ** FUNCTION : AL_PR_Init
- **
- ** DESCRIPTION :
- ** This function is used to initialise program reminder module.
- **
- ** PARAMETERS :
- ** set MAX_NO_REMINDERS and NOTIFY_TIME_IN_SEC
- **
- ** RETURN VALUES:
- ** AL_SUCCESS
- *****************************************************************************/
- AL_Return_t AL_PR_Init (void);
- /************************************************************************
- ** name : AL_PR_GetById(AL_SCH_sched_id_t *id,APP_PR_details_t details)
- **
- ** description : This API Terminate this component
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_GetById ( AL_SCH_sched_id_t id, AL_PR_details_t *details);
- /************************************************************************
- ** name : AL_PR_Get(AL_SCH_sched_id_t *id,APP_PR_details_t details)
- **
- ** description : This API Terminate this component
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_Get (AL_DB_EDBType_t db_type, AL_PR_record_type_t req_type, AL_PR_type_t rem_type,
- const AL_SCH_sched_id_t ref_id, AL_SCH_sched_id_t *ret_id);
- /************************************************************************
- ** name : AL_PR_GetTotal
- **
- ** description : This API Terminate this component
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_GetTotal (AL_DB_EDBType_t db_type, AL_PR_type_t rem_type, al_uint8* total_count);
- /************************************************************************
- ** name : AL_PR_Add()
- **
- ** description : Add new reminder
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_Add( AL_PR_details_t *details, AL_SCH_sched_id_t *id);
- /************************************************************************
- ** name : AL_PR_AddEx()
- **
- ** description : Add new reminder and get the conflicted timers
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_AddEx( AL_PR_details_t* details , AL_SCH_sched_id_t* id,AL_SCH_sched_id_t* ConflictTimerID, UINT8* ConflictTimerNum);
- /************************************************************************
- ** name : AL_PR_Modify()
- **
- ** description : This API modifies the scheduled event with new information
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_Modify(AL_PR_details_t *details, AL_SCH_sched_id_t id);
- /************************************************************************
- ** name : AL_PR_ModifyEx()
- **
- ** description : This API modifies the scheduled event with new information
- ** : and get the conflicted timers
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_ModifyEx(AL_PR_details_t *details ,AL_SCH_sched_id_t id,AL_SCH_sched_id_t* ConflictTimerID, UINT8* ConflictTimerNum);
- /************************************************************************
- ** name : AL_PR_Delete()
- **
- ** description : This API Delete this reminder
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_Delete(AL_SCH_sched_id_t id);
- /************************************************************************
- ** name :APP_Data_PR_delete_all_sch()
- **
- ** description : This API delete all the schedule for the Program reminder
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_DeleteAllSch (AL_DB_EDBType_t db_type, AL_PR_type_t rem_type );
- /************************************************************************
- ** name :AL_PR_DefaultSetup()
- **
- ** description : This API perform default setup.
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_DefaultSetup(AL_DB_EDBType_t db_type);
- /************************************************************************
- ** name : AL_PR_SetAllStatus()
- **
- ** description : This API modifies Then enable disable status.
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_SetAllStatus(al_bool enable_rem);
- /************************************************************************
- ** name :AL_PR_GetMaxNoOfReminders()
- **
- ** description : This API returns the second that before registed event take place.
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : al_uint8 No. of reminders
- ************************************************************************/
- al_uint8 AL_PR_GetMaxNoOfReminders(void);
- /************************************************************************
- ** name :AL_PR_NotifyTime()
- **
- ** description : This API returns the second that before registed event take place.
- **
- ** input parameters : none
- **
- ** output parameters : none
- **
- ** return type : al_uint32 time in sec
- ************************************************************************/
- al_uint32 AL_PR_NotifyTime(void);
- /************************************************************************
- ** name :AL_PR_Update()
- **
- ** description : Handle the whether reminder should be kept or removed for every reminder.
- **
- ** input parameters :None
- **
- ** output parameters :None.
- **
- ** return type : AL_Return_t
- ************************************************************************/
- AL_Return_t AL_PR_Update(al_int32 time_diff, al_uint32 new_time);
- /**
- * @brief We can konw the recording is normal recording or timer recording.
- *
- * @param ppfGetContext[output] callback function.
- *
- * @return the Prog_remind_id.
- */
- al_int AL_FW_PVR_GetProgReminderId(void);
- /**
- * @brief We can konw the recording is normal recording or timer recording.
- *
- * @param if the recording is normal recording , the Prog_remind_id is AL_SCH_INVALID_ID .
- *
- * @return none
- */
- void AL_FW_PVR_SetProgReminderId(al_int id);
- /************************************************************************
- ** name : AL_PR_CheckEvtEndTime()
- **
- ** description :
- **
- ** input parameters : A event end time
- **
- ** output parameters : none
- **
- ** return type : Boolean True A event end time is B event start time,
- ************************************************************************/
- Boolean AL_PR_CheckEvtEndTime(al_uint32 EndTime);
- #endif
- /******************************************************************************
- ** $Log: ACPR_Component.h,v $
- ******************************************************************************/
|