/***************************************************************************** * FUNCTION * mmi_bth_simap_connect_ind_hdler * DESCRIPTION * This function is to * * PARAMETERS * a IN/OUT first variable, used as returns * b IN second variable * RETURNS * NONE. * GLOBALS AFFECTED * external_global *****************************************************************************/ void mmi_bth_simap_connect_ind(void *msg) { bt_simap_connect_ind_struct *msg_p = (bt_simap_connect_ind_struct *)msg; U16 str_popup[60]; MMI_TRACE(MMI_CONN_TRC_G7_BT, MMI_BTH_SIMAP_CONNECT_IND, g_mmi_simap_cntx_p->state); switch (g_mmi_simap_cntx_p->state) { case MMI_BTH_SIMAP_STAT_AUTHORIZED: { if (g_mmi_simap_cntx_p->bt_addr.lap != msg_p->lap || g_mmi_simap_cntx_p->bt_addr.uap != msg_p->uap || g_mmi_simap_cntx_p->bt_addr.nap != msg_p->nap) { MMI_ASSERT(0); } g_mmi_simap_cntx_p->connect_id = msg_p->cid; g_mmi_simap_cntx_p->state = MMI_BTH_SIMAP_STAT_CONNECT; srv_bt_cm_connect_ind(g_mmi_simap_cntx_p->cmgr_id); kal_wsprintf( str_popup, "%w%w", (WCHAR*)GetString(STR_BT_PROF_SAP), (WCHAR*)GetString(STR_BT_CONN_ED) ); mmi_frm_nmgr_popup(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_SUCCESS, (WCHAR*)str_popup); } } }
/***************************************************************************** * FUNCTION * mmi_bth_simap_disconnect_ind_hdler * DESCRIPTION * This function is to * * PARAMETERS * a IN/OUT first variable, used as returns * b IN second variable * RETURNS * NONE. * GLOBALS AFFECTED * external_global *****************************************************************************/ void mmi_bth_simap_disconnect_ind(void *msg) { U16 string[60]; MMI_TRACE(MMI_CONN_TRC_G7_BT, MMI_BTH_SIMAP_DISCONNECT_IND, g_mmi_simap_cntx_p->state); switch (g_mmi_simap_cntx_p->state) { case MMI_BTH_SIMAP_STAT_AUTHORIZING: case MMI_BTH_SIMAP_STAT_AUTHORIZED: { mmi_bt_authorize_screen_close(SRV_BT_CM_SIM_ACCESS_PROFILE_UUID); g_mmi_simap_cntx_p->state = MMI_BTH_SIMAP_STAT_ACTIVATE; break; } case MMI_BTH_SIMAP_STAT_DEACTIVATING: { g_mmi_simap_cntx_p->state = MMI_BTH_SIMAP_STAT_IDLE; break; } default: { mmi_wcscpy((WCHAR *)string, (const WCHAR *) GetString(STR_BT_PROF_SAP)); mmi_wcscat((WCHAR *)string, (const WCHAR *)GetString(STR_BT_DISCON_ED)); mmi_frm_nmgr_popup(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_FAILURE, (WCHAR *)string); g_mmi_simap_cntx_p->state = MMI_BTH_SIMAP_STAT_ACTIVATE; break; } } srv_bt_cm_stop_conn(g_mmi_simap_cntx_p->cmgr_id); g_mmi_simap_cntx_p->cmgr_id = 0; g_mmi_simap_cntx_p->connect_id = 0; g_mmi_simap_cntx_p->bt_addr.lap = 0; g_mmi_simap_cntx_p->bt_addr.uap = 0; g_mmi_simap_cntx_p->bt_addr.nap = 0; }
VMINT vm_common_ui_show(vm_common_ui_info_struct *ui_info) { #ifdef __MMI_NCENTER_SUPPORT__ mmi_frm_notification_para_struct notification; #endif mmi_event_notify_enum nmgr_popup_event; VMINT ret = VM_COMMON_UI_OK; MMI_TRACE(MMI_MRE_TRC_MOD_COMMONUI, TRC_MRE_COMMON_UI_BASIC_INFO, ui_info->ui_type, ui_info->behavior_mask); if (ui_info->ui_type == VM_COMMON_UI_TYPE_BALLOON) { #ifdef __COSMOS_MMI_PACKAGE__ mmi_frm_nmgr_balloon(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_INFO_BALLOON, MMI_NMGR_BALLOON_TYPE_INFO, (WCHAR *)(ui_info->balloon_para.display_string)); #else if (ui_info->behavior_mask & VM_COMMON_UI_MASK_NO_SHOW_UNSUPPORTED) { ret = VM_COMMON_UI_ERROR_UNSUPPORTED; } else { mmi_frm_nmgr_popup(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_INFO, (WCHAR *)(ui_info->balloon_para.display_string)); } #endif } else if (ui_info->ui_type == VM_COMMON_UI_TYPE_TEXT_PREVIEW) { #ifdef __MMI_NCENTER_SUPPORT__ notification.text = (WCHAR *)(ui_info->text_preview_para.display_string); notification.option = 0; mmi_frm_nmgr_notify(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_GENERAL_PREVIEW, ¬ification); #else if (ui_info->behavior_mask & VM_COMMON_UI_MASK_NO_SHOW_UNSUPPORTED) { ret = VM_COMMON_UI_ERROR_UNSUPPORTED; } else { mmi_frm_nmgr_popup(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_INFO, (WCHAR *)(ui_info->text_preview_para.display_string)); } #endif } else if (ui_info->ui_type == VM_COMMON_UI_TYPE_POPUP) { MMI_TRACE(MMI_MRE_TRC_MOD_COMMONUI, TRC_MRE_COMMON_UI_POPUP_INFO, ui_info->popup_para.popup_type); #ifdef __COSMOS_MMI_PACKAGE__ mmi_frm_nmgr_balloon(MMI_SCENARIO_ID_DEFAULT, MMI_EVENT_INFO_BALLOON, MMI_NMGR_BALLOON_TYPE_INFO, (WCHAR *)(ui_info->popup_para.display_string)); #else nmgr_popup_event = popup_type_mapping_evt_table[ui_info->popup_para.popup_type]; mmi_frm_nmgr_popup(MMI_SCENARIO_ID_DEFAULT, nmgr_popup_event, (WCHAR *)(ui_info->popup_para.display_string)); #endif } else if (ui_info->ui_type == VM_COMMON_UI_TYPE_CONFIRM) { MMI_TRACE(MMI_MRE_TRC_MOD_COMMONUI, TRC_MRE_COMMON_UI_CONFIRM_INFO, ui_info->confirm_popup_para.confirm_type, ui_info->confirm_popup_para.confirm_popup_type); ret = vm_nmgr_confirm_popup(ui_info); } else { ret = VM_COMMON_UI_ERROR_WRONG_PARAM; } return ret; }