📄 jpushinboxum.c
字号:
{
if ((expiry_secs_since_1970 > current_secs_since_1970) ||
(g_brw_service_msg_list_p[msg_counter]->pSIExpires == NULL))
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_UNREAD;
}
else
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_EXPIRED_UNREAD;
}
}
else
{
if ((expiry_secs_since_1970 > current_secs_since_1970) ||
(g_brw_service_msg_list_p[msg_counter]->pSIExpires == NULL))
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_READ;
}
else
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_EXPIRED_READ;
}
}
}
else
{
if (g_brw_service_msg_list_p[msg_counter]->bIsRead == 0)
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_UNREAD;
}
else
{
push_info_rsp->msg_info[msg_counter - start_entry].icon_id = IMG_ID_BRW_PUSH_READ;
}
}
}
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_GET_MSG_INFO_RSP;
/* Send Response to MMI Queue */
Message.oslDataPtr = (oslParaType*) push_info_rsp;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_delete_all_push_messages_req
* DESCRIPTION
* Function to delete all push messages and send response to UM.
* PARAMETERS
* msg_delete_all_req [?]
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_delete_all_push_messages_req(void *msg_delete_all_req)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MYQUEUE Message;
U32 msg_counter, brw_total_msg_count, brw_unread_msg_count;
mmi_um_delete_folder_rsp_struct *push_delete_all_rsp;
mmi_um_delete_folder_req_struct *um_msg_delete_all_req = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
um_msg_delete_all_req = (mmi_um_delete_folder_req_struct*) msg_delete_all_req;
/* Added by Vivek - 25072006 */
if (UM_MSG_BOX_TYPE_INBOX & um_msg_delete_all_req->msg_box_type)
{
mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count);
/* Delete all messages one by one */
for (msg_counter = 0; msg_counter < brw_total_msg_count; msg_counter++)
{
mmi_brw_delete_push_msg(0);
}
/* Added by Vivek - 24072006 */
mmi_brw_push_free_service_value_struct(&g_current_service_message);
/* Save to persistant storage */
mmi_brw_save_current_push_info();
/* hide unread push message icon on idle screen */
HideStatusIcon(STATUS_ICON_WAP);
}
push_delete_all_rsp =
(mmi_um_delete_folder_rsp_struct*) OslConstructDataPtr(sizeof(mmi_um_delete_folder_rsp_struct));
push_delete_all_rsp->msg_type = UM_MSG_TYPE_WAP_PUSH;
push_delete_all_rsp->result = KAL_TRUE;
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_DELETE_FOLDER_RSP;
/* Send Response to MMI Queue */
Message.oslDataPtr = (oslParaType*) push_delete_all_rsp;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_push_ready_ind
* DESCRIPTION
* Function to send an indication to UM that browser is ready.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_push_ready_ind()
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MYQUEUE Message;
mmi_um_ready_ind_struct *push_um_ready_ind;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
push_um_ready_ind = (mmi_um_ready_ind_struct*) OslConstructDataPtr(sizeof(mmi_um_ready_ind_struct));
push_um_ready_ind->result = KAL_TRUE;
push_um_ready_ind->msg_type = UM_MSG_TYPE_WAP_PUSH;
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_READY_IND;
/* Send Response to MMI Queue */
Message.oslDataPtr = (oslParaType*) push_um_ready_ind;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_new_push_message_ind
* DESCRIPTION
* Function to send an indication to UM that a new push message has arrived.
* PARAMETERS
* pServiceValue [?]
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_new_push_message_ind(SERVICE_VALUE *pServiceValue)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MYQUEUE Message;
mmi_um_new_msg_ind_struct *push_new_msg_ind;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* update the copy of local pointers */
mmi_brw_create_push_msg_list();
push_new_msg_ind = (mmi_um_new_msg_ind_struct*) OslConstructDataPtr(sizeof(mmi_um_new_msg_ind_struct));
push_new_msg_ind->msg_type = UM_MSG_TYPE_WAP_PUSH;
push_new_msg_ind->msg_box_type = UM_MSG_BOX_TYPE_INBOX;
push_new_msg_ind->msg_index = 0;
push_new_msg_ind->timestamp = mmi_um_brw_get_push_time_stamp(pServiceValue);
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_NEW_MSG_IND;
Message.oslDataPtr = (oslParaType*) push_new_msg_ind;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_delete_all_push_messages_ind
* DESCRIPTION
* Function to send an indication to UM that a user has
* selected to delete all push messages.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_delete_all_push_messages_ind(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MYQUEUE Message;
mmi_um_delete_all_ind_struct *push_delete_all_ind;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
push_delete_all_ind = (mmi_um_delete_all_ind_struct*) OslConstructDataPtr(sizeof(mmi_um_delete_all_ind_struct));
push_delete_all_ind->msg_type = UM_MSG_TYPE_WAP_PUSH;
push_delete_all_ind->msg_box_type = UM_MSG_BOX_TYPE_INBOX;
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_DELETE_ALL_IND;
/* Send Response to MMI Queue */
Message.oslDataPtr = (oslParaType*) push_delete_all_ind;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_delete_all_push_messages_rsp
* DESCRIPTION
* Function to recieve information that if user has confirmed
* to delete all push messages or not.
* PARAMETERS
* result [IN] - confirmation of deletion of all messages.
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_delete_all_push_messages_rsp(U16 result)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (result == KAL_TRUE)
{
DeleteNHistory(2);
}
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_highlight_push_messages_ind
* DESCRIPTION
* Function to send information to UM about the currently highlighted item.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_highlight_push_messages_ind(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MYQUEUE Message;
mmi_um_highlight_msg_ind_struct *push_highlight_ind;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
push_highlight_ind =
(mmi_um_highlight_msg_ind_struct*) OslConstructDataPtr(sizeof(mmi_um_highlight_msg_ind_struct));
push_highlight_ind->msg_type = UM_MSG_TYPE_WAP_PUSH;
push_highlight_ind->msg_box_type = UM_MSG_BOX_TYPE_INBOX;
push_highlight_ind->msg_index = g_brw_index_current_highlighted_item - 1;
/* Prepare response structure */
Message.oslSrcId = MOD_WAP /* MOD_MMI */;
Message.oslDestId = MOD_MMI;
Message.oslMsgId = MSG_ID_MMI_UM_HIGHLIGHT_MSG_IND;
/* Send Response to MMI Queue */
Message.oslDataPtr = (oslParaType*) push_highlight_ind;
Message.oslPeerBuffPtr = NULL;
OslMsgSendExtQueue(&Message);
}
/*****************************************************************************
* FUNCTION
* mmi_um_brw_refresh_ind
* DESCRIPTION
* Function to refresh UM message information.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_um_brw_refresh_ind(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
}
/*****************************************************************************
* FUNCTION
* mmi_um_jataayu_entry_message_wap_push
* DESCRIPTION
* Screen Entry function which is called when the user selects to
* view a particular push message.
* PARAMETERS
* msg_box_type [IN] - type of message box.
* msg_index [IN] - index of selected message.
* RETURNS
* void
*****************************************************************************/
void mmi_um_jataayu_entry_message_wap_push(UmMsgBoxType msg_box_type, kal_uint16 msg_index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
g_brw_index_current_highlighted_item = msg_index;
mmi_brw_entry_read_push_message();
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
#endif /* defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT) */
#endif /* _MMI_UMPUSHINBOX_C */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -