SettingScreenProf.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:477k
源码类别:
MTK
开发平台:
C/C++
- SetLightStatus(lightstaus);
- break;
- case 4:
- lightstaus = COLOR_PATTERN4;
- SetLightStatus(lightstaus);
- break;
- case 5:
- lightstaus = COLOR_PATTERN5;
- SetLightStatus(lightstaus);
- break;
- case 6:
- lightstaus = COLOR_PATTERN6;
- SetLightStatus(lightstaus);
- break;
- }
- DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, SUCCESS_TONE);
- DeleteScreenIfPresent(SCR_PROFILES_STATUS);
- }
- #endif /* __MMI_STATUS_LED__ */
- //KP Jerry add on 2007-03-31 start
- #ifdef __MMI_PROFILE_POWER_SAVING__
- S32 TempLCDBKLevel, TempLCDBKTime;
- MMI_BOOL GetCurrentActivatedProfileKeyBKStatus(void)
- {
- return gcurrentprofile.keybacklight;
- }
- U32 GetCurrentProfileLCDBKLevel(void)
- {
- return gprofiles[gprofileId].lcdbacklight.lcdBacklightlevel;
- }
- U32 GetCurrentActivatedProfileLCDBKLevel(void)
- {
- return gcurrentprofile.lcdbacklight.lcdBacklightlevel;
- }
- U32 GetCurrentActivatedProfileLCDBKTime(void)
- {
- return gcurrentprofile.lcdbacklight.lcdBacklighttime;
- }
- void ProfilesSetLCDBackLiteLSKHdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 error = 0;
- U16 j = 1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gprofiles[gprofileId].lcdbacklight.lcdBacklightlevel = TempLCDBKLevel;
- gprofiles[gprofileId].lcdbacklight.lcdBacklighttime = TempLCDBKTime;
- if (WriteRecord(
- NVRAM_EF_PROFILES_LID,
- j,
- &gprofiles[0],
- NVRAM_PROFILES_RECORD_SIZE,
- &error) < NVRAM_PROFILES_RECORD_SIZE)
- {
- PRINT_INFORMATION(("## ERROR: SetRingTypeEnum: WriteRecord " "to NVRAM failed (ecode%d)n", (int)error));
- }
- if (gactivatedprofile == gprofileId)
- {
- memcpy(&gcurrentprofile, &gprofiles[gprofileId], sizeof(PROFILE));
- }
- g_phnset_gpio_cntx_p->bl_setting_level = gcurrentprofile.lcdbacklight.lcdBacklightlevel;
- SetGPIOLevelReq(GPIO_DEV_LED_MAINLCD, LED_LIGHT_LEVEL5);
- g_phnset_gpio_cntx_p->bl_setting_hftime = gcurrentprofile.lcdbacklight.lcdBacklighttime;
- DisplayPopup(
- (U8*) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- (U8) SUCCESS_TONE);
- DeleteScreenIfPresent(SCR_PROFILES_LCDBL);
- }
- void ProfilesSetLCDBackLiteEndHdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_gpio_cntx_p->bl_setting_level = gcurrentprofile.lcdbacklight.lcdBacklightlevel;
- SetGPIOLevelReq(GPIO_DEV_LED_MAINLCD, LED_LIGHT_LEVEL5);
- g_phnset_gpio_cntx_p->bl_setting_hftime = gcurrentprofile.lcdbacklight.lcdBacklighttime;
- DisplayIdleScreen();
- }
- void ProfilesSetLCDBackLiteRSKHdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_phnset_gpio_cntx_p->bl_setting_level = gcurrentprofile.lcdbacklight.lcdBacklightlevel;
- SetGPIOLevelReq(GPIO_DEV_LED_MAINLCD, LED_LIGHT_LEVEL5);
- g_phnset_gpio_cntx_p->bl_setting_hftime = gcurrentprofile.lcdbacklight.lcdBacklighttime;
- GoBackHistory();
- }
- void EntryProfilesSetLCDBackLite(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer, *BLHFTime = NULL, *BLLevel = NULL;
- #ifndef __MMI_GPIO_SUPPORT_BL_LEVEL__ //Old:#ifdef __MMI_GPIO_SUPPORT_BL_LEVEL__ //KP Jerry modify on 2007-3-6
- S32 lower_limit[1];
- S32 upper_limit[1];
- S32 *current_value[1];
- void (*cb_func[1]) (S32 value);
- #else /* __MMI_GPIO_SUPPORT_BL_LEVEL__ */
- S32 lower_limit[2];
- S32 upper_limit[2];
- S32 *current_value[2];
- void (*cb_func[2]) (S32 value);
- U8 *str_list[2];
- #endif /* __MMI_GPIO_SUPPORT_BL_LEVEL__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Call Exit Handler */
- EntryNewScreen(SCR_PROFILES_LCDBL, NULL, EntryProfilesSetLCDBackLite, NULL);
- /* Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_PROFILES_LCDBL);
- BLLevel = (U8*) GetString(STR_ID_PHNSET_GPIO_BACKLITE_LEVEL);
- BLHFTime = (U8*) GetString(STR_ID_PHNSET_GPIO_BACKLITE_HF_TIME);
- /* Set current parent id */
- SetParentHandler(MENU_LCDBL);
- #ifndef __MMI_GPIO_SUPPORT_BL_LEVEL__ //Old:#ifdef __MMI_GPIO_SUPPORT_BL_LEVEL__ //KP Jerry modify on 2007-3-6
- lower_limit[0] = 5;
- upper_limit[0] = 60;
- TempLCDBKTime = gprofiles[gprofileId].lcdbacklight.lcdBacklighttime;
- current_value[0] = &(TempLCDBKTime);
- cb_func[0] = HighlightProfilesSetBackLiteHFTime;
- ShowCategory88Screen(
- STR_PROFILES_LCDBL,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- 0,
- 1,
- NULL,
- lower_limit,
- upper_limit,
- current_value,
- cb_func,
- guiBuffer);
- #else /* __MMI_GPIO_SUPPORT_BL_LEVEL__ */
- lower_limit[0] = 1;
- upper_limit[0] = 5;
- TempLCDBKLevel = gprofiles[gprofileId].lcdbacklight.lcdBacklightlevel;
- current_value[0] = &(TempLCDBKLevel);
- cb_func[0] = HighlightProfilesSetBackLiteLevel;
- str_list[0] = BLLevel;
- lower_limit[1] = 5;
- upper_limit[1] = 60;
- TempLCDBKTime = gprofiles[gprofileId].lcdbacklight.lcdBacklighttime;
- current_value[1] = &(TempLCDBKTime);
- cb_func[1] = HighlightProfilesSetBackLiteHFTime;
- str_list[1] = BLHFTime;
- ShowCategory88Screen(
- STR_ID_PHNSET_GPIO_BACKLITE,
- MAIN_MENU_TITLE_SETTINGS_ICON,
- STR_GLOBAL_OK,
- 0,
- STR_GLOBAL_BACK,
- 0,
- 0,
- 2,
- str_list,
- lower_limit,
- upper_limit,
- current_value,
- cb_func,
- guiBuffer);
- #endif /* __MMI_GPIO_SUPPORT_BL_LEVEL__ */
- /* Register function with right softkey */
- SetKeyHandler(ProfilesSetLCDBackLiteEndHdlr, KEY_END, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(ProfilesSetLCDBackLiteLSKHdlr, KEY_EVENT_UP);
- SetRightSoftkeyFunction(ProfilesSetLCDBackLiteRSKHdlr, KEY_EVENT_UP);
- }
- void ProfilesTurnOffKeyBacklight(void)
- {
- StopTimer(GPIO_KEYPAD_LIGHT_TIMER);
- KeyPadBackLightOff();
- }
- /*****************************************************************************
- * FUNCTION
- * ProfilesTurnOffKeyBacklight
- * DESCRIPTION
- * ...
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- extern idle_keylock_struct g_keylock_context;
- extern void SetkeypadBacklightStuatus(U8 value);
- void ProfilesResetKeyBacklight(void)
- {
- if(gcurrentprofile.keybacklight && gMMIClamState == 1 && g_keylock_context.gKeyPadLockFlag == 0)
- {
- KeyPadBackLightOn();
- SetkeypadBacklightStuatus(1);
- StartTimer(GPIO_KEYPAD_LIGHT_TIMER, gcurrentprofile.lcdbacklight.lcdBacklighttime*1000, ProfilesTurnOffKeyBacklight);
- }
- else
- {
- StopTimer(GPIO_KEYPAD_LIGHT_TIMER);
- KeyPadBackLightOff();
- }
- }
- void EntryProfilesSetKeyBacklight(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 index;
- S16 error = 0;
- U16 j = 1;
- index = GetCurrHiliteID();
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetExitScrnID() != POPUP_SCREENID)
- {
- if (gprofiles[gprofileId].keybacklight)
- {
- gprofiles[gprofileId].keybacklight = 0;
- DisplayPopup(
- (U8*) GetString(STR_GLOBAL_OFF),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- (U8) SUCCESS_TONE);
- pfnUnicodeStrcpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
- Category52ChangeItemDescription(index, hintData[index]);
- }
- else
- {
- gprofiles[gprofileId].keybacklight = 1;
- DisplayPopup(
- (U8*) GetString(STR_GLOBAL_ON),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- (U8) SUCCESS_TONE);
- pfnUnicodeStrcpy((PS8) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
- Category52ChangeItemDescription(index, hintData[index]);
- }
- if (WriteRecord(
- NVRAM_EF_PROFILES_LID,
- j,
- &gprofiles[0],
- NVRAM_PROFILES_RECORD_SIZE,
- &error) < NVRAM_PROFILES_RECORD_SIZE)
- {
- PRINT_INFORMATION(("## ERROR: SetRingTypeEnum: WriteRecord " "to NVRAM failed (ecode%d)n", (int)error));
- //return error;
- }
- if (gactivatedprofile == gprofileId)
- {
- memcpy(&gcurrentprofile, &gprofiles[gprofileId], sizeof(PROFILE));
- ProfilesResetKeyBacklight();
- }
- }
- }
- #endif
- //KP Jerry add on 2007-03-31 end
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesToneSetup
- * DESCRIPTION
- * Showing profile Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nStrItemList[MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribue */
- U8 *guiBuffer; /* Buffer holding history data */
- U8 *PopUpList[MAX_SUB_MENUS];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_PROFILES_TONE_SETUP, NULL, EntryScrProfilesToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_PROFILES_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- nNumofItem = GetNumOfChild(MENU_TONE_SETUP);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP);
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- GetSequenceStringIds(MENU_TONE_SETUP, nStrItemList);
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- /* 8 Display Category Screen */
- ConstructHintsList(MENU_TONE_SETUP, PopUpList);
- ShowCategory52Screen(
- STR_PROFILES_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- nStrItemList,
- (PU16) gIndexIconsImageList,
- PopUpList,
- 0,
- 0,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* 10. Register Exit handler */
- /* SetExitHandler(SCR_PROFILES_TONE_SETUP,ExitScrProfilesToneSetup); */
- }
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- /*****************************************************************************
- * FUNCTION
- * AudioFileDeletedFromFmgr
- * DESCRIPTION
- * IF audio folder get deleted or fomatted
- * from File manager activate default audio as incoming tone
- * PARAMETERS
- * tone_id [IN]
- * Audio(?) [IN] ID
- * RETURNS
- * BOOL
- *
- *****************************************************************************/
- pBOOL AudioFileDeletedFromFmgr(U16 tone_id)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 buf[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- FILE_HANDLE file;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GetAudioNameWithPathInFileSystem(tone_id, (PS8) buf);
- file = FS_Open((const WCHAR*)buf, FS_READ_ONLY);
- if (file < 0)
- {
- FS_Close(file);
- return TRUE;
- }
- else
- {
- FS_Close(file);
- return FALSE;
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- /*****************************************************************************
- * FUNCTION
- * mmi_profiles_get_melody_list
- * DESCRIPTION
- * Build melody list
- * PARAMETERS
- * CurMelodyID [IN]
- * selecteditem [IN]
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_profiles_get_melody_list(U16 CurMelodyID, U16 *selecteditem)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- DYNEXTMELODYINFO *ExtMelodyInfo;
- #endif
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- DYNAUDIOINFO *DownloadThemeTones;
- #endif
- int index, data;
- U16 nNumofItem = gtotalRingId + gtotalMidiId;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* init hint data */
- memset(hintData, 0, sizeof(hintData));
- for (data = 0; data < MAX_SUB_MENUS; data++)
- {
- hintDataPtrs[data] = hintData[data];
- }
- /* copy the names of fixed list (IMY) */
- for (index = 0; index < gtotalRingId; index++)
- {
- pfnUnicodeStrcpy((PS8) subMenuDataPtrs[index], GetString((U16) (STR_PROFILES_RING_1 + index)));
- }
- /* copy the names of fixed list (MIDI) */
- for (index = 0; index < gtotalMidiId; index++)
- {
- pfnUnicodeStrcpy((PS8) subMenuDataPtrs[index + gtotalRingId], GetString((U16) (STR_PROFILES_MIDI_1 + index)));
- }
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- PmgSetToneType( PRFSET_MELODY_TYPE_RING);
- #endif
- //KP Jerry add for changing the style of message tone list on 2007-4-10 end
- /* make a listing of ext melodies. */
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- PmgGetExtMelodyInfo(&ExtMelodyInfo);
- for (index = nNumofItem, data = 0; data < MAXIMUM_EXT_MELODY_NUM; index++, data++)
- {
- if (PmgIsEmptySlot((U8) data) == MMI_FALSE)
- {
- if (PmgQueryFileExistBySlot((U8) data) == MMI_FALSE)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_TONE_FILE_NOT_EXIST));
- }
- if (IS_EXTMELODY_SHORTNAME(ExtMelodyInfo->info[data].filepath))
- {
- mmi_chset_mixed_text_to_ucs2_str(
- subMenuDataPtrs[index],
- (FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH,
- (U8*) ExtMelodyInfo->info[data].filename,
- g_chset_text_encoding);
- }
- else
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index], (S8*) ((ExtMelodyInfo->info[data]).filename));
- }
- #if (!defined(__MMI_SHOW_FILE_EXT__))
- PmgRemoveFileExt((S8*) subMenuDataPtrs[index]);
- #elif (!defined(__MMI_SHOW_DAF_FILE_EXT__))
- PmgRemoveFileDAFExt((S8*) subMenuDataPtrs[index]);
- #endif
- }
- else
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index], (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- }
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- if (GetThemeV2TonesInfo(&DownloadThemeTones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index++], (S8*) GetString(STR_PROFILES_CURR_THEME));
- }
- #endif /* __MMI_DOWNLOADABLE_THEMES_SUPPORT__ */
- /* find highlight selection */
- if (CurMelodyID >= gstartRingId && CurMelodyID < gstartRingId + gtotalRingId)
- {
- *selecteditem = CurMelodyID - gstartRingId;
- }
- else if (CurMelodyID >= gstartMidiId && CurMelodyID < gstartMidiId + gtotalMidiId)
- {
- *selecteditem = CurMelodyID - gstartMidiId + gtotalRingId;
- }
- else
- {
- BOOL selected = FALSE;
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- for (data = 0; data < MAXIMUM_EXT_MELODY_NUM; data++)
- {
- if (PmgIsEmptySlot((U8) data) == MMI_FALSE && CurMelodyID == (ExtMelodyInfo->info[data]).id)
- {
- *selecteditem = nNumofItem + data;
- selected = TRUE;
- break;
- }
- }
- nNumofItem += MAXIMUM_EXT_MELODY_NUM;
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (!selected)
- {
- if (GetThemeV2TonesInfo(&DownloadThemeTones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- if ((U16)DownloadThemeTones[0].AudioId == CurMelodyID)
- {
- selected = TRUE;
- *selecteditem = nNumofItem;
- if (AudioFileDeletedFromFmgr(CurMelodyID))
- {
- pfnUnicodeStrcpy((S8*) hintData[nNumofItem], GetString(STR_TONE_FILE_NOT_EXIST));
- }
- }
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- ASSERT(selected);
- }
- return (U8) index;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_profiles_entry_ring_tone_list
- * DESCRIPTION
- * Showing profile Ring Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_profiles_entry_ring_tone_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer; /* Buffer holding history data */
- U16 nDispAttribute; /* Stores display attribue */
- U16 selecteditem = 0;
- U8 totalItems = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(
- SCR_PROFILES_RING_TONE_SETUP,
- mmi_profiles_exit_ring_tone_list,
- mmi_profiles_entry_ring_tone_list,
- NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_PROFILES_RING_TONE_SETUP);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_RING_TONE);
- /* 3. Retrieve no of child of menu item to be displayed */
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- totalItems = mmi_profiles_get_melody_list(gprofiles[gprofileId].toneSetup.ringTone, &selecteditem);
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_RING_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(mmi_profiles_melody_list_highlight_hdlr);
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_PROFILES_RING_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- totalItems,
- subMenuDataPtrs,
- hintDataPtrs,
- 0,
- selecteditem,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(StopRingToneBack, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetRingToneId, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_profiles_exit_ring_tone_list
- * DESCRIPTION
- * Exit profile Ring ToneSetup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_profiles_exit_ring_tone_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopToneAudio();
- }
- /*****************************************************************************
- * FUNCTION
- * StopRingToneBack
- * DESCRIPTION
- * StopRingToneBack
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void StopRingToneBack(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopToneAudio();
- GoBackHistory();
- }
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- /*****************************************************************************
- * FUNCTION
- * PrfCallBackExtMldReplace
- * DESCRIPTION
- *
- * PARAMETERS
- * path [?]
- * is_short [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void PrfCallBackExtMldReplace(void *path, int is_short)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 *filepath = (S8*) path;
- PMG_ADDFILE_ERRNO err = PMG_ADDFILE_ERR_UNKNOWN;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (filepath)
- {
- #if defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P)
- if (!mmi_profiles_check_DRM_content_forwardable((UI_string_type) filepath))
- {
- err = PMG_ADDFILE_ERR_DRM_PROHIBTED;
- }
- else
- #endif /* defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P) */
- if (PmgCheckImyMidFileSize(filepath) == PMG_ADDFILE_ERR_FILE_TOO_LARGE)
- {
- err = PMG_ADDFILE_ERR_FILE_TOO_LARGE;
- }
- else
- {
- PmgSetShortFileName((BOOL) is_short);
- if (PmgIsEmptySlot(g_ext_melody_idx) == MMI_FALSE)
- {
- err = PmgReplaceExtMelodyBySlotPathFileName(filepath, g_ext_melody_idx);
- }
- else
- {
- err = PmgAddExtMelodyBySlotPathFileName(filepath, g_ext_melody_idx);
- }
- }
- switch (err)
- {
- case PMG_ADDFILE_ERR_SUCCESS:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- break;
- case PMG_ADDFILE_ERR_STR_TOO_LONG:
- case PMG_ADDFILE_ERR_STRFILE_TOO_LONG:
- case PMG_ADDFILE_ERR_STRPATH_TOO_LONG:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_NAMETOOLONG),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_SLOT_FULL:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_LISTFULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_FILE_TOO_LARGE:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_FILETOOLARGE),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_DUPLICATED:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_DUPLICATED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- #if defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P)
- case PMG_ADDFILE_ERR_DRM_PROHIBTED:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DRM_PROHIBITED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- #endif /* defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P) */
- default:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- }
- DeleteUptoScrID(MENU_TONE_SETUP_RING_TONE_EXT_MELODY);
- DeleteScreenIfPresent(MENU_TONE_SETUP_RING_TONE_EXT_MELODY);
- }
- else
- {
- GoBackToHistory(MENU_TONE_SETUP_RING_TONE_EXT_MELODY);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetRingToneConvertEmptySlotMenuList
- * DESCRIPTION
- *
- * PARAMETERS
- * idx [IN]
- * RETURNS
- *
- *****************************************************************************/
- static U8 PrfSetRingToneConvertEmptySlotMenuList(U8 idx)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- PmgSetToneType( PRFSET_MELODY_TYPE_RING);
- #endif
- //KP Jerry add for changing the style of message tone list on 2007-4-10 end
- if (PmgIsEmptySlot(g_ext_melody_idx) == MMI_FALSE)
- { /* Not Empty slot */
- return idx;
- }
- else
- {
- if (idx == 0)
- {
- return PRF_MENU_EXTMLD_ADD; /* PRF_MENU_EXTMLD_DONE */
- }
- #if MMI_ON_HARDWARE_P
- else
- {
- MMI_ASSERT(MMI_FALSE);
- }
- #endif /* MMI_ON_HARDWARE_P */
- }
- return PRF_MENU_EXTMLD_MAX;
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetRingToneExtMelodyDrvSelect
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetRingToneExtMelodyDrvSelect(void)
- {
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 phoneDrvLetter, cardDrvLetter;
- S8 temp[3];
- UI_character_type dir_phone_root[4];
- UI_character_type dir_card_root[4];
- FMGR_FILTER filter;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- FMGR_FILTER_INIT(&filter);
- FMGR_FILTER_SET_AUDIO(&filter);
- FMGR_FILTER_SET(&filter, FMGR_TYPE_FOLDER);
- FMGR_FILTER_SET(&filter, FMGR_TYPE_FOLDER_DOT);
- //#define MMI_PUBLIC_DRV FS_GetDrive(FS_DRIVE_V_NORMAL, 2, FS_DRIVE_V_NORMAL | FS_DRIVE_I_SYSTEM)
- //#define MMI_CARD_DRV FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE)
- phoneDrvLetter = FS_GetDrive(FS_DRIVE_V_NORMAL, 2, FS_DRIVE_I_SYSTEM | FS_DRIVE_V_NORMAL);
- cardDrvLetter = FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE);
- sprintf(temp, "%c:\", (S8) phoneDrvLetter);
- AnsiiToUnicodeString((S8*) dir_phone_root, temp);
- sprintf(temp, "%c:\", (S8) cardDrvLetter);
- AnsiiToUnicodeString((S8*) dir_card_root, temp);
- if (extMldHlitItem == PRF_MENU_EXTMLD_DRV_CARD)
- {
- #if defined(__MMI_PHB_CALLER_RES_SETTING__) /* Forward res to phonebook */
- if (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- mmi_fmgr_select_path_and_enter(
- APP_PHONEBOOK,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_card_root,
- PrfCallBackExtMldReplace);
- }
- else
- #endif /* defined(__MMI_PHB_CALLER_RES_SETTING__) */
- mmi_fmgr_select_path_and_enter(
- APP_PROFILES,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_card_root,
- PrfCallBackExtMldReplace);
- }
- else /* if( extMldHlitItem == PRF_MENU_EXTMLD_DRV_PHONE) */
- {
- #if defined(__MMI_PHB_CALLER_RES_SETTING__) /* Forward res to phonebook */
- if (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- mmi_fmgr_select_path_and_enter(
- APP_PHONEBOOK,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_phone_root,
- PrfCallBackExtMldReplace);
- }
- else
- #endif /* defined(__MMI_PHB_CALLER_RES_SETTING__) */
- mmi_fmgr_select_path_and_enter(
- APP_PROFILES,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_phone_root,
- PrfCallBackExtMldReplace);
- }
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- }
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- /*****************************************************************************
- * FUNCTION
- * EntryPrfSetRingToneExtMelodyDrv
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryPrfSetRingToneExtMelodyDrv(void)
- {
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #else /* 0 */
- U8 *nStrItemList[PRF_MENU_EXTMLD_DRV_MAX];
- U8 nNumofItem = (U8) PRF_MENU_EXTMLD_DRV_MAX;
- U8 *guiBuffer;
- S16 CardDrv = -1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- // #define MMI_CARD_DRV FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE)
- CardDrv = FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE);
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- if (CardDrv > 0) /* Card Storage is present */
- {
- U16 StrIDTitle = 0;
- if (prfset_conf_type == PRFSET_MELODY_TYPE_RING)
- {
- StrIDTitle = STR_PROFILES_RING_TONE_SETUP_CAPTION;
- }
- #ifndef __MMI_ALM_CUSTOMIZE_TONE__
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_ALARM)
- {
- StrIDTitle = STR_ALARM_TONE_CAPTION;
- }
- #endif /* __MMI_ALM_CUSTOMIZE_TONE__ */
- #if defined(__MMI_PHB_CALLER_RES_SETTING__) /* Forward res to phonebook */
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- StrIDTitle = STR_ID_PHB_CALLER_RING;
- }
- #endif /* defined(__MMI_PHB_CALLER_RES_SETTING__) */
- else
- {
- ASSERT(0);
- }
- nStrItemList[PRF_MENU_EXTMLD_DRV_PHONE] = (U8*) GetString(STR_PROFILES_RING_TONE_SETUP_DRV_PHONE);
- nStrItemList[PRF_MENU_EXTMLD_DRV_CARD] = (U8*) GetString(STR_PROFILES_RING_TONE_SETUP_DRV_CARD);
- EntryNewScreen(MENU_TONE_SETUP_RING_TONE_EXT_MELODY_DRV, NULL, EntryPrfSetRingToneExtMelodyDrv, NULL);
- guiBuffer = GetCurrGuiBuffer(MENU_TONE_SETUP_RING_TONE_EXT_MELODY_DRV);
- RegisterHighlightHandler(HighlightPrfSetRingToneExtMelody);
- ShowCategory56Screen(
- StrIDTitle,
- (U16) (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING ? IMG_SCR_PBOOK_CAPTION : IMG_PROFILES_TITLEE),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (S32) nNumofItem,
- nStrItemList,
- NULL,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(PrfSetRingToneExtMelodyDrvSelect, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* SetExitHandler (MENU_TONE_SETUP_RING_TONE_EXT_MELODY_DRV, ExitPrfSetRingToneExtMelodyDrv); */
- }
- else /* Card Storage not present */
- {
- extMldHlitItem = PRF_MENU_EXTMLD_DRV_PHONE;
- PrfSetRingToneExtMelodyDrvSelect();
- }
- #endif /* 0 */
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetRingToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetRingToneExtMelody(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 idx = PrfSetRingToneConvertEmptySlotMenuList(extMldHlitItem);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- PmgSetToneType( PRFSET_MELODY_TYPE_RING);
- #endif
- //KP Jerry add for changing the style of message tone list on 2007-4-10 end
- if (idx == PRF_MENU_EXTMLD_DONE)
- {
- if (PmgIsEmptySlot(g_ext_melody_idx) == MMI_FALSE)
- {
- if (prfset_conf_type == PRFSET_MELODY_TYPE_RING)
- {
- SetRingToneID((U16) (PMG_EXT_MELODY_BEGIN + g_ext_melody_idx));
- }
- #ifndef __MMI_ALM_CUSTOMIZE_TONE__
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_ALARM)
- {
- SetAlarmToneID((U16) (PMG_EXT_MELODY_BEGIN + g_ext_melody_idx));
- }
- #endif /* __MMI_ALM_CUSTOMIZE_TONE__ */
- #if defined(__MMI_PHB_CALLER_RES_SETTING__) /* Forward res to phonebook */
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- mmi_phb_caller_ring_forward_to_entry((U16) (PMG_EXT_MELODY_BEGIN + g_ext_melody_idx));
- }
- #endif /* defined(__MMI_PHB_CALLER_RES_SETTING__) */
- else
- {
- MMI_ASSERT(0);
- }
- if (prfset_conf_type != PRFSET_MELODY_TYPE_PHB_RING)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- }
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- else if (idx == PRF_MENU_EXTMLD_DEL)
- {
- if (PmgDelExtMelodyById((U16) (PMG_EXT_MELODY_BEGIN + g_ext_melody_idx)) == MMI_TRUE)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- else if (idx == PRF_MENU_EXTMLD_ADD)
- {
- EntryPrfSetRingToneExtMelodyDrv();
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPrfSetRingToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPrfSetRingToneExtMelody(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- extMldHlitItem = (U8) index;
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPrfSetRingToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryPrfSetRingToneExtMelody(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *nStrItemList[PRF_MENU_EXTMLD_MAX];
- U8 nNumofItem = 0;
- U8 *guiBuffer;
- U16 StrIDToneSet = 0, StrIDToneDel = 0, StrIDToneAdd = 0, StrIDTitle = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (prfset_conf_type == PRFSET_MELODY_TYPE_RING || prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- if (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING)
- {
- StrIDToneSet = STR_TONE_SETUP_RING_TONE_PHB_EXT_SET;
- #if defined(__MMI_PHB_CALLER_RES_SETTING__) /* Forward res to phonebook */
- StrIDTitle = STR_ID_PHB_CALLER_RING;
- #endif
- }
- else
- {
- StrIDToneSet = STR_TONE_SETUP_RING_TONE_EXT_SET;
- StrIDTitle = STR_PROFILES_RING_TONE_SETUP_CAPTION;
- }
- StrIDToneDel = STR_TONE_SETUP_RING_TONE_EXT_DEL;
- StrIDToneAdd = STR_TONE_SETUP_RING_TONE_EXT_ADD;
- }
- #ifndef __MMI_ALM_CUSTOMIZE_TONE__
- else
- {
- StrIDToneSet = STR_TONE_SETUP_ALARM_TONE_EXT_SET;
- StrIDToneDel = STR_TONE_SETUP_ALARM_TONE_EXT_DEL;
- StrIDToneAdd = STR_TONE_SETUP_ALARM_TONE_EXT_ADD;
- StrIDTitle = STR_ALARM_TONE_CAPTION;
- }
- #endif /* __MMI_ALM_CUSTOMIZE_TONE__ */
- if (PmgIsEmptySlot(g_ext_melody_idx) == MMI_FALSE)
- {
- /* Not Empty Slot */
- nStrItemList[PRF_MENU_EXTMLD_DONE] = (U8*) GetString(StrIDToneSet);
- nStrItemList[PRF_MENU_EXTMLD_DEL] = (U8*) GetString(StrIDToneDel);
- nStrItemList[PRF_MENU_EXTMLD_ADD] = (U8*) GetString(StrIDToneAdd);
- nNumofItem = (U8) PRF_MENU_EXTMLD_MAX;
- }
- else /* Empty slot, show replace only */
- {
- nStrItemList[0] = (U8*) GetString(StrIDToneAdd);
- nNumofItem = 1;
- }
- EntryNewScreen(MENU_TONE_SETUP_RING_TONE_EXT_MELODY, NULL, EntryPrfSetRingToneExtMelody, NULL);
- guiBuffer = GetCurrGuiBuffer(MENU_TONE_SETUP_RING_TONE_EXT_MELODY);
- RegisterHighlightHandler(HighlightPrfSetRingToneExtMelody);
- ShowCategory56Screen(
- StrIDTitle,
- (U16) (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING ? IMG_SCR_PBOOK_CAPTION : IMG_PROFILES_TITLEE),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (S32) nNumofItem,
- nStrItemList,
- NULL,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(PrfSetRingToneExtMelody, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* SetExitHandler (MENU_TONE_SETUP_RING_TONE_EXT_MELODY, ExitPrfSetRingToneExtMelody); */
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetRingToneConfType
- * DESCRIPTION
- *
- * PARAMETERS
- * type [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetRingToneConfType(PRFSET_MELODY_CONF_TYPE type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- prfset_conf_type = type;
- }
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetRingToneId(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrSetRingToneIdCountId(EntryScrSetRingToneId_Ext);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneIdCountId
- * DESCRIPTION
- * Count Ringtone ID.
- * PARAMETERS
- * Func_Callback [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetRingToneIdCountId(void (*Func_Callback) (U8, U16))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 is_ext_melody = MMI_FALSE;
- U16 numOfItem = gtotalRingId + gtotalMidiId;
- U16 ring_id = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_profiles_melody_list_index < gtotalRingId)
- {
- ring_id = g_profiles_melody_list_index + gstartRingId;
- }
- else if (g_profiles_melody_list_index < numOfItem)
- {
- ring_id = g_profiles_melody_list_index + gstartMidiId - gtotalRingId;
- }
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- else if (g_profiles_melody_list_index < numOfItem + MAXIMUM_EXT_MELODY_NUM)
- {
- g_ext_melody_idx = (U8) (g_profiles_melody_list_index - numOfItem);
- ring_id = (U16) g_ext_melody_idx + PMG_EXT_MELODY_BEGIN;
- is_ext_melody = MMI_TRUE;
- }
- #endif /* defined(__MMI_PROFILE_EXTMELODY_SUPPORT__) */
- else
- {
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- numOfItem += MAXIMUM_EXT_MELODY_NUM;
- #endif
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (g_profiles_melody_list_index == numOfItem)
- {
- DYNAUDIOINFO *download_theme_tones;
- if (GetThemeV2TonesInfo(&download_theme_tones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- ring_id = (U16) download_theme_tones[0].AudioId;
- }
- else
- {
- ASSERT(0);
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- }
- Func_Callback(is_ext_melody, ring_id);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId_Ext
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * ExtMelodyFlag [IN]
- * ringTone [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetRingToneId_Ext(U8 ExtMelodyFlag, U16 ringTone)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- if (ExtMelodyFlag == MMI_TRUE)
- {
- prfset_conf_type = PRFSET_MELODY_TYPE_RING;
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- PmgSetToneType( PRFSET_MELODY_TYPE_RING);
- #endif
- //KP Jerry add for changing the style of message tone list on 2007-4-10 end
- EntryPrfSetRingToneExtMelody();
- }
- else
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- SetRingToneID(ringTone);
- DeleteScreenIfPresent(SCR_PROFILES_RING_TONE_SETUP);
- }
- }
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweronToneSetup
- * DESCRIPTION
- * Showing profile Poweron Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesPoweronToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nDispAttribute; /* Stores display attribue */
- U16 selecteditem = 0;
- U8 totalItems = 0;
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_POWERON_TONE_SETUP, ExitScrProfilesPoweronToneSetup, EntryScrProfilesPoweronToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_POWERON_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- /* nNumofItem = GetNumOfChild(MENU_TONE_SETUP_POWERON_TONE); */
- totalItems =mmi_profiles_get_POn_Off_tone_list((U16)gprofiles[gprofileId].toneSetup.powerOnTone, &selecteditem);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_POWERON_TONE);
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_POWERON_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(mmi_profiles_POn_Off_tone_list_highlight_hdlr);
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_POWERON_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- totalItems,
- subMenuDataPtrs,
- hintDataPtrs,
- 0,
- selecteditem,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetPowerOnToneId, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWERON_TONE_SETUP, ExitScrProfilesPoweronToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_profiles_get_POn_Off_tone_list
- * DESCRIPTION
- * Build melody list
- * PARAMETERS
- * CurMelodyID [IN]
- * selecteditem [IN]
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_profiles_get_POn_Off_tone_list(U16 CurMelodyID, U16 * selecteditem)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- U8 UnicodenStrItemList[10]; /* Stores the strings id of submenus returned */
- U8 AsciinStrItemList[4]; /* Stores the strings id of submenus returned */
- U8 i = 0;
- /*----------------------------------------------------------------*/
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- DYNEXTMELODYINFO *ExtMSMelodyInfo;
- #endif
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- DYNAUDIOINFO *DownloadThemeTones;
- #endif
- int index, data;
- U16 nNumofItem = gtotalGeneralToneId + 1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* init hint data */
- memset(hintData, 0, sizeof(hintData));
- for (data = 0; data < MAX_SUB_MENUS; data++)
- {
- hintDataPtrs[data] = hintData[data];
- }
- memset((S8*) subMenuDataPtrs[0], 0, MAX_SUB_MENU_SIZE);
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[0], (S8*) GetString(STR_PROFILES_SILENT), MAX_SUBMENU_CHARACTERS);
- for (i = 1; i <= gtotalGeneralToneId; i++)
- {
- S32 len = 0;
- memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
- sprintf((PS8) AsciinStrItemList, "%d", i);
- AnsiiToUnicodeString((PS8) UnicodenStrItemList, (PS8) AsciinStrItemList);
- len = pfnUnicodeStrlen((PS8) UnicodenStrItemList);
- len = MAX_SUBMENU_CHARACTERS - len;
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[i], (S8*) GetString(STR_PROFILES_TONE), MAX_SUBMENU_CHARACTERS);
- pfnUnicodeStrcat((PS8) subMenuDataPtrs[i], (PS8) UnicodenStrItemList);
- }
- /* make a listing of ext melodies. */
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- PmgSetToneType( PRFSET_MELODY_TYPE_POWERON); //Joey added for changing the MS tone style on 2007-4-05
- POnOffPmgGetExtMelodyInfo(&ExtMSMelodyInfo);
- for (index = nNumofItem, data = 0; data < MAXIMUM_EXT_MELODY_NUM; index++, data++)
- {
- if (POnOffPmgIsEmptySlot((U8) data) == MMI_FALSE)
- {
- if (POnOffPmgQueryFileExistBySlot((U8) data) == MMI_FALSE)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_TONE_FILE_NOT_EXIST));
- }
- if (IS_EXTMELODY_SHORTNAME(ExtMSMelodyInfo->info[data].filepath))
- {
- mmi_chset_mixed_text_to_ucs2_str(
- subMenuDataPtrs[index],
- (FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH,
- (U8*) ExtMSMelodyInfo->info[data].filename,
- g_chset_text_encoding);
- }
- else
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index], (S8*) ((ExtMSMelodyInfo->info[data]).filename));
- }
- #if (!defined(__MMI_SHOW_FILE_EXT__))
- PmgRemoveFileExt((S8*) subMenuDataPtrs[index]);
- #elif (!defined(__MMI_SHOW_DAF_FILE_EXT__))
- PmgRemoveFileDAFExt((S8*) subMenuDataPtrs[index]);
- #endif
- }
- else
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index], (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- }
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- #ifdef __MMI_DOWNLOADABLE_THEMES_SUPPORT__
- if (GetThemeV2TonesInfo(&DownloadThemeTones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- pfnUnicodeStrcpy((S8*) subMenuDataPtrs[index++], (S8*) GetString(STR_PROFILES_CURR_THEME));
- }
- #endif /* __MMI_DOWNLOADABLE_THEMES_SUPPORT__ */
- /* find highlight selection */
- if (CurMelodyID >= gstartGeneralToneId && CurMelodyID < gstartGeneralToneId + gtotalGeneralToneId)
- {
- *selecteditem = CurMelodyID - gstartGeneralToneId + 1;
- }
- else if (MESSAGE_SILENT==CurMelodyID)
- {
- *selecteditem = 0;
- }
- else
- {
- BOOL selected = FALSE;
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- for (data = 0; data < MAXIMUM_EXT_MELODY_NUM; data++)
- {
- if (POnOffPmgIsEmptySlot((U8) data) == MMI_FALSE && CurMelodyID == (ExtMSMelodyInfo->info[data]).id)
- {
- *selecteditem = nNumofItem + data;
- selected = TRUE;
- break;
- }
- }
- nNumofItem += MAXIMUM_EXT_MELODY_NUM;
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (!selected)
- {
- if (GetThemeV2TonesInfo(&DownloadThemeTones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- if ((U16)DownloadThemeTones[0].AudioId == CurMelodyID)
- {
- selected = TRUE;
- *selecteditem = nNumofItem;
- if (AudioFileDeletedFromFmgr(CurMelodyID))
- {
- pfnUnicodeStrcpy((S8*) hintData[nNumofItem], GetString(STR_TONE_FILE_NOT_EXIST));
- }
- }
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- ASSERT(selected);
- }
- return (U8) index;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_profiles_Pon_tone_list_highlight_hdlr
- * DESCRIPTION
- * Getting Current Screen Handler
- * PARAMETERS
- * item_index [IN]
- * index_index(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_profiles_POn_Off_tone_list_highlight_hdlr(S32 item_index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- BOOL play_it = TRUE;
- U16 numOfItem = gtotalGeneralToneId + 1;// gtotalRingId + gtotalMidiId;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gcurrHiliteIndexOne = (U16) item_index;
- StopToneAudio();
- if (0 == gcurrHiliteIndexOne)
- {
- gcurrentaudioId = 0;
- glastaudioId = gcurrentaudioId;
- /* MTK Brian added for stop timer in case of 0-->0, 2003/11/18 */
- }
- else if (gcurrHiliteIndexOne < numOfItem)
- {
- gcurrentaudioId = gcurrHiliteIndexOne + gstartGeneralToneId - 1;
- }
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- else if (gcurrHiliteIndexOne < numOfItem + MAXIMUM_EXT_MELODY_NUM)
- {
- g_pon_off_ext_melody_idx = (U8) (gcurrHiliteIndexOne - numOfItem);
- gcurrentaudioId = (U16) g_pon_off_ext_melody_idx + PMG_EXT_PON_OFF_MELODY_BEGIN;
- }
- #endif /* defined(__MMI_PROFILE_EXTMELODY_SUPPORT__) */
- else
- {
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- numOfItem += MAXIMUM_EXT_MELODY_NUM;
- #endif
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (gcurrHiliteIndexOne == numOfItem)
- {
- DYNAUDIOINFO *download_theme_tones;
- if (GetThemeV2TonesInfo(&download_theme_tones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- gcurrentaudioId = (U16) download_theme_tones[0].AudioId;
- if (AudioFileDeletedFromFmgr(gcurrentaudioId))
- {
- play_it = FALSE;
- }
- }
- else
- {
- ASSERT(0);
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- }
- if (play_it)
- {
- StartTimer(TIMER_PROFILES_TONE_PLAY, 1000, PlayToneAudio);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PrfCallBackExtMldReplace
- * DESCRIPTION
- *
- * PARAMETERS
- * path [?]
- * is_short [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void PrfCallBackExtMldPOnOffReplace(void *path, int is_short)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 *filepath = (S8*) path;
- PMG_ADDFILE_ERRNO err = PMG_ADDFILE_ERR_UNKNOWN;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (filepath)
- {
- #if defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P)
- if (!mmi_profiles_check_DRM_content_forwardable((UI_string_type) filepath))
- {
- err = PMG_ADDFILE_ERR_DRM_PROHIBTED;
- }
- else
- #endif /* defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P) */
- if (PmgCheckImyMidFileSize(filepath) == PMG_ADDFILE_ERR_FILE_TOO_LARGE)
- {
- err = PMG_ADDFILE_ERR_FILE_TOO_LARGE;
- }
- else
- {
- POnOffPmgSetShortFileName((BOOL) is_short);
- if (POnOffPmgIsEmptySlot(g_pon_off_ext_melody_idx) == MMI_FALSE)
- {
- err = POnOffPmgReplaceExtMelodyBySlotPathFileName(filepath, g_pon_off_ext_melody_idx);
- }
- else
- {
- err = POnOffPmgAddExtMelodyBySlotPathFileName(filepath, g_pon_off_ext_melody_idx);
- }
- }
- switch (err)
- {
- case PMG_ADDFILE_ERR_SUCCESS:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- break;
- case PMG_ADDFILE_ERR_STR_TOO_LONG:
- case PMG_ADDFILE_ERR_STRFILE_TOO_LONG:
- case PMG_ADDFILE_ERR_STRPATH_TOO_LONG:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_NAMETOOLONG),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_SLOT_FULL:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_LISTFULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_FILE_TOO_LARGE:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_FILETOOLARGE),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- case PMG_ADDFILE_ERR_DUPLICATED:
- DisplayPopup(
- (PU8) GetString(STR_PROFILES_RING_TONE_SETUP_DUPLICATED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- #if defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P)
- case PMG_ADDFILE_ERR_DRM_PROHIBTED:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DRM_PROHIBITED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- #endif /* defined(__DRM_SUPPORT__) && defined(MMI_ON_HARDWARE_P) */
- default:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- break;
- }
- DeleteUptoScrID(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY);
- DeleteScreenIfPresent(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY);
- }
- else
- {
- GoBackToHistory(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetPOnOffToneConvertEmptySlotMenuList
- * DESCRIPTION
- *
- * PARAMETERS
- * idx [IN]
- * RETURNS
- * If change it or not ? decided by the global g_ext_melody_idx
- *****************************************************************************/
- static U8 PrfSetPOnOffToneConvertEmptySlotMenuList(U8 idx)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- if (POnOffPmgIsEmptySlot(g_pon_off_ext_melody_idx) == MMI_FALSE)
- { /* Not Empty slot */
- return idx;
- }
- else
- {
- if (idx == 0)
- {
- return PRF_MENU_EXTMLD_ADD; /* PRF_MENU_EXTMLD_DONE */
- }
- #if MMI_ON_HARDWARE_P
- else
- {
- MMI_ASSERT(MMI_FALSE);
- }
- #endif /* MMI_ON_HARDWARE_P */
- }
- return PRF_MENU_EXTMLD_MAX;
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetMSExtMelodyDrvSelect
- * DESCRIPTION
- * Joey added select card or phone
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetPOnOffExtMelodyDrvSelect(void)
- {
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S16 phoneDrvLetter, cardDrvLetter;
- S8 temp[3];
- UI_character_type dir_phone_root[4];
- UI_character_type dir_card_root[4];
- FMGR_FILTER filter;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- FMGR_FILTER_INIT(&filter);
- FMGR_FILTER_SET_AUDIO(&filter);
- FMGR_FILTER_SET(&filter, FMGR_TYPE_FOLDER);
- FMGR_FILTER_SET(&filter, FMGR_TYPE_FOLDER_DOT);
- //#define MMI_PUBLIC_DRV FS_GetDrive(FS_DRIVE_V_NORMAL, 2, FS_DRIVE_V_NORMAL | FS_DRIVE_I_SYSTEM)
- //#define MMI_CARD_DRV FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE)
- phoneDrvLetter = FS_GetDrive(FS_DRIVE_V_NORMAL, 2, FS_DRIVE_I_SYSTEM | FS_DRIVE_V_NORMAL);
- cardDrvLetter = FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE);
- sprintf(temp, "%c:\", (S8) phoneDrvLetter);
- AnsiiToUnicodeString((S8*) dir_phone_root, temp);
- sprintf(temp, "%c:\", (S8) cardDrvLetter);
- AnsiiToUnicodeString((S8*) dir_card_root, temp);
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- if (pon_off_extMldHlitItem == PRF_MENU_EXTMLD_DRV_CARD)
- {
- mmi_fmgr_select_path_and_enter(
- APP_PROFILES,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_card_root,
- PrfCallBackExtMldPOnOffReplace);//Joey PrfCallBackExtMldReplace
- }
- else /* if( extMldHlitItem == PRF_MENU_EXTMLD_DRV_PHONE) */
- {
- mmi_fmgr_select_path_and_enter(
- APP_PROFILES,
- FMGR_SELECT_FILE,
- filter,
- (PS8) dir_phone_root,
- PrfCallBackExtMldPOnOffReplace);//Joey PrfCallBackExtMldReplace
- }
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPrfSetMSToneExtMelodyDrv
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryPrfSetPOnOffToneExtMelodyDrv(void)
- {
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #else /* 0 */
- U8 *nStrItemList[PRF_MENU_EXTMLD_DRV_MAX];
- U8 nNumofItem = (U8) PRF_MENU_EXTMLD_DRV_MAX;
- U8 *guiBuffer;
- S16 CardDrv = -1;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #if (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__))
- // #define MMI_CARD_DRV FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE)
- CardDrv = FS_GetDrive(FS_DRIVE_V_REMOVABLE, 1, FS_NO_ALT_DRIVE);
- #endif /* (defined(MMI_ON_HARDWARE_P) && defined(__MMI_FILE_MANAGER__)) */
- if (CardDrv > 0) /* Card Storage is present */
- {
- U16 StrIDTitle = 0;
- if (prfset_conf_type == PRFSET_MELODY_TYPE_POWERON)
- {
- StrIDTitle = STR_POWERON_TONE_SETUP_CAPTION;
- }
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_COVEROPEN)
- {
- StrIDTitle = STR_COVEROPEN_TONE_CAPTION;
- }
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_COVERCLOSE)
- {
- StrIDTitle = STR_COVERCLOSE_TONE_CAPTION;
- }
- else
- {
- StrIDTitle = STR_POWEROFF_TONE_SETUP_CAPTION;
- }
- nStrItemList[PRF_MENU_EXTMLD_DRV_PHONE] = (U8*) GetString(STR_PROFILES_RING_TONE_SETUP_DRV_PHONE);
- nStrItemList[PRF_MENU_EXTMLD_DRV_CARD] = (U8*) GetString(STR_PROFILES_RING_TONE_SETUP_DRV_CARD);
- EntryNewScreen(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY_DRV, NULL, EntryPrfSetPOnOffToneExtMelodyDrv, NULL);
- guiBuffer = GetCurrGuiBuffer(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY_DRV);
- RegisterHighlightHandler(HighlightPrfSetPOnOffToneExtMelody);
- ShowCategory56Screen(
- StrIDTitle,
- (U16) (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING ? IMG_SCR_PBOOK_CAPTION : IMG_PROFILES_TITLEE),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (S32) nNumofItem,
- nStrItemList,
- NULL,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(PrfSetPOnOffExtMelodyDrvSelect, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* SetExitHandler (MENU_TONE_SETUP_RING_TONE_EXT_MELODY_DRV, ExitPrfSetRingToneExtMelodyDrv); */
- }
- else /* Card Storage not present */
- {
- pon_off_extMldHlitItem = PRF_MENU_EXTMLD_DRV_PHONE;
- PrfSetPOnOffExtMelodyDrvSelect();
- }
- #endif /* 0 */
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetPOnOffToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetPOnOffToneExtMelody(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 idx = PrfSetPOnOffToneConvertEmptySlotMenuList(pon_off_extMldHlitItem);
- TONE_SETUP tone;//Joey added for passing the MS tone type on 2007-4-03
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- if (idx == PRF_MENU_EXTMLD_DONE)
- {
- if (POnOffPmgIsEmptySlot(g_pon_off_ext_melody_idx) == MMI_FALSE)
- {
- if (prfset_conf_type == PRFSET_MELODY_TYPE_POWERON)
- {
- tone.powerOnTone = PMG_EXT_PON_OFF_MELODY_BEGIN + g_pon_off_ext_melody_idx;
- SetPowerOnToneType(tone);
- }
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_POWEROFF)
- {
- tone.powerOffTone = PMG_EXT_PON_OFF_MELODY_BEGIN + g_pon_off_ext_melody_idx;
- SetPowerOffToneType(tone);
- }
- #ifdef __MMI_CLAMSHELL__
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_COVEROPEN)
- {
- tone.coverOpenTone= PMG_EXT_PON_OFF_MELODY_BEGIN + g_pon_off_ext_melody_idx;
- SetCoverOpenToneType(tone);
- }
- else if (prfset_conf_type == PRFSET_MELODY_TYPE_COVERCLOSE)
- {
- tone.coverCloseTone= PMG_EXT_PON_OFF_MELODY_BEGIN + g_pon_off_ext_melody_idx;
- SetCoverCloseToneType(tone);
- }
- #endif
- else
- {
- ASSERT(0);
- }
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- else if (idx == PRF_MENU_EXTMLD_DEL)
- {
- if (POnOffPmgDelExtMelodyById((U16) (PMG_EXT_PON_OFF_MELODY_BEGIN + g_pon_off_ext_melody_idx)) == MMI_TRUE)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- else if (idx == PRF_MENU_EXTMLD_ADD)
- {
- EntryPrfSetPOnOffToneExtMelodyDrv();
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- WARNING_TONE);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightPrfSetPOnOffToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightPrfSetPOnOffToneExtMelody(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- pon_off_extMldHlitItem = (U8) index;
- }
- /*****************************************************************************
- * FUNCTION
- * EntryPrfSetRingToneExtMelody
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryPrfSetPOnOffToneExtMelody(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *nStrItemList[PRF_MENU_EXTMLD_MAX];
- U8 nNumofItem = 0;
- U8 *guiBuffer;
- U16 StrIDToneSet = 0, StrIDToneDel = 0, StrIDToneAdd = 0, StrIDTitle = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- //Joey added for changing the MS tone style on 2007-4-03 start
- if(prfset_conf_type == PRFSET_MELODY_TYPE_POWERON)
- {
- StrIDTitle = STR_POWERON_TONE_SETUP_CAPTION;
- }
- else if(prfset_conf_type == PRFSET_MELODY_TYPE_COVEROPEN)
- {
- StrIDTitle = STR_COVEROPEN_TONE_CAPTION;
- }
- else if(prfset_conf_type == PRFSET_MELODY_TYPE_COVERCLOSE)
- {
- StrIDTitle = STR_COVERCLOSE_TONE_CAPTION;
- }
- else
- {
- StrIDTitle = STR_POWEROFF_TONE_SETUP_CAPTION;
- }
- StrIDToneSet = STR_TONE_SETUP_RING_TONE_EXT_SET;
- StrIDToneDel = STR_TONE_SETUP_RING_TONE_EXT_DEL;
- StrIDToneAdd = STR_TONE_SETUP_RING_TONE_EXT_ADD;// "replace"
- if (POnOffPmgIsEmptySlot(g_pon_off_ext_melody_idx) == MMI_FALSE)
- {
- /* Not Empty Slot */
- nStrItemList[PRF_MENU_EXTMLD_DONE] = (U8*) GetString(StrIDToneSet);
- nStrItemList[PRF_MENU_EXTMLD_DEL] = (U8*) GetString(StrIDToneDel);
- nStrItemList[PRF_MENU_EXTMLD_ADD] = (U8*) GetString(StrIDToneAdd);
- nNumofItem = (U8) PRF_MENU_EXTMLD_MAX;
- }
- else /* Empty slot, show replace only */
- {
- nStrItemList[0] = (U8*) GetString(StrIDToneAdd);
- nNumofItem = 1;
- }
- EntryNewScreen(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY, NULL, EntryPrfSetPOnOffToneExtMelody, NULL);
- guiBuffer = GetCurrGuiBuffer(MENU_TONE_SETUP_POWERON_OFF_TONE_EXT_MELODY);
- RegisterHighlightHandler(HighlightPrfSetPOnOffToneExtMelody);
- ShowCategory56Screen(
- StrIDTitle,
- (U16) (prfset_conf_type == PRFSET_MELODY_TYPE_PHB_RING ? IMG_SCR_PBOOK_CAPTION : IMG_PROFILES_TITLEE),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (S32) nNumofItem,
- nStrItemList,
- NULL,
- 0,
- guiBuffer);
- SetLeftSoftkeyFunction(PrfSetPOnOffToneExtMelody, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- /* SetExitHandler (MENU_TONE_SETUP_RING_TONE_EXT_MELODY, ExitPrfSetRingToneExtMelody); */
- }
- /*****************************************************************************
- * FUNCTION
- * PrfSetPOnOffToneConfType
- * DESCRIPTION
- *
- * PARAMETERS
- * type [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void PrfSetPOnOffToneConfType(PRFSET_MELODY_CONF_TYPE type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- prfset_conf_type = type;
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrProfilesPoweronToneSetup
- * DESCRIPTION
- * Exit profile Poweron ToneSetup Screen
- * PARAMETERS
- * void
- * RETURNS
- * voidgtotalGeneralToneId
- *****************************************************************************/
- void ExitScrProfilesPoweronToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (glastaudioId != POWERON_SILENT);
- StopToneAudio();
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOnToneId(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrSetPowerOnToneIdCountId(EntryScrSetPowerOnToneId_Ext);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneIdCountId
- * DESCRIPTION
- * Count Ringtone ID.
- * PARAMETERS
- * Func_Callback [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOnToneIdCountId(void (*Func_Callback) (U8, U16))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 is_ext_melody = MMI_FALSE;
- U16 numOfItem = gtotalGeneralToneId + 1;
- U16 ring_id = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(0==gcurrHiliteIndexOne )
- {
- ring_id = MESSAGE_SILENT;
- }
- else if (gcurrHiliteIndexOne < numOfItem)
- {
- ring_id =gcurrHiliteIndexOne + gstartGeneralToneId - 1;
- }
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- else if (gcurrHiliteIndexOne < numOfItem + MAXIMUM_EXT_MELODY_NUM)
- {
- g_pon_off_ext_melody_idx = (U8) (gcurrHiliteIndexOne - numOfItem);
- ring_id = (U16) g_pon_off_ext_melody_idx + PMG_EXT_PON_OFF_MELODY_BEGIN;
- is_ext_melody = MMI_TRUE;
- }
- #endif /* defined(__MMI_PROFILE_EXTMELODY_SUPPORT__) */
- else
- {
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- numOfItem += MAXIMUM_EXT_MELODY_NUM;
- #endif
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (gcurrHiliteIndexOne == numOfItem)
- {
- DYNAUDIOINFO *download_theme_tones;
- if (GetThemeV2TonesInfo(&download_theme_tones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- ring_id = (U16) download_theme_tones[0].AudioId;
- }
- else
- {
- ASSERT(0);
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- }
- Func_Callback(is_ext_melody, ring_id);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOffToneId(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrSetPowerOffToneIdCountId(EntryScrSetPowerOffToneId_Ext);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneIdCountId
- * DESCRIPTION
- * Count Ringtone ID.
- * PARAMETERS
- * Func_Callback [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOffToneIdCountId(void (*Func_Callback) (U8, U16))
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 is_ext_melody = MMI_FALSE;
- U16 numOfItem = gtotalGeneralToneId + 1;
- U16 ring_id = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(0==gcurrHiliteIndexOne )
- {
- ring_id = MESSAGE_SILENT;
- }
- else if (gcurrHiliteIndexOne < numOfItem)
- {
- ring_id =gcurrHiliteIndexOne + gstartGeneralToneId - 1;
- }
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- else if (gcurrHiliteIndexOne < numOfItem + MAXIMUM_EXT_MELODY_NUM)
- {
- g_pon_off_ext_melody_idx = (U8) (gcurrHiliteIndexOne - numOfItem);
- ring_id = (U16) g_pon_off_ext_melody_idx + PMG_EXT_PON_OFF_MELODY_BEGIN;
- is_ext_melody = MMI_TRUE;
- }
- #endif /* defined(__MMI_PROFILE_EXTMELODY_SUPPORT__) */
- else
- {
- #if defined(__MMI_PROFILE_EXTMELODY_SUPPORT__)
- numOfItem += MAXIMUM_EXT_MELODY_NUM;
- #endif
- #if defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__)
- if (gcurrHiliteIndexOne == numOfItem)
- {
- DYNAUDIOINFO *download_theme_tones;
- if (GetThemeV2TonesInfo(&download_theme_tones) != 0 && mmi_tm_get_current_theme_ringtone())
- {
- ring_id = (U16) download_theme_tones[0].AudioId;
- }
- else
- {
- ASSERT(0);
- }
- }
- #endif /* defined(__MMI_DOWNLOADABLE_THEMES_SUPPORT__) */
- }
- Func_Callback(is_ext_melody, ring_id);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId_Ext
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * ExtMelodyFlag [IN]
- * ringTone [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOnToneId_Ext(U8 ExtMelodyFlag, U16 ringTone)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- TONE_SETUP tone;
- tone.powerOnTone = ringTone;
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- if (ExtMelodyFlag == MMI_TRUE)
- {
- prfset_conf_type = PRFSET_MELODY_TYPE_POWERON;
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- EntryPrfSetPOnOffToneExtMelody();
- }
- else
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- SetPowerOnToneType(tone);
- DeleteScreenIfPresent(SCR_POWERON_TONE_SETUP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId_Ext
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * ExtMelodyFlag [IN]
- * ringTone [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPowerOffToneId_Ext(U8 ExtMelodyFlag, U16 ringTone)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- TONE_SETUP tone;
- tone.powerOffTone = ringTone;
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- if (ExtMelodyFlag == MMI_TRUE)
- {
- prfset_conf_type = PRFSET_MELODY_TYPE_POWEROFF;
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- EntryPrfSetPOnOffToneExtMelody();
- }
- else
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- SetPowerOffToneType(tone);
- DeleteScreenIfPresent(SCR_POWEROFF_TONE_SETUP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Showing profile Poweroff Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesPoweroffToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nDispAttribute; /* Stores display attribue */
- U16 selecteditem = 0;
- U8 totalItems = 0;
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup, EntryScrProfilesPoweroffToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_POWEROFF_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- totalItems =mmi_profiles_get_POn_Off_tone_list((U16)gprofiles[gprofileId].toneSetup.powerOffTone, &selecteditem);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_POWEROFF_TONE);
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_POWEROFF_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(mmi_profiles_POn_Off_tone_list_highlight_hdlr);
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_POWEROFF_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- totalItems,
- subMenuDataPtrs,
- hintDataPtrs,
- 0,
- selecteditem,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetPowerOffToneId, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Exit profile Poweron ToneSetup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrProfilesPoweroffToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (glastaudioId != POWERON_SILENT);
- StopToneAudio();
- }
- void StopExtPowerOnTone()
- {
- stopRequestedTone(POWER_ON_TONE);
- }
- #else
- //KP Jerry add for changing the style of message tone list on 2007-4-10 end
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweronToneSetup
- * DESCRIPTION
- * Showing profile Poweron Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesPoweronToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 UnicodenStrItemList[10]; /* Stores the strings id of submenus returned */
- U8 AsciinStrItemList[4]; /* Stores the strings id of submenus returned */
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribue */
- U8 *guiBuffer; /* Buffer holding history data */
- U8 i = 0;
- POWERON_TONE_ENUM data = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_POWERON_TONE_SETUP, ExitScrProfilesPoweronToneSetup, EntryScrProfilesPoweronToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_POWERON_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- /* nNumofItem = GetNumOfChild(MENU_TONE_SETUP_POWERON_TONE); */
- nNumofItem = gtotalGeneralToneId + 1;
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_POWERON_TONE);
- memset((S8*) subMenuDataPtrs[0], 0, MAX_SUB_MENU_SIZE);
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[0], (S8*) GetString(STR_PROFILES_SILENT), MAX_SUBMENU_CHARACTERS);
- for (i = 1; i <= gtotalGeneralToneId; i++)
- {
- S32 len = 0;
- memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
- sprintf((PS8) AsciinStrItemList, "%d", i);
- AnsiiToUnicodeString((PS8) UnicodenStrItemList, (PS8) AsciinStrItemList);
- len = pfnUnicodeStrlen((PS8) UnicodenStrItemList);
- len = MAX_SUBMENU_CHARACTERS - len;
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[i], (S8*) GetString(STR_PROFILES_TONE), MAX_SUBMENU_CHARACTERS);
- pfnUnicodeStrcat((PS8) subMenuDataPtrs[i], (PS8) UnicodenStrItemList);
- }
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_POWERON_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(GetCurrScreenHandlerfive);
- if (gprofiles[gprofileId].toneSetup.powerOnTone != POWERON_SILENT)
- {
- data = (gprofiles[gprofileId].toneSetup.powerOnTone - gstartGeneralToneId) + 1;
- }
- else
- {
- data = 0;
- }
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_POWERON_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- subMenuDataPtrs,
- NULL,
- 0,
- (U16) data,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetPoweronTone, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWERON_TONE_SETUP, ExitScrProfilesPoweronToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetPoweronTone
- * DESCRIPTION
- * SetPoweronTone
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPoweronTone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- TONE_SETUP tonesetup;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gcurrHiliteIndexOne == 0)
- {
- tonesetup.powerOnTone = POWERON_SILENT;
- }
- else
- {
- tonesetup.powerOnTone = (gcurrHiliteIndexOne + gstartGeneralToneId) - 1;
- }
- DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, SUCCESS_TONE);
- SetPowerOnToneType(tonesetup);
- DeleteScreenIfPresent(SCR_POWERON_TONE_SETUP);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrProfilesPoweronToneSetup
- * DESCRIPTION
- * Exit profile Poweron ToneSetup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrProfilesPoweronToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (glastaudioId != POWERON_SILENT);
- StopToneAudio();
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Showing profile Poweroff Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesPoweroffToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 UnicodenStrItemList[10]; /* Stores the strings id of submenus returned */
- U8 AsciinStrItemList[4]; /* Stores the strings id of submenus returned */
- U16 nNumofItem; /* Stores no of children in the submenu */
- U16 nDispAttribute; /* Stores display attribue */
- U8 *guiBuffer; /* Buffer holding history data */
- U8 i = 0;
- POWEROFF_TONE_ENUM data = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup, EntryScrProfilesPoweroffToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_POWEROFF_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- nNumofItem = gtotalGeneralToneId + 1;
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_POWEROFF_TONE);
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- memset((S8*) subMenuDataPtrs[0], 0, MAX_SUB_MENU_SIZE);
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[0], (S8*) GetString(STR_PROFILES_SILENT), MAX_SUBMENU_CHARACTERS);
- for (i = 1; i <= gtotalGeneralToneId; i++)
- {
- S32 len = 0;
- memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
- sprintf((PS8) AsciinStrItemList, "%d", i);
- AnsiiToUnicodeString((PS8) UnicodenStrItemList, (PS8) AsciinStrItemList);
- len = pfnUnicodeStrlen((PS8) UnicodenStrItemList);
- len = MAX_SUBMENU_CHARACTERS - len;
- pfnUnicodeStrncpy((S8*) subMenuDataPtrs[i], (S8*) GetString(STR_PROFILES_TONE), MAX_SUBMENU_CHARACTERS);
- pfnUnicodeStrcat((PS8) subMenuDataPtrs[i], (PS8) UnicodenStrItemList);
- }
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_POWEROFF_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(GetCurrScreenHandlerfive);
- /* 8 Display Category Screen */
- if (gprofiles[gprofileId].toneSetup.powerOffTone != POWEROFF_SILENT)
- {
- data = (gprofiles[gprofileId].toneSetup.powerOffTone - gstartGeneralToneId) + 1;
- }
- else
- {
- data = 0;
- }
- ShowCategory89Screen(
- STR_POWEROFF_TONE_SETUP_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- subMenuDataPtrs,
- NULL,
- 0,
- (U16) data,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetPoweroffTone, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetPoweroffTone
- * DESCRIPTION
- * Set PowerOff Tone
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetPoweroffTone(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- TONE_SETUP tonesetup;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (gcurrHiliteIndexOne == 0)
- {
- tonesetup.powerOffTone = POWEROFF_SILENT;
- }
- else
- {
- tonesetup.powerOffTone = (gcurrHiliteIndexOne + gstartGeneralToneId) - 1;
- }
- DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, SUCCESS_TONE);
- SetPowerOffToneType(tonesetup);
- DeleteScreenIfPresent(SCR_POWEROFF_TONE_SETUP);
- }
- /*****************************************************************************
- * FUNCTION
- * ExitScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Exit profile Poweron ToneSetup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void ExitScrProfilesPoweroffToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (glastaudioId != POWERON_SILENT);
- StopToneAudio();
- }
- #endif //KP Jerry add for changing the style of message tone list on 2007-4-10
- /* MTK brian added to wrap cover open/close tone setup, 2003/10/18 */
- #ifdef __MMI_CLAMSHELL__
- /*****************************************************************************
- * FUNCTION
- * HighlightProfilesCoverOpenToneSetup
- * DESCRIPTION
- * Highlight profile Cover Open Setup menu item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightProfilesCoverOpenToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Change left soft key icon and label */
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- /* 2 Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- /* 3 Register function for left soft key */
- SetLeftSoftkeyFunction(EntryScrProfilesCoverOpenToneSetup, KEY_EVENT_UP);
- /* 4 Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(EntryScrProfilesCoverOpenToneSetup, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * HighlightProfilesCoverCloseToneSetup
- * DESCRIPTION
- * Highlight profile Cover Close Setup menu item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void HighlightProfilesCoverCloseToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Change left soft key icon and label */
- ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
- /* 2 Change right soft key icon and label */
- ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
- /* 3 Register function for left soft key */
- SetLeftSoftkeyFunction(EntryScrProfilesCoverCloseToneSetup, KEY_EVENT_UP);
- /* 4 Register function for right soft key */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(EntryScrProfilesCoverCloseToneSetup, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- //KP Jerry add for changing the style of message tone list on 2007-4-10 start
- #ifdef __MMI_TONE_LIST_STYLE_CHANGED__
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Showing profile Poweroff Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesCoverOpenToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nDispAttribute; /* Stores display attribue */
- U16 selecteditem = 0;
- U8 totalItems = 0;
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_COVEROPEN_TONE_SETUP, ExitScrProfilesCoverOpenToneSetup, EntryScrProfilesCoverOpenToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_COVEROPEN_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- totalItems =mmi_profiles_get_POn_Off_tone_list((U16)gprofiles[gprofileId].toneSetup.coverOpenTone, &selecteditem);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_COVEROPEN_TONE);
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_COVEROPEN_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(mmi_profiles_POn_Off_tone_list_highlight_hdlr);
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_COVEROPEN_TONE_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- totalItems,
- subMenuDataPtrs,
- hintDataPtrs,
- 0,
- selecteditem,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetCoverOpenToneId, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetRingToneId
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetCoverOpenToneId(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryScrSetPowerOffToneIdCountId(EntryScrSetCoverOpenToneId_Ext);
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetCoverOpenToneId_Ext
- * DESCRIPTION
- * Setting Ringtone ID.
- * PARAMETERS
- * ExtMelodyFlag [IN]
- * ringTone [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrSetCoverOpenToneId_Ext(U8 ExtMelodyFlag, U16 ringTone)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- TONE_SETUP tone;
- tone.coverOpenTone= ringTone;
- #ifdef __MMI_PROFILE_EXTMELODY_SUPPORT__
- if (ExtMelodyFlag == MMI_TRUE)
- {
- prfset_conf_type = PRFSET_MELODY_TYPE_COVEROPEN;
- PmgSetToneType( prfset_conf_type); //Joey added for changing the MS tone style on 2007-4-05
- EntryPrfSetPOnOffToneExtMelody();
- }
- else
- #endif /* __MMI_PROFILE_EXTMELODY_SUPPORT__ */
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- SetCoverOpenToneType(tone);
- DeleteScreenIfPresent(SCR_COVEROPEN_TONE_SETUP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrProfilesPoweroffToneSetup
- * DESCRIPTION
- * Showing profile Poweroff Tone Setup Screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void EntryScrProfilesCoverCloseToneSetup(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 nDispAttribute; /* Stores display attribue */
- U16 selecteditem = 0;
- U8 totalItems = 0;
- U8 *guiBuffer; /* Buffer holding history data */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* 1 Call Exit Handler */
- EntryNewScreen(SCR_COVERCLOSE_TONE_SETUP, ExitScrProfilesCoverCloseToneSetup, EntryScrProfilesCoverCloseToneSetup, NULL);
- /* 2 Get current screen to gui buffer for history purposes */
- guiBuffer = GetCurrGuiBuffer(SCR_COVERCLOSE_TONE_SETUP);
- /* 3. Retrieve no of child of menu item to be displayed */
- totalItems =mmi_profiles_get_POn_Off_tone_list((U16)gprofiles[gprofileId].toneSetup.coverCloseTone, &selecteditem);
- /* 4. Get attribute of menu to be displayed */
- nDispAttribute = GetDispAttributeOfItem(MENU_TONE_SETUP_COVERCLOSE_TONE);
- /* 5. Retrieve string ids in sequence of given menu item to be displayed */
- /* 6 Set current parent id */
- SetParentHandler(MENU_TONE_SETUP_COVERCLOSE_TONE);
- /* 7 Register highlight handler to be called in menu screen */
- RegisterHighlightHandler(mmi_profiles_POn_Off_tone_list_highlight_hdlr);
- /* 8 Display Category Screen */
- ShowCategory89Screen(
- STR_COVERCLOSE_TONE_CAPTION,
- IMG_PROFILES_TITLEE,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- totalItems,
- subMenuDataPtrs,
- hintDataPtrs,
- 0,
- selecteditem,
- guiBuffer);
- /* 9.Register function with right softkey */
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetLeftSoftkeyFunction(EntryScrSetCoverCloseToneId, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* SetExitHandler(SCR_POWEROFF_TONE_SETUP, ExitScrProfilesPoweroffToneSetup); */
- }
- /*****************************************************************************
- * FUNCTION
- * EntryScrSetCoverCloseToneId
- * DESCRIPTION