📄 jmmsmainmmsui.c
字号:
#endif /* __MMI_UNIFIED_MESSAGE__ */
#ifdef __MMI_UNIFIED_MESSAGE__
mmi_um_jmms_folder_list_callback();
mmi_um_jmms_set_folder_list_callback_function(mmi_um_jmms_dummy_folder_list_callback);
#else /* __MMI_UNIFIED_MESSAGE__ */
if (strcmp((S8*) MMI_JMMS_INBOX, (S8*) foldername) == 0)
{
mmi_jmms_entry_inbox_screen();
}
else if (strcmp((S8*) MMI_JMMS_OUTBOX, (S8*) foldername) == 0)
{
mmi_jmms_entry_outbox_screen();
}
else if (strcmp((S8*) MMI_JMMS_SENT, (S8*) foldername) == 0)
{
mmi_jmms_entry_sent_screen();
}
else if (strcmp((S8*) MMI_JMMS_DRAFTS, (S8*) foldername) == 0)
{
mmi_jmms_entry_drafts_screen();
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
DeleteScreenIfPresent(SCR_ID_JMMS_GET_MSGS_PROGRESS_SCREEN);
g_jmms_context->store_context->jmms_start_index = 1;
}
else
{
g_jmms_context->store_context->jmms_start_index =
g_jmms_context->store_context->jmms_start_index + StoreRetFilter.uiNumMessage;
eRet = mmi_jmms_send_get_msg_list_event(foldername, total_num_msgs);
}
return eRet;
}
#ifndef __MMI_UNIFIED_MESSAGE__
/*****************************************************************************
* FUNCTION
* mmi_jmms_create_new_mms_hint
* DESCRIPTION
*
* PARAMETERS
* node [IN]
* to [?] [?] [?]
* cc [?] [?] [?]
* bcc [?] [?] [?]
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_create_new_mms_hint(jmms_folder_msgs_list **node, JC_CHAR *to, JC_CHAR *cc, JC_CHAR *bcc)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S8 *str = NULL;
S32 len = 0;
S32 start_index = 0;
MMI_BOOL is_email = MMI_FALSE;
S32 len_to_copy = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (to != NULL)
{
str = (S8*) (to);
len = 0;
start_index = 0;
while (((*str) != ';') && ((*str) != '\0'))
{
if ((*str) == '@')
{
is_email = MMI_TRUE;
}
len++;
str = str + ENCODING_LENGTH;
}
if (is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
}
else if (is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
}
else
{
len_to_copy = len;
}
(*node)->address_as_hint = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
if ((*node)->address_as_hint == NULL)
{
goto END;
}
pfnUnicodeStrncpy((S8*) ((*node)->address_as_hint), (S8*) (to + start_index), len_to_copy);
return;
}
if (cc != NULL)
{
str = (S8*) (cc);
len = 0;
start_index = 0;
is_email = MMI_FALSE;
while (((*str) != ';') && ((*str) != '\0'))
{
len++;
if ((*str) == '@')
{
is_email = MMI_TRUE;
}
str = str + ENCODING_LENGTH;
}
if (is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
}
else if (is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
}
else
{
len_to_copy = len;
}
(*node)->address_as_hint = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
if ((*node)->address_as_hint == NULL)
{
goto END;
}
pfnUnicodeStrncpy((S8*) ((*node)->address_as_hint), (S8*) (cc + start_index), len_to_copy);
return;
}
/* /Make the BCc Addresses list */
if (bcc != NULL)
{
str = (S8*) (bcc);
len = 0;
start_index = 0;
is_email = MMI_FALSE;
while (((*str) != ';') && ((*str) != '\0'))
{
len++;
if ((*str) == '@')
{
is_email = MMI_TRUE;
}
str = str + ENCODING_LENGTH;
}
if (is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
}
else if (is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
{
len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
}
else
{
len_to_copy = len;
}
(*node)->address_as_hint = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
if ((*node)->address_as_hint == NULL)
{
goto END;
}
pfnUnicodeStrncpy((S8*) ((*node)->address_as_hint), (S8*) (bcc + start_index), len_to_copy);
return;
}
return;
END:
mmi_jmms_free_msgs_list(&(g_jmms_context->store_context->messages_list));
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
#ifdef __MMI_UNIFIED_MESSAGE__
/*****************************************************************************
* FUNCTION
* mmi_jmms_set_msg_type
* DESCRIPTION
*
* PARAMETERS
* index [IN]
* msg_type [IN]
* RETURNS
*
*****************************************************************************/
U16 mmi_jmms_set_msg_type(U8 index, U16 msg_type)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
jmms_folder_msgs_list *msgs_list_node = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msgs_list_node = g_jmms_context->store_context->messages_list;
while (msgs_list_node != NULL)
{
if (msgs_list_node->msg_index == index)
{
break;
}
msgs_list_node = msgs_list_node->next;
}
if (msgs_list_node == NULL)
{
return E_MSG_UNKNOWN;
}
msgs_list_node->msg_type = msg_type;
return msgs_list_node->msg_type;
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
/*****************************************************************************
* FUNCTION
* mmi_jmms_get_msg_type
* DESCRIPTION
*
* PARAMETERS
* index [IN]
* RETURNS
*
*****************************************************************************/
U16 mmi_jmms_get_msg_type(U8 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
jmms_folder_msgs_list *msgs_list_node = NULL;
#ifndef __MMI_UNIFIED_MESSAGE__
U8 count = 0;
#endif
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msgs_list_node = g_jmms_context->store_context->messages_list;
#ifdef __MMI_UNIFIED_MESSAGE__
while (msgs_list_node != NULL)
{
if (msgs_list_node->msg_index == index)
{
break;
}
msgs_list_node = msgs_list_node->next;
}
#else /* __MMI_UNIFIED_MESSAGE__ */
while (count != index && msgs_list_node != NULL)
{
msgs_list_node = msgs_list_node->next;
count++;
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
if (msgs_list_node == NULL)
{
return E_MSG_UNKNOWN;
}
return msgs_list_node->msg_type;
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_free_msgs_list
* DESCRIPTION
*
* PARAMETERS
* msgs_list [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_free_msgs_list(jmms_folder_msgs_list **msgs_list)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
jmms_folder_msgs_list *list;
jmms_folder_msgs_list *list1;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
list1 = *msgs_list;
list = *msgs_list;
while (list != NULL)
{
list1 = list->next;
#ifdef __MMI_UNIFIED_MESSAGE__
if (list->um_msg_info != NULL)
{
jdd_MemFree(list->um_msg_info);
list->um_msg_info = NULL;
}
#else /* __MMI_UNIFIED_MESSAGE__ */
if (list->address_as_hint != NULL)
{
jdd_MemFree(list->address_as_hint);
list->address_as_hint = NULL;
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
/* nedd to strcmp all static subjects, Don't call jdd_memfree for them */
#ifndef __MMI_UNIFIED_MESSAGE__
if (list->subject_as_caption != NULL
&& (pfnUnicodeStrcmp((S8*) (list->subject_as_caption), (S8*) GetString(STR_ID_NO_SUBJECT)) != 0)
&& (pfnUnicodeStrcmp((S8*) (list->subject_as_caption), (S8*) GetString(STR_ID_JMMS_DELIVERY_REPORT))
!= 0) &&
(pfnUnicodeStrcmp((S8*) (list->subject_as_caption), (S8*) GetString(STR_ID_SETTINGS_READ_REPORT)) != 0))
{
jdd_MemFree(list->subject_as_caption);
list->subject_as_caption = NULL;
}
#endif /* __MMI_UNIFIED_MESSAGE__ */
jdd_MemFree(list);
list = NULL;
list = list1;
}
*msgs_list = NULL;
}
#ifndef __MMI_UNIFIED_MESSAGE__
/*****************************************************************************
* FUNCTION
* mmi_jmms_back_from_msgs_list_screen
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_back_from_msgs_list_screen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
mmi_jmms_free_msgs_list(&(g_jmms_context->store_context->messages_list));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -