/***************************************************************************** * FUNCTION * csb_cat_scr_list_get_item * DESCRIPTION * get the list of items * PARAMETERS * item_index [IN] * str_buff [IN] * img_buff_p [?] * str_img_mask [IN] * a(?) [IN] Item index * d(?) [IN/OUT] String image mask * c(?) [IN/OUT] Image buffer * b(?) [IN/OUT] String buffer * RETURNS * TRUE *****************************************************************************/ pBOOL csb_cat_scr_list_get_item(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ UI_UNUSED_PARAMETER(str_img_mask); *img_buff_p = (PU8) GetImage(IMG_PROFILES_OUTDOOR); mmi_ucs2cpy((S8*) str_buff,(S8*) GetString(STR_ID_CSB_SHOW_CATEGORY_TEXT)); /* Concatenate the categor ID to the category name */ mmi_ucs2cat((S8*) str_buff,(S8*) csb_category_screen_list[item_index].pscreen_name); /* Concatenate the string to the category ID */ mmi_ucs2cat((S8*) str_buff,(S8*) GetString(STR_ID_CSB_SCREEN_TEXT)); return TRUE; }
/***************************************************************************** * FUNCTION * mmi_vrsi_redial_no_entry * DESCRIPTION * Entry function for no redial entry prompt * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_vrsi_redial_no_entry(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 str_prompt[MMI_VRSI_MAX_PROMPT_STR * ENCODING_LENGTH]; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_RCG_NOT_FOUND)); if (g_vrsi_redial_type == PHB_LND) { mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_REDIAL_DIALED)); } else if (g_vrsi_redial_type == PHB_LNM) { mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_REDIAL_MISSED)); } else if (g_vrsi_redial_type == PHB_LNR) { mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_REDIAL_RECEIVED)); } /* Play prompt TTS */ mmi_vrsi_util_play_tts((U16*) str_prompt, mmi_vrsi_entry_rcg); }
/***************************************************************************** * FUNCTION * mmi_rmgr_list_ro_entry_detail * DESCRIPTION * Entry function of the list ro detail screen * PARAMETERS * void * RETURNS * void *****************************************************************************/ static void mmi_rmgr_list_ro_entry_detail(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ U8 *guiBuffer, *info; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ //EntryNewScreen(SCR_ID_RMGR_LIST_RO_DETAIL, NULL, mmi_rmgr_list_ro_entry_detail, NULL); if(mmi_frm_scrn_enter( GRP_ID_RMGR_MAIN, SCR_ID_RMGR_LIST_RO_DETAIL, NULL, mmi_rmgr_list_ro_entry_detail, MMI_FRM_FULL_SCRN)) { guiBuffer = mmi_frm_scrn_get_gui_buf (GRP_ID_RMGR_MAIN, SCR_ID_RMGR_LIST_RO_DETAIL); info = (PU8) subMenuData; memset(info, 0x00, sizeof(kal_wchar)); #ifdef __DRM_V02__ /* Shared */ mmi_ucs2cat((PS8) info, (PS8) GetString(STR_ID_RMGR_SHARED_RO)); mmi_ucs2cat((PS8) info, (PS8) L"\n"); if (DRM_get_ro_shareability(mmi_rmgr_p->ro_idx)) { mmi_ucs2cat((PS8) info, (PS8) GetString(STR_GLOBAL_YES)); } else { mmi_ucs2cat((PS8) info, (PS8) GetString(STR_GLOBAL_NO)); } mmi_ucs2cat((PS8) info, (PS8) L"\n"); #endif /* __DRM_V02__ */ /* Summary */ mmi_rmgr_populate_drm_info_aux(NULL, DRM_PERMISSION_ALL, info, sizeof(subMenuData), mmi_rmgr_p->ro_idx); ShowCategory74Screen( STR_GLOBAL_DETAILS, mmi_rmgr_get_root_icon(), 0, 0, STR_GLOBAL_BACK, IMG_GLOBAL_BACK, (PU8) subMenuData, MAX_SUB_MENUS * MAX_SUB_MENU_SIZE, guiBuffer); SetRightSoftkeyFunction(mmi_frm_scrn_close_active_id, KEY_EVENT_UP); } }
static pBOOL mmi_dailer_list_get_item(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask) { unsigned short wtmp[50]; S32 index; U8 num_ascii[MAX_PB_NUMBER_LENGTH + 1 + 1]; U16 num_ascii_wchar[MAX_PB_NUMBER_LENGTH + 1 + 1]; S16 store_index; if (item_index > total_items) { return MMI_FALSE; } #if 0//(NEW_DIAL_SCREEN) // 第一个列表元素设为用户输入 if (item_index == FIRST_USER_INPUT_INDEX) { mmi_ucs2cpy((S8 *)str_buff, (S8 *)input_buffer); *img_buff_p = NULL; return MMI_TRUE; } #endif // 电话本处理 index = list_filter_index_array[item_index]; store_index = g_phb_name_index[index]; if (mmi_ucs2strlen((S8*) (PhoneBook[store_index].alpha_id.name))) { // name mmi_ucs2cpy((S8*) str_buff, (S8*) (PhoneBook[store_index].alpha_id.name)); //stretch_eight_chars_width(str_buff); // phone number #if 1 //>>luchongguang mod 2009-07-10 Bug #12887 存储+86的号码,然后待机界面输入号码前几位快速选择呼叫,字符“+”会被去掉,拨打电话失败 mmi_phb_convert_get_ucs2_number((S8*) num_ascii_wchar, store_index); #else mmi_phb_convert_to_digit_by_storage(num_ascii, PhoneBook[store_index].tel.number, MAX_PB_NUMBER_LENGTH + 1,MMI_NVRAM); mmi_asc_to_ucs2((S8 *)num_ascii_wchar, (S8 *)num_ascii); #endif /* Bug #12994 */ mmi_ucs2cat((S8*) str_buff, (S8 *)L" "); mmi_ucs2cat((S8 *)str_buff, (S8 *)num_ascii_wchar); } else { mmi_phb_convert_get_ucs2_number((S8*) str_buff, store_index); } *img_buff_p = NULL; return MMI_TRUE; }
/***************************************************************************** * FUNCTION * mmi_vrsi_redial_dial_prompt_message * DESCRIPTION * This function prepare redial prompt message. * PARAMETERS * str_prompt [IN] Prompt string buffer * RETURNS * void *****************************************************************************/ void mmi_vrsi_redial_dial_prompt_message(S8 *str_prompt) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ LOG_CALL *redial_call = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ /* Append redial type, use first record only */ if (g_vrsi_redial_type == PHB_LND) { redial_call = &chis_p->dialedCalls[0]; mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_REDIAL_DIALED)); } else if (g_vrsi_redial_type == PHB_LNM) { redial_call = &chis_p->missedCalls[0]; mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_REDIAL_MISSED)); } else if (g_vrsi_redial_type == PHB_LNR) { redial_call = &chis_p->recvdCalls[0]; mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_REDIAL_RECEIVED)); } else { DisplayPopup( (U8*) GetString(STR_GLOBAL_ERROR), IMG_GLOBAL_ERROR, TRUE, UI_POPUP_NOTIFYDURATION_TIME, ERROR_TONE); return; } mmi_ucs2cat(str_prompt, (S8*) L" "); /* Append Name or Number */ if (mmi_ucs2strlen(redial_call->pbName)) { mmi_ucs2cat(str_prompt, redial_call->pbName); } else { mmi_ucs2cat(str_prompt, (S8*) redial_call->number); } /* Append dialing string */ mmi_ucs2cat(str_prompt, (S8*) L" "); mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_DIALING_PROMPT)); }
/***************************************************************************** * FUNCTION * mmi_brw_stored_page_pre_entry_page_properties * DESCRIPTION * Entry function for store page properties * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_brw_stored_page_pre_entry_page_properties(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 temp_str[100]; applib_time_struct time_obj; S32 local_time_in_sec; S32 page_size; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ MMI_ASSERT(g_brw_cntx.saved_page_properties_p); mmi_brw_object_properties_reset(); if(g_brw_cntx.saved_page_properties_p) { g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_NAME] = MMI_TRUE; mmi_chset_utf8_to_ucs2_string((U8*)g_brw_obj_properties_cntx.obj_name, (BRW_OBJECT_PROPERTIES_NAME_LEN+1)*ENCODING_LENGTH, (U8*)g_brw_cntx.saved_page_properties_p->label); g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_ADDRESS] = MMI_TRUE; mmi_chset_utf8_to_ucs2_string((U8*)g_brw_obj_properties_cntx.obj_address, (BRW_OBJECT_PROPERTIES_ADDRESS_LEN+1)*ENCODING_LENGTH, (U8*)g_brw_cntx.saved_page_properties_p->url); g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_SIZE] = MMI_TRUE; page_size = (S32)g_brw_cntx.saved_page_properties_p->data_size; if( page_size > 0 ) { mmi_brw_convert_int_to_unicode_string((U8*)temp_str,(U32)g_brw_cntx.saved_page_properties_p->data_size); mmi_ucs2cat((S8*)temp_str,(S8*)L" "); mmi_ucs2cat((S8*)temp_str,(S8*)get_string(STR_ID_BRW_BYTES)); } else { mmi_ucs2cpy((S8*)temp_str,(S8*)get_string(STR_ID_BRW_UNKNOWN)); } mmi_ucs2cpy((S8*)g_brw_obj_properties_cntx.obj_size, (S8*)temp_str); g_brw_obj_properties_cntx.prop_status[BRW_OBJECT_PROP_DATE] = MMI_TRUE; local_time_in_sec = applib_dt_sec_utc_to_local(g_brw_cntx.saved_page_properties_p->date); if(applib_dt_utc_sec_2_mytime(local_time_in_sec, &time_obj, MMI_FALSE)) { sprintf((S8*) temp_str, "%d/%d/%d", time_obj.nMonth, time_obj.nDay, time_obj.nYear); mmi_asc_to_ucs2((S8*)g_brw_obj_properties_cntx.obj_date, (S8*)temp_str); } } g_brw_obj_properties_cntx.prop_count = BRW_STORED_PAGE_PROPERTIES_COUNT; mmi_brw_entry_object_properties(); }
/***************************************************************************** * FUNCTION * mmi_bt_avrcp_ct_cmd_confirm * DESCRIPTION * This function is to * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_bt_avrcp_ct_cmd_confirm(U16 op_code, U8 command_type, BOOL key_press) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ CHAR display_buffer[80]; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ switch (op_code) { case BT_AVRCP_OP_UNIT_INFO: mmi_ucs2cpy(display_buffer, (CHAR*) GetString(STR_BT_AVRCP_CMD_UNIT_COMMAND)); break; case BT_AVRCP_OP_SUBUNIT_INFO: mmi_ucs2cpy(display_buffer, (CHAR*) GetString(STR_BT_AVRCP_CMD_SUBUNIT_COMMAND)); break; case BT_AVRCP_OP_PASS_THROUGH: mmi_ucs2cpy(display_buffer, (CHAR*) GetString(mmi_bt_avrcp_util_get_cmd_string(command_type))); break; default: mmi_ucs2cpy(display_buffer, (CHAR*) GetString(STR_GLOBAL_ERROR)); break; } mmi_ucs2cat(display_buffer, (CHAR*)L"\n Response\0"); mmi_popup_display_simple((WCHAR*) display_buffer, MMI_EVENT_SUCCESS, GRP_ID_ROOT, NULL); }
/***************************************************************************** * FUNCTION * mmi_vrsi_prf_no_mode_prompt * DESCRIPTION * This function play tts for no profile to switch. * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_vrsi_prf_no_mode_prompt(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 str_prompt[MMI_VRSI_MAX_PROMPT_STR * ENCODING_LENGTH]; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_RCG_NOT_FOUND)); mmi_ucs2cat(str_prompt, GetString(STR_PROFILE_CAPTION)); mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_SPEAK_AGAIN_PROMPT)); /* Play prompt TTS */ mmi_vrsi_util_play_tts((U16*) str_prompt, mmi_vrsi_entry_rcg); }
/***************************************************************************** * FUNCTION * csb_frm_save_screen_shot * DESCRIPTION * Function to create the file path and save the * LAYER contents in JPEG format * PARAMETERS * U32 cat_ID * RETURNS * void *****************************************************************************/ pBOOL csb_frm_save_screen_shot(U32 nIndex) { /*----------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------*/ U8 file_name_prefix_in_unicode[MAX_CSB_SCREEN_NAME_LENGTH * ENCODING_LENGTH]; U8 file_name_prefix_in_ascii[MAX_CSB_SCREEN_NAME_LENGTH] = "category_"; U8 local_file_path[MAX_CSB_PATH_LENGTH * ENCODING_LENGTH]; gdi_handle handle = GDI_NULL_HANDLE; GDI_RESULT error; /*----------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------*/ /* Convert Ansii string to Unicode */ mmi_asc_to_ucs2((PS8) file_name_prefix_in_unicode, (PS8) file_name_prefix_in_ascii); mmi_ucs2cpy((PS8)local_file_path, (PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path); /* Concatenate the category screen prefix to the file name -- "category_" */ mmi_ucs2cat((PS8)local_file_path, (PS8) file_name_prefix_in_unicode); /* Concatenate the category ID to the file name */ mmi_ucs2cat((PS8)local_file_path, (PS8) g_CSB_struct.pscreen_info[nIndex].cat_scr_name); /* Append the extension of the file -- ".jpg" */ mmi_ucs2cat((PS8)local_file_path, (PS8) L".jpg\0"); /* Merge all the layers to one */ gdi_layer_flatten_previous_to_base(); handle = GDI_LAYER_MAIN_BASE_LAYER_HANDLE; /* API to save the snapshot of the given the LAYER handle at the given path */ error = gdi_layer_save_jpeg_file(handle, (S8*) local_file_path); if(error == GDI_FAILED) { return FALSE; } return TRUE; }
/***************************************************************************** * FUNCTION * PmgConstructPathFileName * DESCRIPTION * * PARAMETERS * buf [?] * size [IN] * path [?] * file [?] * RETURNS * void *****************************************************************************/ void PmgConstructPathFileName(S8 *buf, U16 size, S8 *path, S8 *file) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (size < MAX_EXT_MELODY_FULLNAME_WIDTH) { buf[0] = 0x0; buf[1] = 0x0; return; } mmi_ucs2cpy(buf, (S8*) path); mmi_ucs2cat(buf, (S8*) L"\\"); mmi_ucs2cat(buf, (S8*) file); UNMARK_EXTMELODY_SHORTNAME(buf); }
/***************************************************************************** * FUNCTION * mmi_vrsi_prf_cannot_switch_prompt * DESCRIPTION * This function play tts for can not switch to specific mode. (Ex. headset mode) * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_vrsi_prf_cannot_switch_prompt(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 str_prompt[MMI_VRSI_MAX_PROMPT_STR * ENCODING_LENGTH]; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_ucs2cpy(str_prompt, GetString(STR_ID_VRSI_CANT_SWITCH_PROMPT)); mmi_vrsi_prf_get_mode_prompt(str_prompt); mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_SPEAK_AGAIN_PROMPT)); /* Play prompt TTS */ mmi_vrsi_util_play_tts((U16*) str_prompt, mmi_vrsi_entry_rcg); }
/***************************************************************************** * FUNCTION * mmi_java_entry_get_permission * DESCRIPTION * The entry function to get user's permission to use Network or some * resource. * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_java_entry_get_permission(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ U8 *guiBuffer; U16 strid = mmi_java_permission_strid(mmi_java_get_permission_msg.title_id); S8 *buffer; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ EntryNewScreen(SCR_JAVA_GET_PERMISSION, NULL, mmi_java_entry_get_permission, NULL); guiBuffer = GetCurrGuiBuffer(SCR_JAVA_GET_PERMISSION); mmi_java_get_permission_index = mmi_java_get_permission_msg.chosen_id; buffer = (S8*)subMenuData; kal_mem_set(buffer, 0, MAX_SUB_MENUS * MAX_SUB_MENU_SIZE); mmi_ucs2cpy((S8*)buffer, (S8*)GetString(strid)); if(mmi_java_get_permission_msg.appendix) { mmi_ucs2cat((S8*)buffer, (S8*)mmi_java_get_permission_msg.appendix); } ShowCategory74Screen( STR_JAVA_PERMISSION_TITLE, mmi_java_get_title_icon(), STR_GLOBAL_YES, IMG_GLOBAL_YES, STR_GLOBAL_NO, IMG_GLOBAL_NO, (PU8) buffer, mmi_ucs2strlen((PS8) buffer), NULL); SetLeftSoftkeyFunction(mmi_java_get_permission_lsk_hdlr, KEY_EVENT_UP); SetRightSoftkeyFunction(mmi_java_get_permission_rsk_hdlr, KEY_EVENT_UP); }
/***************************************************************************** * FUNCTION * mmi_vrsi_prf_get_mode_prompt * DESCRIPTION * This function return mode string according to index. * PARAMETERS * str_prompt [IN] Prompt string * RETURNS * void *****************************************************************************/ void mmi_vrsi_prf_get_mode_prompt(S8 *str_prompt) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (g_vrsi_profile_mode == MMI_PROFILE_GENERAL) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_GENERAL)); } else if (g_vrsi_profile_mode == MMI_PROFILE_MEETING) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_MEETING)); } else if (g_vrsi_profile_mode == MMI_PROFILE_OUTDOOR) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_OUTDOOR)); } else if (g_vrsi_profile_mode == MMI_PROFILE_INDOOR) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_INDOOR)); } else if (g_vrsi_profile_mode == MMI_PROFILE_HEADSET) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_HEADSET)); } else if (g_vrsi_profile_mode == MMI_PROFILE_SILENT) { mmi_ucs2cat(str_prompt, GetString(STR_ID_VRSI_PROFILE_SILENT)); } #ifdef __MMI_BT_PROFILE__ else if (g_vrsi_profile_mode == MMI_PROFILE_BT) { mmi_ucs2cat(str_prompt, GetString(STR_PROFILES_BT)); } #endif }
/***************************************************************************** * FUNCTION * mmi_rmgr_populate_drm_info_aux * DESCRIPTION * * PARAMETERS * rights [?] * permission [IN] * data [?] * RETURNS * *****************************************************************************/ kal_bool mmi_rmgr_populate_drm_info_aux(kal_wchar *path, kal_uint8 app_perm, kal_uint8 *data, kal_int32 ref) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ FS_HANDLE input = FS_ERROR_RESERVED; kal_int32 start = 0, end = 0, cons_ret = DRM_RESULT_NON_DRM; kal_bool ret = KAL_FALSE, flag = KAL_TRUE; kal_uint8 permission; drm_method_enum method; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ /* permission's incorrect, but ok here*/ if (app_perm == DRM_PERMISSION_ALL) permission = DRM_PERMISSION_PLAY; else permission = app_perm; if(ref < 0) { input = DRM_open_file(path, FS_READ_ONLY, permission); if (input < FS_NO_ERROR) return ret; method = DRM_get_object_method(input, NULL); } else { method = DRM_get_object_method_by_ref(ref); } if (method != DRM_METHOD_NONE) { if (ref < 0) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_RIGHT)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_PROTECTED)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } } else { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_RIGHT)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNPROTECTED)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); if (ref < 0) { DRM_close_file(input); } else { DRM_free_ro_detail(); } return ret; } #ifdef __DRM_V02__ if (ref < 0) { kal_wchar *sepa = kal_wstrrchr(path, (kal_int32) '\\'); if (DRM_is_archive(input, NULL) && sepa && kal_wstrncmp(sepa - 4, L".odf\\", 5) != 0) { /* Multi Part ODF */ mmi_ucs2cat((PS8) data, (PS8) L" "); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_MULTI_PART)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); return ret; } } #endif if (method == DRM_METHOD_FORWARD_LOCK) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNLIMITED)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); if (ref < 0) { DRM_close_file(input); } else { DRM_free_ro_detail(); } return ret; } do { if (permission & (DRM_PERMISSION_PLAY | DRM_PERMISSION_DISPLAY | DRM_PERMISSION_EXECUTE | DRM_PERMISSION_PRINT | DRM_PERMISSION_EXPORT)) { drm_constraint_struct cons; if (ref < 0) { if (app_perm == DRM_PERMISSION_ALL && permission != DRM_PERMISSION_PLAY) { input = DRM_open_file(path, FS_READ_ONLY, permission); if (input < FS_NO_ERROR) return KAL_FALSE; } cons_ret = DRM_get_constraint(input, NULL, permission, &cons); } else { cons_ret = DRM_get_constraint_by_ref(ref, permission, &cons); } if (cons_ret >= DRM_RESULT_OK && cons.status == DRM_STATUS_RIGHTS_PRESENT) { if (flag) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); flag = KAL_FALSE; } switch(permission) { case DRM_PERMISSION_PLAY: mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_PLAY)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); break; case DRM_PERMISSION_DISPLAY: mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_DISPLAY)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); break; case DRM_PERMISSION_EXECUTE: mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_EXECUTE)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); break; case DRM_PERMISSION_PRINT: mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_PRINT)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); break; case DRM_PERMISSION_EXPORT: mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_DRM_EXPORT)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); break; default: break; } if (((method & DRM_METHOD_COMBINED_DELIVERY) || (method & DRM_METHOD_SEPARATE_DELIVERY) || (method & DRM_METHOD_V2)) && (cons.status != DRM_STATUS_NO_RIGHTS)) { MYTIME t; S8 buffer[20]; drm_constraint_struct *constraint; constraint = &cons; if (constraint->type != DRM_CONSTRAINT_NONE) { if (constraint->type & DRM_CONSTRAINT_COUNT) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_COUNT)); sprintf((char*)buffer, "\n%d/%d", constraint->used_count, constraint->total_count); mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } #ifdef __DRM_V02__ if (constraint->type & DRM_CONSTRAINT_ACCUMULATED) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_ACCUMULATED)); sprintf((char*)buffer, "\n%d ", constraint->accum_dur); mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_SEC)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } if (constraint->type & DRM_CONSTRAINT_TIMEDCOUNT) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_TIMEDCOUNT)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); sprintf((char*)buffer, "%d ", constraint->timed_count); mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_TIMEDCOUNT_TIME)); sprintf((char*)buffer, "%d ", constraint->period); mmi_asc_to_ucs2((PS8) & data[mmi_ucs2strlen((PS8) data) << 1], (PS8) buffer); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_SEC)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } #endif /* __DRM_V02__ */ if (constraint->type & DRM_CONSTRAINT_DATETIME) { if ((constraint->type & DRM_CONSTRAINT_INTERVAL) && constraint->start_intv != 0) { /* date time contains interval -> show interval*/ if (constraint->start_time <= constraint->start_intv && constraint->end_time >= constraint->end_intv) { start = constraint->start_intv; end = constraint->end_intv; } /* interval contains date time -> show date time*/ else if (constraint->start_intv <= constraint->start_time && constraint->end_intv >= constraint->end_time) { start = constraint->start_time; end = constraint->end_time; } /* date time overlaps interval -> show overlap*/ else if (constraint->start_intv <= constraint->start_time && constraint->end_intv <= constraint->end_time && constraint->start_time <= constraint->end_intv) { start = constraint->start_time; end = constraint->end_intv; } /* interval overlaps date time -> show overlap*/ else if (constraint->start_time <= constraint->start_intv && constraint->end_time <= constraint->end_intv && constraint->start_intv <= constraint->end_time) { start = constraint->start_intv; end = constraint->end_time; } else { start = constraint->start_intv; end = constraint->end_intv; } } else { start = constraint->start_time; end = constraint->end_time; } } else if (constraint->type & DRM_CONSTRAINT_INTERVAL) { if (constraint->interval <= 0) { start = -1; end = -1; } else { start = constraint->start_intv; end = constraint->end_intv; } } if (start > 0) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_START)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_dt_utc_sec_2_mytime(start, &t, FALSE); date_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN); mmi_ucs2cat((PS8) data, (PS8) L" "); time_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } if (end > 0) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_END)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_dt_utc_sec_2_mytime(end, &t, FALSE); date_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN); mmi_ucs2cat((PS8) data, (PS8) L" "); time_string(&t, (PU16) & data[mmi_ucs2strlen((PS8) data) << 1], DT_IDLE_SCREEN); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } } else { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_DETAIL_UNLIMITED)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } } } if (ref < 0) { DRM_close_file(input); } } permission = permission<<1; } while(permission < DRM_PERMISSION_ALL && app_perm == DRM_PERMISSION_ALL); if (flag) { mmi_ucs2cat((PS8) data, (PS8) GetString(STR_ID_RMGR_SUMMARY)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); mmi_ucs2cat((PS8) data, (PS8) GetString(STR_GLOBAL_INVALID)); mmi_ucs2cat((PS8) data, (PS8) L"\n"); } return ret; }
/***************************************************************************** * FUNCTION * mmi_brw_service_inbox_list_get_item * DESCRIPTION * Item call back function for dynamic list of push messages * PARAMETERS * item_index [IN] * str_buff [IN] * img_buff_p [IN] * str_img_mask [IN] * RETURNS * void *****************************************************************************/ pBOOL mmi_brw_service_inbox_list_get_item(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ struct tm expiry_timestamp = {0}; U64 expiry_secs_since_1970 = {0}; U64 current_secs_since_1970 = {0}; U32 rcvd_message_href_len = 0; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if ((item_index < 0) || (item_index > g_mmi_brw_push_cntx.max_push_messages)) { return FALSE; } /* Edited by Vivek - 5th july 2006 */ if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->service_flag == SERVICE_INDICATION) { if ((NULL == g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmMessage) || !mmi_ucs2strlen((S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmMessage)) { rcvd_message_href_len = mmi_ucs2strlen((S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref); if (rcvd_message_href_len > MAX_SUBMENU_CHARACTERS - 1) { mmi_ucs2ncpy( (S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref, MAX_SUBMENU_CHARACTERS - 3); mmi_ucs2cat((S8*) str_buff, ".\0.\0.\0"); } else { mmi_ucs2cpy((S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref); } } else { rcvd_message_href_len = mmi_ucs2strlen((S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmMessage); if (rcvd_message_href_len > MAX_SUBMENU_CHARACTERS - 1) { mmi_ucs2ncpy( (S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmMessage, MAX_SUBMENU_CHARACTERS - 3); mmi_ucs2cat((S8*) str_buff, ".\0.\0.\0"); } else { mmi_ucs2cpy((S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmMessage); } } } else if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->service_flag == SERVICE_LOADING) { rcvd_message_href_len = mmi_ucs2strlen((S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref); if (rcvd_message_href_len > MAX_SUBMENU_CHARACTERS - 1) { mmi_ucs2ncpy( (S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref, MAX_SUBMENU_CHARACTERS - 3); mmi_ucs2cat((S8*) str_buff, ".\0.\0.\0"); } else { mmi_ucs2cpy((S8*) str_buff, (S8*) g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pmHref); } } else { /* ERROR */ } /* Expiry time is to be calculated in case of SI to display expired message in case of expired message */ if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->service_flag == SERVICE_INDICATION) { if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires != NULL) { expiry_timestamp.tm_mon = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->month - 1; /* month scale to 0 to 11 */ expiry_timestamp.tm_year = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->year - 1900; /* offset since 1900 */ expiry_timestamp.tm_mday = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->day; expiry_timestamp.tm_hour = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->hour; expiry_timestamp.tm_min = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->minute; expiry_timestamp.tm_sec = g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires->seconds; /* Get difference of seconds of expiry time from 1970 (as per UTC standard) */ expiry_secs_since_1970 = (time_t) mktime(&expiry_timestamp); /* Get difference of seconds of current time from 1970 (as per UTC standard) */ current_secs_since_1970 = get_current_utc_time(); } /* Show icon depending on whether it is read,unread,read but expired and unread but expired */ if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->bIsRead == 0) { if ((expiry_secs_since_1970 > current_secs_since_1970) || (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires == NULL)) { *img_buff_p = get_image(IMG_ID_BRW_PUSH_UNREAD); } else { *img_buff_p = get_image(IMG_ID_BRW_PUSH_EXPIRED_UNREAD); } } else { if ((expiry_secs_since_1970 > current_secs_since_1970) || (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->pSIExpires == NULL)) { *img_buff_p = get_image(IMG_ID_BRW_PUSH_READ); } else { *img_buff_p = get_image(IMG_ID_BRW_PUSH_EXPIRED_READ); } } } else if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->service_flag == SERVICE_LOADING) { if (g_mmi_brw_push_cntx.service_msg_list_p[item_index]->bIsRead == 0) { *img_buff_p = get_image(IMG_ID_BRW_PUSH_UNREAD); } else { *img_buff_p = get_image(IMG_ID_BRW_PUSH_READ); } } else { /* error */ } return TRUE; }
/***************************************************************************** * FUNCTION * csb_frm_select_folder_callback * DESCRIPTION * * PARAMETERS * U32 cat_ID * RETURNS * void *****************************************************************************/ void csb_frm_select_folder_callback(void *fullpath, int is_short) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ U8 csb_drive_phone_unicode[10]; U8 csb_drive_card_unicode[10]; U8 csb_default_folder_unicode[10]; U8 temp_ascii[5]; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ UI_UNUSED_PARAMETER(is_short); sprintf((S8*)temp_ascii, "%c%s", MMI_PUBLIC_DRV, ":\\"); mmi_asc_to_ucs2((PS8) csb_drive_phone_unicode, (PS8) temp_ascii); sprintf((S8*)temp_ascii, "%c%s", MMI_CARD_DRV, ":\\"); mmi_asc_to_ucs2((PS8) csb_drive_card_unicode, (PS8) temp_ascii); mmi_asc_to_ucs2((PS8) csb_default_folder_unicode, (PS8) "CSB\\"); /* If the file path returned by FileManager is longer than MAX, show error popup */ if(fullpath) { if((mmi_ucs2strlen((char*) fullpath)) > MAX_CSB_PATH_LENGTH) { DisplayPopup((PU8) GetString(STR_ID_CSB_FILE_PATH_TOO_LONG), IMG_GLOBAL_ERROR, 1, CSB_NOTIFY_DURATION, 0); } else if(!(mmi_ucs2cmp((PS8) fullpath, (PS8) csb_drive_phone_unicode))) { /* Store the path returned by CallBack in the Global variable */ mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath); mmi_ucs2cat((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8) csb_default_folder_unicode); /* Write the updated value in NVRAM */ csb_frm_write_in_nvram(); DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0); } else if(!(mmi_ucs2cmp((PS8) fullpath, (PS8) csb_drive_card_unicode))) { /* Store the path returned by CallBack in the Global variable */ mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath); mmi_ucs2cat((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8) csb_default_folder_unicode); /* Write the updated value in NVRAM */ csb_frm_write_in_nvram(); DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0); } else { /* Store the path returned by CallBack in the Global variable */ mmi_ucs2cpy((PS8) g_CSB_struct.csb_settings.csb_screenshots_folder_path, (PS8)fullpath); /* Write the updated value in NVRAM */ csb_frm_write_in_nvram(); DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CSB_NOTIFY_DURATION, 0); } } else { GoBackHistory(); } DeleteUptoScrID(SCR_ID_CSB_TESTTOOL_SCR_ID); }
/***************************************************************************** * FUNCTION * mmi_brw_new_push_msg_ind_on_idlescreen * DESCRIPTION * Entry Function to display screen for push message arrived indication * on idle-screen. * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_brw_new_push_msg_ind_on_idlescreen(void) /* added by puneet */ { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 buf[4] = {0}; S8 pOutBuffer[8] = {0}; S8 message_string[40] = {0}; U32 brw_total_msg_count = 0; U32 brw_unread_msg_count = 0; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count); if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetActiveScreenId()) { DeleteNHistory(1); } if (0 == brw_unread_msg_count) { DisplayIdleScreen(); return; } if (brw_unread_msg_count < 10) { sprintf(buf, "%01d", brw_unread_msg_count); } else { sprintf(buf, "%02d", brw_unread_msg_count); } mmi_asc_to_ucs2(pOutBuffer, buf); mmi_ucs2cpy((S8*) message_string, pOutBuffer); mmi_ucs2cat((S8*) message_string, " "); mmi_ucs2cat((S8*) message_string, GetString(STR_ID_BRW_SERVICE_MESSAGE_RCVD)); EntryNewScreen(SCR_ID_BRW_NEW_PUSH_MESSAGE_IND, NULL, mmi_brw_new_push_msg_ind_on_idlescreen, NULL); ShowStatusIcon(STATUS_ICON_WAP); if (0 == g_keylock_context.gKeyPadLockFlag) { /* * ShowCategory154Screen( * 0, * 0, * STR_ID_BRW_READ, * IMG_GLOBAL_YES, * STR_GLOBAL_BACK, * IMG_GLOBAL_BACK, * (PU8) message_string, * 0, * IMG_NEW_MESSAGE_NOTIFICATION_MSG, * NULL); */ /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */ ShowCategory66Screen( 0, 0, STR_ID_BRW_READ, IMG_GLOBAL_YES, STR_GLOBAL_BACK, IMG_GLOBAL_BACK, (PU8) message_string, IMG_NEW_MESSAGE_NOTIFICATION_MSG, NULL); g_mmi_brw_cntx.push_msg_rcvd_flag = MMI_FALSE; if (1 == brw_unread_msg_count) { SetLeftSoftkeyFunction(mmi_brw_read_arrived_push_message, KEY_EVENT_UP); } else { SetLeftSoftkeyFunction(mmi_brw_entry_service_inbox, KEY_EVENT_UP); } SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP); } else /* Keypad is locked */ { extern void EntryScrAfterPessingRSK(void); #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) extern void EntryScrKeyPadLockOnPessingAnyKey(void); #endif /* * ShowCategory154Screen( * 0, * 0, * g_keylock_context.KeyLockLSKStringID, * g_keylock_context.KeyLockLSKIconID, * g_keylock_context.KeyLockRSKStringID, * g_keylock_context.KeyLockRSKIconID, * (PU8) message_string, * 0, * IMG_NEW_MESSAGE_NOTIFICATION_MSG, * NULL); */ /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */ ShowCategory66Screen( 0, 0, g_keylock_context.KeyLockLSKStringID, g_keylock_context.KeyLockLSKIconID, g_keylock_context.KeyLockRSKStringID, g_keylock_context.KeyLockRSKIconID, (PU8) message_string, IMG_NEW_MESSAGE_NOTIFICATION_MSG, NULL); #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) SetGroupKeyHandler( EntryScrKeyPadLockOnPessingAnyKey, (PU16) PresentAllKeys, (U8) TOTAL_KEYS, (U16) KEY_EVENT_DOWN); #endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */ #ifdef __MMI_TOUCH_SCREEN__ #ifdef __MMI_KEYPAD_LOCK_PROMPT_TEXT__ #ifdef __MMI_KEYPAD_LOCK_PATTERN_1__ SetRightSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN); #endif #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ SetLeftSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN); #endif #else /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */ ClearKeyHandler(KEY_LSK, KEY_EVENT_DOWN); ClearKeyHandler(KEY_LSK, KEY_EVENT_UP); ClearKeyHandler(KEY_RSK, KEY_EVENT_DOWN); ClearKeyHandler(KEY_RSK, KEY_EVENT_UP); #endif /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */ SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN); #else /* __MMI_TOUCH_SCREEN__ */ #ifdef __MMI_KEYPAD_LOCK_PATTERN_1__ SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN); #endif #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN); #endif #endif /* __MMI_TOUCH_SCREEN__ */ ClearKeyHandler(KEY_END, KEY_EVENT_DOWN); #ifdef __MMI_TOUCH_SCREEN__ mmi_idle_pen_block(); #endif } }