MessagesMiscell.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:281k
源码类别:
MTK
开发平台:
C/C++
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_msg_highlight_generic(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- mmi_msg_club_pre_entry_send_msg,
- GoBackHistory);
- ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- msg_club_level_3_index = MSG_CLUB_SERVICE_CANCEL;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_set_menu_highlight_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_set_menu_highlight_handler(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetHiliteHandler(MENU_MSG_CLUB_SUBSCRIBE, mmi_msg_club_highlight_subscribe);
- SetHiliteHandler(MENU_MSG_CLUB_ORDER, mmi_msg_club_highlight_order);
- SetHiliteHandler(MENU_MSG_CLUB_EXPLAIN, mmi_msg_club_highlight_explain);
- SetHiliteHandler(MENU_MSG_CLUB_QUIT, mmi_msg_club_highlight_quit);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_go_back_menu
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_go_back_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset((S8*) & MSGClubScreen[MSGClubCount], 0, sizeof(msg_club_entry_menu_struct));
- MSGClubCount--;
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_level_3_get_index
- * DESCRIPTION
- *
- * PARAMETERS
- * nIndex [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_level_3_get_index(S32 nIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- msg_club_level_3_index = (U8) nIndex;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_level_2_get_index
- * DESCRIPTION
- *
- * PARAMETERS
- * nIndex [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_level_2_get_index(S32 nIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- msg_club_level_2_index = (U8) nIndex;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_entry_voice_submenu
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_entry_voice_submenu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- U8 *itemList[MSG_CLUB_MENUITEM_NUM];
- U8 itemNum = MSGClubScreen[MSGClubCount].childNum;
- U8 i;
- U8 *caption;
- msg_club_entry_voice_struct *itemInfo = (msg_club_entry_voice_struct*) MSGClubScreen[MSGClubCount].childEntry;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (MSGClubScreen[MSGClubCount].childNum == 0)
- {
- msg_club_level_2_index = 0;
- mmi_msg_club_entry_make_call();
- memset((S8*) & MSGClubScreen[MSGClubCount], 0, sizeof(msg_club_entry_menu_struct));
- MSGClubCount--;
- return;
- }
- EntryNewScreen(SCR_ID_MSG_CLUB_VOICE_SUBMENU, NULL, mmi_msg_club_entry_voice_submenu, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_MSG_CLUB_VOICE_SUBMENU);
- for (i = 0; i < MSGClubScreen[MSGClubCount].childNum; i++)
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(itemInfo[i].stringID, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(itemInfo[i].stringID);
- #endif
- RegisterHighlightHandler(mmi_msg_club_level_2_get_index);
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- caption = (U8*) get_string_lang(MSGClubScreen[MSGClubCount].stringID, SSC_ENGLISH);
- #else
- caption = (U8*) GetString(MSGClubScreen[MSGClubCount].stringID);
- #endif
- ShowCategory353Screen(
- caption,
- IMG_MESSAGE_CLUB_ID,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- itemNum,
- itemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(mmi_msg_club_entry_make_call, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_entry_make_call, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(mmi_msg_club_go_back_menu, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_go_back_menu, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_entry_level_3
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_entry_level_3(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U16 nStrItemList[MAX_SUB_MENUS];
- U8 *itemList[MSG_CLUB_MENUITEM_NUM];
- U16 numItems;
- U32 menuItemId = -1;
- U32 menuItemId1 = -1;
- U32 maskingByte = -1;
- U8 i = 0;
- U8 *captionStr;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_MSG_CLUB_LEVEL_3, NULL, mmi_msg_club_entry_level_3, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_MSG_CLUB_LEVEL_3);
- SetParentHandler(MENU_MSG_CLUB_OPTION);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- numItems = GetNumOfChild(MENU_MSG_CLUB_OPTION);
- GetSequenceStringIds(MENU_MSG_CLUB_OPTION, nStrItemList);
- mmi_msg_club_set_menu_highlight_handler();
- menuItemId = GetChildMenuIDIndexByParentMenuID(MENU_MSG_CLUB_OPTION, MENU_MSG_CLUB_SUBSCRIBE);
- if (menuItemId != -1)
- {
- if (strcmp((S8*) MSGClubSMSItem.codeDY.codeNum, "") == 0)
- {
- ResetBit(maskingByte, menuItemId /* 1 */ );
- }
- else
- {
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(STR_MSG_CLUB_SUBSCRIBE, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(STR_MSG_CLUB_SUBSCRIBE);
- #endif
- i++;
- }
- }
- menuItemId = GetChildMenuIDIndexByParentMenuID(MENU_MSG_CLUB_OPTION, MENU_MSG_CLUB_ORDER);
- if (menuItemId != -1)
- {
- if (strcmp((S8*) MSGClubSMSItem.codeDB.codeNum, "") == 0)
- {
- ResetBit(maskingByte, menuItemId /* 2 */ );
- }
- else
- {
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(STR_MSG_CLUB_ORDER, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(STR_MSG_CLUB_ORDER);
- #endif
- i++;
- }
- }
- menuItemId = GetChildMenuIDIndexByParentMenuID(MENU_MSG_CLUB_OPTION, MENU_MSG_CLUB_EXPLAIN);
- if (menuItemId != -1)
- {
- if (strcmp((S8*) MSGClubSMSItem.codeZF.codeNum, "") == 0)
- {
- ResetBit(maskingByte, menuItemId /* 3 */ );
- }
- else
- {
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(STR_MSG_CLUB_INQUIRE, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(STR_MSG_CLUB_INQUIRE);
- #endif
- i++;
- }
- }
- menuItemId = GetChildMenuIDIndexByParentMenuID(MENU_MSG_CLUB_OPTION, MENU_MSG_CLUB_QUIT);
- if (menuItemId != -1)
- {
- if (strcmp((S8*) MSGClubSMSItem.codeTD.codeNum, "") == 0)
- {
- ResetBit(maskingByte, menuItemId /* 4 */ );
- }
- else
- {
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(STR_MSG_CLUB_QUIT, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(STR_MSG_CLUB_QUIT);
- #endif
- i++;
- }
- }
- MaskHiliteItems(MENU_MSG_CLUB_OPTION, maskingByte);
- numItems = MaskItems(nStrItemList, (U8) numItems, maskingByte);
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- captionStr = (U8*) get_string_lang(MSGClubSMSItem.stringID, SSC_ENGLISH);
- #else
- captionStr = (U8*) GetString(MSGClubSMSItem.stringID);
- #endif
- ShowCategory353Screen(
- captionStr,
- IMG_MESSAGE_CLUB_ID,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- numItems,
- itemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP); /* MTK Jo */
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_pre_entry_level_3
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_pre_entry_level_3(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- msg_club_entry_dy_db_zf_struct *itemInfo =
- (msg_club_entry_dy_db_zf_struct*) MSGClubScreen[MSGClubCount].childEntry;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memcpy((S8*) & MSGClubSMSItem, (S8*) & itemInfo[msg_club_level_2_index], sizeof(msg_club_entry_dy_db_zf_struct));
- if ((strcmp((S8*) MSGClubSMSItem.codeDY.codeNum, "") != 0)
- || (strcmp((S8*) MSGClubSMSItem.codeDB.codeNum, "") != 0))
- {
- mmi_msg_club_entry_level_3();
- }
- else
- {
- if (strcmp((S8*) MSGClubSMSItem.codeZF.codeNum, "") != 0)
- {
- msg_club_level_3_index = MSG_CLUB_SERVICE_EXPLAIN;
- }
- else
- {
- msg_club_level_3_index = MSG_CLUB_SERVICE_CANCEL;
- }
- mmi_msg_club_pre_entry_send_msg();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_entry_level_2
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_entry_level_2(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- S32 hiliteitem = 0;
- U8 *itemList[MSG_CLUB_MENUITEM_NUM];
- U8 itemNum = MSGClubScreen[MSGClubCount].childNum;
- U8 i;
- U8 *captionStr;
- msg_club_entry_dy_db_zf_struct *itemInfo =
- (msg_club_entry_dy_db_zf_struct*) MSGClubScreen[MSGClubCount].childEntry;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_MSG_CLUB_LEVEL_2, NULL, mmi_msg_club_entry_level_2, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_MSG_CLUB_LEVEL_2);
- for (i = 0; i < MSGClubScreen[MSGClubCount].childNum; i++)
- {
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[i] = (U8*) get_string_lang(itemInfo[i].stringID, SSC_ENGLISH);
- #else
- itemList[i] = (U8*) GetString(itemInfo[i].stringID);
- #endif
- }
- RegisterHighlightHandler(mmi_msg_club_level_2_get_index);
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- captionStr = (U8*) get_string_lang(MSGClubMenuItem[msg_club_level_1_index].stringID, SSC_ENGLISH);
- #else
- captionStr = (U8*) GetString(MSGClubMenuItem[msg_club_level_1_index].stringID);
- #endif
- ShowCategory353Screen(
- captionStr,
- IMG_MESSAGE_CLUB_ID,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- itemNum,
- itemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(mmi_msg_club_pre_entry_level_3, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_pre_entry_level_3, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(mmi_msg_club_go_back_menu, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_go_back_menu, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_level_1_get_index
- * DESCRIPTION
- *
- * PARAMETERS
- * nIndex [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_level_1_get_index(S32 nIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- msg_club_level_1_index = (U8) nIndex;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_pre_entry_menu
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_pre_entry_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- MSGClubCount++;
- memcpy(
- (S8*) & MSGClubScreen[MSGClubCount],
- (S8*) & MSGClubMenuItem[msg_club_level_1_index],
- sizeof(msg_club_entry_menu_struct));
- if ((MSGClubScreen[MSGClubCount].childType & MSG_CLUB_MENU) == MSG_CLUB_MENU)
- {
- mmi_msg_club_entry_level_1();
- }
- else if ((MSGClubScreen[MSGClubCount].childType & MSG_CLUB_VOICE_MENU) == MSG_CLUB_VOICE_MENU)
- {
- mmi_msg_club_entry_voice_submenu();
- }
- else if (MSGClubScreen[MSGClubCount].childNum > 0)
- {
- mmi_msg_club_entry_level_2();
- }
- else
- {
- msg_club_entry_dy_db_zf_struct *itemInfo =
- (msg_club_entry_dy_db_zf_struct*) MSGClubScreen[MSGClubCount].childEntry;
- memcpy((S8*) & MSGClubSMSItem, (S8*) & itemInfo[0], sizeof(msg_club_entry_dy_db_zf_struct));
- memset((S8*) & MSGClubScreen[MSGClubCount], 0, sizeof(msg_club_entry_menu_struct));
- MSGClubCount--;
- if ((strcmp((S8*) MSGClubSMSItem.codeDY.codeNum, "") != 0)
- || (strcmp((S8*) MSGClubSMSItem.codeDB.codeNum, "") != 0))
- {
- mmi_msg_club_entry_level_3();
- }
- else
- {
- if (strcmp((S8*) MSGClubSMSItem.codeZF.codeNum, "") != 0)
- {
- msg_club_level_3_index = MSG_CLUB_SERVICE_EXPLAIN;
- }
- else
- {
- msg_club_level_3_index = MSG_CLUB_SERVICE_CANCEL;
- }
- mmi_msg_club_pre_entry_send_msg();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_club_entry_level_1
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_club_entry_level_1(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- U8 *itemList[MSG_CLUB_MENUITEM_NUM];
- U8 itemNum = 0;
- U8 i, j = 0;
- U8 *captionStr;
- msg_club_entry_menu_struct *itemInfo = (msg_club_entry_menu_struct*) MSGClubScreen[MSGClubCount].childEntry;
- U16 scrIndex = SCR_ID_MSG_CLUB_LEVEL_1 + (U16) MSGClubCount;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(scrIndex, NULL, mmi_msg_club_entry_level_1, NULL);
- guiBuffer = GetCurrGuiBuffer(scrIndex);
- for (i = 0; i < MSGClubScreen[MSGClubCount].childNum; i++)
- {
- if (((itemInfo[i].childType & MSG_CLUB_CT_ONLY) == MSG_CLUB_CT_ONLY) && (MSGClubNetwork != MSG_CLUB_CT))
- {
- continue;
- }
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- itemList[j] = (U8*) get_string_lang(itemInfo[i].stringID, SSC_ENGLISH);
- #else
- itemList[j] = (U8*) GetString(itemInfo[i].stringID);
- #endif
- memcpy((S8*) & MSGClubMenuItem[j], (S8*) & itemInfo[i], sizeof(msg_club_entry_menu_struct));
- j++;
- }
- itemNum = j;
- RegisterHighlightHandler(mmi_msg_club_level_1_get_index);
- #ifdef __MMI_MESSAGES_CLUB_SIM_CHINESE__
- captionStr = (U8*) get_string_lang(MSGClubScreen[MSGClubCount].stringID, SSC_ENGLISH);
- #else
- captionStr = (U8*) GetString(MSGClubScreen[MSGClubCount].stringID);
- #endif
- ShowCategory353Screen(
- captionStr,
- IMG_MESSAGE_CLUB_ID,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- itemNum,
- itemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(mmi_msg_club_pre_entry_menu, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_pre_entry_menu, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(mmi_msg_club_go_back_menu, KEY_EVENT_UP);
- SetKeyHandler(mmi_msg_club_go_back_menu, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryMsgClub
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryMsgClub(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* micha0422 */
- if ((strncmp(gHomePLMNNum, "46000", 5) == 0) || (strncmp(gHomePLMNNum, "46002", 5) == 0))
- {
- MSGClubNetwork = MSG_CLUB_CT;
- }
- else if (strncmp(gHomePLMNNum, "46001", 5) == 0)
- {
- MSGClubNetwork = MSG_CLUB_CU;
- }
- else
- {
- MSGClubNetwork = MSG_CLUB_NETWORK_TOTAL;
- }
- if (MSGClubNetwork == MSG_CLUB_NETWORK_TOTAL)
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_DOES_NOT_SUPPORT),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- MSGClubCount = 0;
- memset(MSGClubScreen, 0, sizeof(msg_club_entry_menu_struct) * MSG_CLUB_SCREEN_NUM);
- MSGClubScreen[0].stringID = STR_MSG_CLUB;
- MSGClubScreen[0].childNum = mmi_msg_club_get_item_total();
- MSGClubScreen[0].childType = MSG_CLUB_MENU;
- MSGClubScreen[0].childEntry = (void*)MenuMSGClub;
- mmi_msg_club_entry_level_1();
- }
- }
- #endif /* __MMI_MESSAGES_CLUB__ */
- #ifdef __MMI_UNIFIED_MESSAGE__
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_um_entry_msg
- * DESCRIPTION
- * entry sms msg
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_um_entry_msg(UmMsgBoxType msg_box_type, kal_uint16 msg_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- UmMsgBoxType type = msg_box_type;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_msg_cntx.currBoxIndex = msg_index;
- switch (type)
- {
- #ifdef __UNIFIED_MESSAGE_LIST_OPTION_SUPPORT__
- case UM_MSG_BOX_TYPE_INBOX:
- {
- /* Update the totalinbox value in order to get the current inbox list size */
- msgbox_info.totalinbox = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_APP_INBOX);
- mmi_msg_pre_entry_list_option_req(MMI_FRM_SMS_APP_INBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_SENT:
- {
- mmi_msg_pre_entry_list_option_req(MMI_FRM_SMS_APP_OUTBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_UNSENT:
- case UM_MSG_BOX_TYPE_DRAFT:
- {
- mmi_msg_pre_entry_list_option_req(MMI_FRM_SMS_APP_DRAFTS);
- break;
- }
- #else /* __UNIFIED_MESSAGE_LIST_OPTION_SUPPORT__ */
- case UM_MSG_BOX_TYPE_INBOX:
- {
- /* Update the totalinbox value in order to get the current inbox list size */
- msgbox_info.totalinbox = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_APP_INBOX);
- mmi_msg_get_msg_inbox();
- break;
- }
- case UM_MSG_BOX_TYPE_SENT:
- {
- mmi_msg_get_msg_outbox();
- break;
- }
- case UM_MSG_BOX_TYPE_UNSENT:
- case UM_MSG_BOX_TYPE_DRAFT:
- {
- mmi_msg_get_msg_draftbox();
- break;
- }
- #endif /* __UNIFIED_MESSAGE_LIST_OPTION_SUPPORT__ */
- default:
- {
- MMI_ASSERT(0);
- break;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_um_entry_write
- * DESCRIPTION
- * entry function for sms editor by Unified Message
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_um_entry_write(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_msg_cntx.sendMessageCase = SEND_CASE_SEND_ONLY;
- g_msg_cntx.PhbSmsInterfaceState = MMI_SEND_ONLY;
- mmi_msg_entry_write_msg();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_um_entry_template
- * DESCRIPTION
- * entry function for sms template
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_um_entry_template(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_msg_entry_template_list();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_um_entry_setting
- * DESCRIPTION
- * entry function for sms setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_um_entry_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_msg_pre_entry_msg_settings();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_set_background_process
- * DESCRIPTION
- * set if SMS is in the background process
- * PARAMETERS
- * flag [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_set_background_process(kal_bool flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_msg_cntx.is_background_process = (U8) flag;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_check_background_process
- * DESCRIPTION
- * check if SMS is in the background process
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- kal_bool mmi_msg_check_background_process(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_msg_cntx.is_background_process)
- {
- return KAL_TRUE;
- }
- else
- {
- return KAL_FALSE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_set_post_send_action_type
- * DESCRIPTION
- * set the type of action after send
- * PARAMETERS
- * action [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_set_post_send_action_type(U8 action)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_msg_cntx.post_send_action = action;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_post_send_action_type
- * DESCRIPTION
- * get post send action type
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_msg_get_post_send_action_type(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_msg_cntx.post_send_action;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_msg_num
- * DESCRIPTION
- * get sms msg number of each msg box
- * PARAMETERS
- * inbox_msg_number [?]
- * inbox_unread_msg_number [?]
- * unsent_msg_number [?]
- * sent_msg_number [?]
- * draft_msg_number [?]
- * RETURNS
- * void
- *****************************************************************************/
- kal_bool mmi_msg_get_msg_num(
- kal_uint16 *inbox_msg_number,
- kal_uint16 *inbox_unread_msg_number,
- kal_uint16 *unsent_msg_number,
- kal_uint16 *sent_msg_number,
- kal_uint16 *draft_msg_number)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- kal_uint16 i = 0;
- U8 type = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (*inbox_msg_number == MMI_FRM_SMS_INVALID_INDEX)
- {
- return KAL_FALSE;
- }
- *inbox_msg_number = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_INBOX);
- *sent_msg_number = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_OUTBOX);
- *inbox_unread_msg_number = 0;
- *unsent_msg_number = 0;
- *draft_msg_number = 0;
- while (i < *inbox_msg_number)
- {
- type = mmi_frm_sms_get_status(MMI_FRM_SMS_APP_INBOX, i) & 0x0f;
- if (type == MMI_FRM_SMS_APP_UNREAD)
- {
- (*inbox_unread_msg_number)++;
- }
- i++;
- }
- mmi_frm_sms_get_unsent_msg_num(unsent_msg_number);
- mmi_frm_sms_get_draft_msg_num(draft_msg_number);
- return KAL_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_list_info
- * DESCRIPTION
- * get sms list info
- * PARAMETERS
- * msg_box_type [IN]
- * start_entry [IN]
- * max_msg_number [IN]
- * msg_number [?]
- * list_info [?]
- * more [?]
- * RETURNS
- * void
- *****************************************************************************/
- kal_bool mmi_msg_get_list_info(
- UmMsgBoxType msg_box_type,
- kal_uint16 start_entry,
- kal_uint16 max_msg_number,
- kal_uint16 *msg_number,
- mmi_um_list_info_struct *list_info,
- kal_bool *more)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- kal_uint16 msg_list_index = start_entry;
- kal_uint16 i = 0;
- U8 *timestamp = NULL;
- U8 sms_msg_box_type = 0;
- kal_uint16 sms_msg_box_size = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *msg_number = 0;
- switch (msg_box_type)
- {
- case UM_MSG_BOX_TYPE_INBOX:
- {
- sms_msg_box_type = MMI_FRM_SMS_INBOX;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_INBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_UNSENT:
- {
- sms_msg_box_type = MMI_FRM_SMS_UNSENT;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_UNSENT);
- break;
- }
- case UM_MSG_BOX_TYPE_SENT:
- {
- sms_msg_box_type = MMI_FRM_SMS_OUTBOX;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_OUTBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_DRAFT:
- {
- sms_msg_box_type = MMI_FRM_SMS_DRAFTS;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_DRAFTS);
- break;
- }
- default:
- {
- MMI_ASSERT(0);
- break;
- }
- }
- for (; (i < max_msg_number); i++)
- {
- UI_time datetime;
- if (msg_box_type == UM_MSG_BOX_TYPE_UNSENT)
- {
- if (!mmi_frm_sms_get_next_unsent_msg(&msg_list_index))
- {
- *more = KAL_FALSE;
- return KAL_TRUE;
- }
- }
- else if (msg_box_type == UM_MSG_BOX_TYPE_DRAFT)
- {
- if (!mmi_frm_sms_get_next_draft_msg(&msg_list_index))
- {
- *more = KAL_FALSE;
- return KAL_TRUE;
- }
- }
- /* For inbox and sent */
- else
- {
- if (msg_list_index >= sms_msg_box_size)
- {
- *more = KAL_FALSE;
- return KAL_TRUE;
- }
- }
- timestamp = mmi_frm_sms_get_timestamp(sms_msg_box_type, msg_list_index);
- if (timestamp[1] == 0)
- {
- list_info[i].timestamp = 0;
- }
- else
- {
- datetime.nYear = timestamp[0] + 2000;
- if (datetime.nYear > 2090)
- {
- datetime.nYear = datetime.nYear - 100;
- }
- datetime.nMonth = timestamp[1];
- datetime.nDay = timestamp[2];
- datetime.nHour = timestamp[3];
- datetime.nMin = timestamp[4];
- datetime.nSec = timestamp[5];
- #ifdef MMI_ON_HARDWARE_P
- list_info[i].timestamp = mmi_dt_mytime_2_utc_sec((MYTIME*) & datetime, MMI_TRUE);
- #endif
- }
- list_info[i].msg_index = msg_list_index;
- (*msg_number)++;
- msg_list_index++;
- }
- /* For inbox and sent */
- if (msg_list_index < sms_msg_box_size)
- {
- *more = KAL_TRUE;
- }
- else
- {
- *more = KAL_FALSE;
- }
- return KAL_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_msg_info
- * DESCRIPTION
- * get sms msg info
- * PARAMETERS
- * msg_box_type [IN]
- * start_entry [IN]
- * req_msg_number [IN]
- * rsp_msg_number [?]
- * msg_info [?]
- * RETURNS
- * void
- *****************************************************************************/
- kal_bool mmi_msg_get_msg_info(
- UmMsgBoxType msg_box_type,
- kal_uint16 start_entry,
- kal_uint16 req_msg_number,
- kal_uint16 *rsp_msg_number,
- mmi_um_msg_info_struct *msg_info)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- kal_uint16 msg_list_index = start_entry;
- kal_uint16 i = 0;
- U8 *timestamp = NULL;
- U8 sms_msg_box_type = 0;
- kal_uint16 sms_msg_box_size = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *rsp_msg_number = 0;
- switch (msg_box_type)
- {
- case UM_MSG_BOX_TYPE_INBOX:
- {
- sms_msg_box_type = MMI_FRM_SMS_INBOX;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_INBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_UNSENT:
- {
- sms_msg_box_type = MMI_FRM_SMS_UNSENT;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_UNSENT);
- break;
- }
- case UM_MSG_BOX_TYPE_SENT:
- {
- sms_msg_box_type = MMI_FRM_SMS_OUTBOX;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_OUTBOX);
- break;
- }
- case UM_MSG_BOX_TYPE_DRAFT:
- {
- sms_msg_box_type = MMI_FRM_SMS_DRAFTS;
- sms_msg_box_size = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_DRAFTS);
- break;
- }
- default:
- {
- MMI_ASSERT(0);
- break;
- }
- }
- for (; (i < req_msg_number); i++)
- {
- UI_time datetime;
- U8 sms_status;
- if (msg_box_type == UM_MSG_BOX_TYPE_UNSENT)
- {
- if (!mmi_frm_sms_get_next_unsent_msg(&msg_list_index))
- {
- return KAL_TRUE;
- }
- }
- else if (msg_box_type == UM_MSG_BOX_TYPE_DRAFT)
- {
- if (!mmi_frm_sms_get_next_draft_msg(&msg_list_index))
- {
- return KAL_TRUE;
- }
- }
- else
- {
- if (msg_list_index >= sms_msg_box_size)
- {
- break;
- }
- }
- timestamp = mmi_frm_sms_get_timestamp(sms_msg_box_type, msg_list_index);
- if (timestamp[1] == 0)
- {
- msg_info[i].timestamp = 0;
- }
- else
- {
- datetime.nYear = timestamp[0] + 2000;
- if (datetime.nYear > 2090)
- {
- datetime.nYear = datetime.nYear - 100;
- }
- datetime.nMonth = timestamp[1];
- datetime.nDay = timestamp[2];
- datetime.nHour = timestamp[3];
- datetime.nMin = timestamp[4];
- datetime.nSec = timestamp[5];
- #ifdef MMI_ON_HARDWARE_P
- msg_info[i].timestamp = mmi_dt_mytime_2_utc_sec((MYTIME*) & datetime, MMI_TRUE);
- #endif
- }
- msg_info[i].msg_index = msg_list_index;
- msg_info[i].address_type = UM_ADDR_TYPE_PHONE_NUMBER;
- mmi_msg_get_address(sms_msg_box_type, msg_list_index, msg_info[i].address, MMI_UM_MAX_ADDR_LEN);
- msg_info[i].address_length = pfnUnicodeStrlen((S8*) msg_info[i].address);
- sms_status = mmi_frm_sms_get_sms_status(sms_msg_box_type, msg_list_index);
- if (!mmi_frm_sms_check_complete(sms_msg_box_type, msg_list_index))
- {
- pfnUnicodeStrncpy(
- (S8*) msg_info[i].subject,
- (S8*) GetString(STR_UM_INCOMPLETE_ID),
- MMI_UM_MAX_SUBJECT_LEN);
- msg_info[i].subject_length = pfnUnicodeStrlen((S8*) GetString(STR_UM_INCOMPLETE_ID));
- }
- else if ((sms_status >> 4) == SMSAL_MTI_STATUS_REPORT)
- {
- pfnUnicodeStrncpy(
- (S8*) msg_info[i].subject,
- (S8*) GetString(STR_DELIVERY_REPORT_MENUENTRY),
- MMI_UM_MAX_SUBJECT_LEN);
- msg_info[i].subject_length = pfnUnicodeStrlen((S8*) GetString(STR_DELIVERY_REPORT_MENUENTRY));
- }
- else if ((sms_status >> 4) == SMSAL_MTI_UNSPECIFIED)
- {
- pfnUnicodeStrncpy(
- (S8*) msg_info[i].subject,
- (S8*) GetString(STR_UM_NOT_SUPPORT_ID),
- MMI_UM_MAX_SUBJECT_LEN);
- msg_info[i].subject_length = pfnUnicodeStrlen((S8*) GetString(STR_UM_NOT_SUPPORT_ID));
- }
- else
- {
- mmi_frm_sms_get_content(
- sms_msg_box_type,
- msg_list_index,
- msg_info[i].subject,
- (kal_uint8) mmi_msg_get_max_content_size());
- msg_info[i].subject_length = pfnUnicodeStrlen((S8*) msg_info[i].subject);
- #ifdef __MMI_MESSAGES_CHAT__
- if (CheckForInvitationMsg((U8*) msg_info[i].subject, msg_info[i].subject_length * 2, FALSE))
- {
- S8 *chat_invitation_pattern = mmi_msg_chat_get_invitation_pattern();
- U8 len = pfnUnicodeStrlen(chat_invitation_pattern);
- memcpy(
- (S8*) msg_info[i].subject,
- (S8*) (msg_info[i].subject + len),
- (msg_info[i].subject_length - len) * ENCODING_LENGTH);
- memset(
- (S8*) (msg_info[i].subject + (msg_info[i].subject_length - len) * ENCODING_LENGTH),
- 0,
- len * ENCODING_LENGTH);
- msg_info[i].subject_length -= len;
- }
- #endif /* __MMI_MESSAGES_CHAT__ */
- }
- msg_info[i].icon_id = mmi_msg_get_icon(sms_msg_box_type, msg_list_index);
- (*rsp_msg_number)++;
- msg_list_index++;
- }
- return KAL_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_address
- * DESCRIPTION
- * get sms address
- * PARAMETERS
- * msg_type [IN]
- * msg_index [IN]
- * address [?]
- * max_address_len [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_get_address(kal_uint8 msg_type, kal_uint16 msg_index, kal_wchar *address, kal_uint8 max_address_len)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 temp[(MAX_DIGITS_SMS + 1) * ENCODING_LENGTH];
- S8 *name;
- U8 type = msg_type;
- kal_uint16 index = msg_index;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (((mmi_frm_sms_get_status(type, index) & 0xf0) >> 4) == SMSAL_MTI_STATUS_REPORT)
- {
- pfnUnicodeStrncpy((S8*) address, (S8*) GetString(STR_INBOX_REPORT_ID), max_address_len);
- }
- else
- {
- memset(temp, 0, (MAX_DIGITS_SMS + 1) * ENCODING_LENGTH);
- AnsiiToUnicodeString(temp, (S8*) mmi_frm_sms_get_address(type, index));
- if (pfnUnicodeStrlen(temp) == 0)
- {
- pfnUnicodeStrcpy((S8*) address, (S8*) GetString(STR_OUTBOX_LIST_MESSAGE));
- }
- else
- {
- name = lookUpNumber(temp);
- if (pfnUnicodeStrlen(name))
- {
- pfnUnicodeStrcpy((S8*) address, name);
- }
- else
- {
- pfnUnicodeStrcpy((S8*) address, temp);
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_get_icon
- * DESCRIPTION
- * get sms icon id
- * PARAMETERS
- * msg_type [IN]
- * msg_index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- kal_uint16 mmi_msg_get_icon(kal_uint8 msg_type, kal_uint16 msg_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- kal_uint16 icon_id = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (msg_type == MMI_FRM_SMS_INBOX)
- {
- if ((mmi_frm_sms_get_status(msg_type, (U16) msg_index) & 0x0f) == MMI_FRM_SMS_APP_UNREAD)
- {
- icon_id = IMG_MESSAGE_UNREAD;
- }
- else
- {
- if (mmi_frm_sms_check_complete(msg_type, (U16) msg_index) == TRUE)
- {
- icon_id = IMG_MESSAGE_READ;
- }
- else
- {
- icon_id = IMG_MESSAGE_SS_NCOMP;
- }
- }
- }
- else
- {
- if (mmi_frm_sms_check_complete(msg_type, (U16) msg_index) == FALSE)
- {
- icon_id = IMG_MESSAGE_SS_NCOMP;
- }
- else
- {
- if (msg_type == MMI_FRM_SMS_OUTBOX)
- {
- icon_id = IMG_MESSAGE_SENT;
- }
- else
- {
- icon_id = IMG_MESSAGE_UNSENT;
- }
- }
- }
- return icon_id;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_handle_delete_folder_by_um
- * DESCRIPTION
- * delete sms msg box
- * PARAMETERS
- * msg_box_type [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_handle_delete_folder_by_um(UmMsgBoxType msg_box_type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_frm_sms_msgbox_enum sms_msg_box_type = 0;
- U16 index = MMI_FRM_SMS_INVALID_INDEX;
- U8 *bitmap = OslMalloc(sizeof(U8) * 480);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset((S8*) bitmap, 0, sizeof(U8) * 480);
- if ((msg_box_type & UM_MSG_BOX_TYPE_INBOX))
- {
- sms_msg_box_type = MMI_FRM_SMS_INBOX;
- mmi_frm_sms_get_sms_bitmap((U8) sms_msg_box_type, index, bitmap);
- }
- if ((msg_box_type & UM_MSG_BOX_TYPE_SENT))
- {
- sms_msg_box_type = MMI_FRM_SMS_OUTBOX;
- mmi_frm_sms_get_sms_bitmap((U8) sms_msg_box_type, index, bitmap);
- }
- if ((msg_box_type & UM_MSG_BOX_TYPE_UNSENT))
- {
- U16 msg_list_index = 0;
- sms_msg_box_type = MMI_FRM_SMS_UNSENT;
- while (mmi_frm_sms_get_next_unsent_msg(&msg_list_index))
- {
- mmi_frm_sms_get_sms_bitmap((U8) sms_msg_box_type, msg_list_index, bitmap);
- msg_list_index++;
- }
- }
- if ((msg_box_type & UM_MSG_BOX_TYPE_DRAFT))
- {
- U16 msg_list_index = 0;
- sms_msg_box_type = MMI_FRM_SMS_DRAFTS;
- while (mmi_frm_sms_get_next_draft_msg(&msg_list_index))
- {
- mmi_frm_sms_get_sms_bitmap((U8) sms_msg_box_type, msg_list_index, bitmap);
- msg_list_index++;
- }
- }
- mmi_frm_sms_delete_sms_by_bitmap(mmi_msg_delete_folder_by_um_callback, MOD_MMI, bitmap);
- OslMfree(bitmap);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_msg_delete_folder_by_um_callback
- * DESCRIPTION
- * delete sms msg box
- * PARAMETERS
- * dummy [?]
- * mod [IN]
- * result [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_msg_delete_folder_by_um_callback(void *dummy, module_type mod, U16 result)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_um_delete_folder_rsp_struct *msg =
- (mmi_um_delete_folder_rsp_struct*) OslConstructDataPtr(sizeof(mmi_um_delete_folder_rsp_struct));
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (result == MMI_FRM_SMS_OK)
- {
- msg->result = KAL_TRUE;
- }
- else
- {
- msg->result = KAL_FALSE;
- }
- if (mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_APP_INBOX) == 0)
- {
- mmi_msg_set_msg_icon(FALSE, FALSE);
- }
- msg->msg_type = UM_MSG_TYPE_SMS;
- mmi_msg_send_message(MOD_MMI, MOD_MMI, 0, PRT_MSG_ID_MMI_UM_DELETE_FOLDER_RSP, (oslParaType*) msg, NULL);
- }
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- #if(!UI_DISABLE_EMS_CATEGORY_SCREENS)
- #if(!EMS_USE_GSM_EXTENDED)
- /* Call after EMSUnpack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAscii
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAscii(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if ((c & 0xff00) != 0)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else if (c == EMS_ESCAPE_CHARACTER)
- {
- c = EMS_SPACE_CHARACTER;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- if (c == EMS_CR_CHARACTER)
- {
- ForwardCurrentPosition(data, 1);
- CancelCurrentPosition(data, 1);
- BackwardCurrentPosition(data, 1);
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- }
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call before EMSPack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertAsciiEncodingToGSM7BitDefault
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertAsciiEncodingToGSM7BitDefault(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if ((c & 0xff00) == 0)
- {
- c = AsciiToDefaultArray[c];
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- ResetCurrentPosition(data);
- }
- #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
- /* Start : JP */
- /* Call after EMSUnpack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- EMSObject *object;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- if (gui_EMS_input_box_get_next_object(data, &data->CurrentPosition, &c, &object) != 1)
- {
- continue;
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if (c == EMS_ESCAPE_CHARACTER)
- {
- U16 next_char = 0;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- CancelCurrentPosition(data, 1);
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- c = DefaultToExtendedAsciiArray[c];
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- //textBuffer[OffsetToText]=(U8)(c&0xff);
- //textBuffer[OffsetToText+1]=(U8)(c>>8);
- next_char =
- (U16) (textBuffer[data->CurrentPosition.OffsetToText] |
- (textBuffer[data->CurrentPosition.OffsetToText + 1] << 8));
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += ENCODING_LENGTH; /* JP 20050701 */
- CancelCurrentPosition(data, 1);
- textBufferLength -= ENCODING_LENGTH; /* JP */
- /* OffsetToText=data->CurrentPosition.OffsetToText; */
- /* c=(U16)(textBuffer[OffsetToText]|(textBuffer[OffsetToText+1]<<8)); */
- c = next_char;
- c = DefaultToExtendedAsciiArray[c];
- if (c == 0x00)
- {
- textBuffer[OffsetToText] = (U8) (next_char & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (next_char >> 8);
- data->CurrentPosition.OffsetToText -= 2;
- }
- else
- {
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- }
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER_UCS2) c=EMS_EURO_CHARACTER; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call before EMSPack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- EMSObject *object;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- U8 ESC_string[] = {0x00, 0x1B};
- #else
- U8 ESC_string[] = {0x1B, 0x00};
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- if (gui_EMS_input_box_get_next_object(data, &data->CurrentPosition, &c, &object) != 1)
- {
- continue;
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if (UI_TEST_GSM_EXTENDED(c))
- {
- data->CurrentPosition.OffsetToText -= ENCODING_LENGTH; /* JP 20050701 */
- AddString(data, ESC_string, 1, NULL);
- OffsetToText = data->CurrentPosition.OffsetToText;
- /* MTK Elvis 20031126 */
- textBufferLength += ENCODING_LENGTH;
- /* MTK end */
- c = ExtendedAsciiToDefaultArray[c];
- data->CurrentPosition.OffsetToText += ENCODING_LENGTH; /* JP 20050701 */
- }
- else
- {
- c = AsciiToDefaultArray[c];
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- // if(ForwardCurrentPosition(data,1)!=1) break; /* JP */
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER) c=EMS_EURO_CHARACTER_UCS2; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- #else /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */
- /* Call after EMSUnpack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if ((c & 0xff00) != 0)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else if (c == EMS_ESCAPE_CHARACTER)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- if ((OffsetToText = data->CurrentPosition.OffsetToText) >= textBufferLength)
- {
- break;
- }
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- c = DefaultToExtendedAsciiArray[c];
- if (c == 0x00)
- {
- CancelCurrentPosition(data, 1);
- data->CurrentPosition.OffsetToText -= 2;
- }
- else
- {
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- }
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- c = DefaultToExtendedAsciiArray[c];
- if (c == 0x00)
- {
- CancelCurrentPosition(data, 1);
- data->CurrentPosition.OffsetToText -= 2;
- }
- else
- {
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- }
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER_UCS2) c=EMS_EURO_CHARACTER; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call before EMSPack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if ((c & 0xff00) == 0)
- {
- if (c == EMS_ESCAPE_CHARACTER)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- if ((OffsetToText = data->CurrentPosition.OffsetToText) >= textBufferLength)
- {
- break;
- }
- OffsetToText = data->CurrentPosition.OffsetToText;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- c = ExtendedAsciiToDefaultArray[c];
- }
- else
- {
- c = AsciiToDefaultArray[c];
- }
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER) c=EMS_EURO_CHARACTER_UCS2; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- /* if(ForwardCurrentPosition(data,1)!=1) break; */
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- ResetCurrentPosition(data);
- }
- #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */
- /* End : JP */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAsciiWithoutEMSlib
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAsciiWithoutEMSlib(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- data->CurrentPosition.OffsetToText = 0;
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if ((c & 0xff00) != 0)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else if (c == EMS_ESCAPE_CHARACTER)
- {
- U16 tempOffsetToText = data->CurrentPosition.OffsetToText;
- while ((tempOffsetToText + 2) < textBufferLength)
- {
- textBuffer[tempOffsetToText] = textBuffer[tempOffsetToText + 2];
- textBuffer[tempOffsetToText + 1] = textBuffer[tempOffsetToText + 3];
- tempOffsetToText = tempOffsetToText + 2;
- }
- textBuffer[tempOffsetToText] = 0;
- textBuffer[tempOffsetToText + 1] = 0;
- textBufferLength = textBufferLength - 2;
- data->textLength = data->textLength - 2;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- //textBuffer[OffsetToText+1]=(U8)(c&0xff);
- //textBuffer[OffsetToText+0]=(U8)(c>>8);
- if ((data->CurrentPosition.OffsetToText + 2) > textBufferLength)
- {
- break;
- }
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- c = DefaultToExtendedAsciiArray[c];
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- //textBuffer[OffsetToText]=(U8)(c&0xff);
- //textBuffer[OffsetToText+1]=(U8)(c>>8);
- if ((data->CurrentPosition.OffsetToText + 2) > textBufferLength)
- {
- break;
- }
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- c = DefaultToExtendedAsciiArray[c];
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER_UCS2) c=EMS_EURO_CHARACTER; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- data->CurrentPosition.OffsetToText += 2;
- }
- }
- data->CurrentPosition.OffsetToText = 0;
- }
- #else /* (!EMS_USE_GSM_EXTENDED) */
- /* Call after EMSUnpack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAscii
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAscii(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if (c == EMS_ESCAPE_CHARACTER)
- {
- c = EMS_SPACE_CHARACTER;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER_UCS2) c=EMS_EURO_CHARACTER; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call before EMSPack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertAsciiEncodingToGSM7BitDefault
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertAsciiEncodingToGSM7BitDefault(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- c = AsciiToDefaultArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER) c=EMS_EURO_CHARACTER_UCS2; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call after EMSUnpack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertGSM7BitDefaultEncodingToAsciiWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- EMSObject *object;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- if (gui_EMS_input_box_get_next_object(data, &data->CurrentPosition, &c, &object) != 1)
- {
- continue;
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if (c == EMS_ESCAPE_CHARACTER)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- CancelCurrentPosition(data, 1);
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- c = DefaultToExtendedAsciiArray[c];
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- CancelCurrentPosition(data, 1);
- OffsetToText = data->CurrentPosition.OffsetToText;
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- c = DefaultToExtendedAsciiArray[c];
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- else
- {
- c = DefaultToAsciiArray[c];
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- }
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER_UCS2) c=EMS_EURO_CHARACTER; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- /* Call before EMSPack */
- /*****************************************************************************
- * FUNCTION
- * EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended
- * DESCRIPTION
- *
- * PARAMETERS
- * data [?]
- * RETURNS
- * void
- *****************************************************************************/
- void EMS_ConvertAsciiEncodingToGSM7BitDefaultWithExtended(EMSData *data)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 c, OffsetToText;
- U8 *textBuffer = data->textBuffer;
- U16 textBufferLength = data->textLength;
- EMSObject *object;
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- U8 ESC_string[] = {0x00, 0x1B};
- #else
- U8 ESC_string[] = {0x1B, 0x00};
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (textBuffer == NULL)
- {
- return;
- }
- ResetCurrentPosition(data);
- if (data->dcs == SMSAL_DEFAULT_DCS)
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- if (gui_EMS_input_box_get_next_object(data, &data->CurrentPosition, &c, &object) != 1)
- {
- continue;
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- if (UI_TEST_GSM_EXTENDED(c))
- {
- AddString(data, ESC_string, 1, NULL);
- OffsetToText = data->CurrentPosition.OffsetToText;
- /* MTK Elvis 20031126 */
- textBufferLength += ENCODING_LENGTH;
- /* MTK end */
- c = ExtendedAsciiToDefaultArray[c];
- }
- else
- {
- c = AsciiToDefaultArray[c];
- }
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- else
- {
- while ((OffsetToText = data->CurrentPosition.OffsetToText) < textBufferLength)
- {
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- c = (U16) (textBuffer[OffsetToText + 1] | (textBuffer[OffsetToText] << 8));
- #else
- c = (U16) (textBuffer[OffsetToText] | (textBuffer[OffsetToText + 1] << 8));
- #endif
- /* if(c==EMS_EURO_CHARACTER) c=EMS_EURO_CHARACTER_UCS2; */
- #if(EMS_BYTE_ORDER_BIG_ENDIAN)
- textBuffer[OffsetToText + 1] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 0] = (U8) (c >> 8);
- #else /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- textBuffer[OffsetToText] = (U8) (c & 0xff);
- textBuffer[OffsetToText + 1] = (U8) (c >> 8);
- #endif /* (EMS_BYTE_ORDER_BIG_ENDIAN) */
- if (ForwardCurrentPosition(data, 1) != 1)
- {
- break;
- }
- }
- }
- ResetCurrentPosition(data);
- }
- #endif /* (!EMS_USE_GSM_EXTENDED) */
- #endif /* (!UI_DISABLE_EMS_CATEGORY_SCREENS) */
- #endif /* __MOD_SMSAL__ */