/***************************************************************************** * FUNCTION * uem_send_bmtmsg_to_uem * DESCRIPTION * * PARAMETERS * msg_name [IN] * RETURNS * void *****************************************************************************/ void uem_send_bmtmsg_to_uem(kal_uint32 msg_name, ...) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ kal_uint32 cause; va_list varpars; drvuem_pmic_ind_struct *pmic_ind_struct; bmt_adc_measure_done_conf_struct *bmd_adc_done; bmt_adc_measure_done_conf_struct *ilm_bmd_adc_done; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ switch (msg_name) { case MSG_ID_BMT_ADC_MEASURE_DONE_CONF: { va_start(varpars, msg_name); bmd_adc_done = (bmt_adc_measure_done_conf_struct*) va_arg(varpars, kal_uint32); va_end(varpars); ilm_ptr = allocate_ilm(MOD_BMT); ilm_ptr->msg_id = (kal_uint16) MSG_ID_BMT_ADC_MEASURE_DONE_CONF; ilm_ptr->peer_buff_ptr = NULL; ilm_bmd_adc_done = bmt_adc_measure_done_conf_struct*) construct_local_para( sizeof(bmt_adc_measure_done_conf_struct), TD_CTRL); ilm_bmd_adc_done->adc_sche_id = bmd_adc_done->adc_sche_id; ilm_bmd_adc_done->adc_value = bmd_adc_done->adc_value; ilm_bmd_adc_done->volt = bmd_adc_done->volt; ilm_ptr->local_para_ptr = (local_para_struct*) ilm_bmd_adc_done; break; } case MSG_ID_DRVUEM_PMIC_IND: { va_start(varpars, msg_name); cause = (kal_uint32) va_arg(varpars, kal_uint32); va_end(varpars); ilm_ptr = allocate_ilm(MOD_BMT); ilm_ptr->msg_id = (kal_uint16) MSG_ID_DRVUEM_PMIC_IND; ilm_ptr->peer_buff_ptr = NULL; pmic_ind_struct = (drvuem_pmic_ind_struct*) construct_local_para(sizeof(drvuem_pmic_ind_struct), TD_CTRL); pmic_ind_struct->status = (BMT_CHR_STAT) cause; ilm_ptr->local_para_ptr = (local_para_struct*) pmic_ind_struct; break; } } SEND_ILM(MOD_BMT, MOD_UEM, DRIVER_PS_SAP, ilm_ptr); return; }
//----------------------------------------------------------------------------- int gps_soc_request_abort(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (gps_soc_transaction.socket_id >= 0) { ilm_struct *ilm_send = NULL; int ret; ret = soc_close(gps_soc_transaction.socket_id); gps_soc_log("soc_close result: %d", ret); kal_sleep_task(250); soc_close_nwk_account_by_id(MOD_GPS_TCPIP, gps_soc_transaction.nwt_acount_id); /* close socket and disconnect bearer here */ ilm_send = allocate_ilm(MOD_GPS_TCPIP); ilm_send->msg_id = MSG_ID_APP_SOC_DEACTIVATE_REQ; ilm_send->peer_buff_ptr = NULL; ilm_send->local_para_ptr = NULL; SEND_ILM(MOD_GPS_TCPIP, MOD_SOC, SOC_APP_SAP, ilm_send); } gps_soc_transaction.post_retry_counter = 0; gps_soc_stop_timer(); return 0; }
/***************************************************************************** * FUNCTION * vis_send_decode_visual_data_ind * DESCRIPTION * This function is to send decode visual data indication message. * PARAMETERS * event [IN] * RETURNS * void *****************************************************************************/ void vis_send_decode_visual_data_ind(kal_uint8 event) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ media_decode_visual_data_ind_struct *ind_p; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ind_p = (media_decode_visual_data_ind_struct*) construct_local_para(sizeof(media_decode_visual_data_ind_struct), TD_CTRL); ind_p->event = event; ilm_ptr = allocate_ilm(MOD_VISUAL_HISR); ilm_ptr->src_mod_id = MOD_VISUAL_HISR; ilm_ptr->dest_mod_id = MOD_MED_V; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_DECODE_VISUAL_DATA_IND; ilm_ptr->local_para_ptr = (local_para_struct*) ind_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
/***************************************************************************** * FUNCTION * mmi_mms_bgsr_get_msg_info_cb * DESCRIPTION * * PARAMETERS * filepath [IN] * RETURNS * file size *****************************************************************************/ void mmi_mms_bgsr_get_msg_info_cb(U32 msg_id, mmi_mms_bgsr_msg_info_struct *msg_info) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ struct ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ /* Write your code here */ ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_NAV_ACTIVATE_BGSR_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); return; }
/***************************************************************************** * FUNCTION * jbt_cmd_kick_check_list * DESCRIPTION * * PARAMETERS * void * RETURNS * void *****************************************************************************/ void jbt_cmd_kick_check_list(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilmPtr; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ kal_take_sem(jbt_cmd_kick_sem, KAL_INFINITE_WAIT); kal_trace(TRACE_FUNC, JBT_JBT_CMD_KICK_CHECK_LIST); kal_trace(TRACE_JBT_GROUP, JBT_JBT_CMD_QUEUE_CONTEXTQUEUE_KICK_OFF_D, jbt_cmd_queue_context.queue_kick_off); if (jbt_cmd_queue_context.queue_kick_off != 1) { jbt_cmd_queue_context.queue_kick_off = 1; ilmPtr = allocate_ilm(MOD_JASYN); ilmPtr->msg_id = MSG_ID_BT_JSR_KICK_NEW_COMMAND; ilmPtr->local_para_ptr = NULL; ilmPtr->peer_buff_ptr = NULL; ilmPtr->dest_mod_id = MOD_JASYN; ilmPtr->src_mod_id = MOD_JASYN; ilmPtr->sap_id = BT_APP_SAP; msg_send_ext_queue(ilmPtr); } kal_give_sem(jbt_cmd_kick_sem); }
/***************************************************************************** * FUNCTION * vis_send_record_finish_ind * DESCRIPTION * This function is to send visual record finish indication message. * PARAMETERS * result [IN] * RETURNS * void *****************************************************************************/ void vis_send_record_finish_ind(kal_int16 result) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ media_visual_record_finish_ind_struct *ind_p; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ind_p = (media_visual_record_finish_ind_struct*) construct_local_para(sizeof(media_visual_record_finish_ind_struct), TD_CTRL); ind_p->result = result; ilm_ptr = allocate_ilm(MOD_MED_V); ilm_ptr->src_mod_id = MOD_MED_V; ilm_ptr->dest_mod_id = MOD_MED; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_VISUAL_RECORD_FINISH_IND; ilm_ptr->local_para_ptr = (local_para_struct*) ind_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
/***************************************************************************** * FUNCTION * vis_send_stop_cnf * DESCRIPTION * This function is to send visual stop confirm message. * PARAMETERS * result [IN] * RETURNS * void *****************************************************************************/ void vis_send_stop_cnf(kal_int16 result) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ media_visual_stop_cnf_struct *msg_p = NULL; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ msg_p = (media_visual_stop_cnf_struct*) construct_local_para(sizeof(media_visual_stop_cnf_struct), TD_CTRL); ilm_ptr = allocate_ilm(MOD_MED_V); ilm_ptr->src_mod_id = MOD_MED_V; ilm_ptr->dest_mod_id = MOD_MED; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_VISUAL_STOP_CNF; ilm_ptr->local_para_ptr = (local_para_struct*) msg_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
/***************************************************************************** * FUNCTION * vis_send_play_finish_ind * DESCRIPTION * This function is to send visual play finish indication message. * PARAMETERS * result [IN] * RETURNS * void *****************************************************************************/ void vis_send_play_finish_ind(kal_int16 result) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ media_visual_play_finish_ind_struct *ind_p; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ kal_trace(TRACE_GROUP_4, VIS_TRC_SEND_PLAY_FINISH_IND); med_debug_print_result(result); ind_p = (media_visual_play_finish_ind_struct*) construct_local_para(sizeof(media_visual_play_finish_ind_struct), TD_CTRL); ind_p->result = result; ilm_ptr = allocate_ilm(MOD_MED_V); ilm_ptr->src_mod_id = MOD_MED_V; ilm_ptr->dest_mod_id = MOD_MED; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_VISUAL_PLAY_FINISH_IND; ilm_ptr->local_para_ptr = (local_para_struct*) ind_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
static void msf_sas_send_dl_ind(MSF_UINT8 mod_src, MSF_UINT8 data_type, const char *url, const char *mime_type, const kal_uint8 *file_name) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; mmi_da_dispatch_file_req_struct *p; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ p = (mmi_da_dispatch_file_req_struct*) construct_local_para(sizeof(mmi_da_dispatch_file_req_struct), TD_RESET); p->mime_type = 0; p->mime_subtype = 0; memset(p->url, 0, sizeof(p->url)); if (mod_src == MSF_MODID_PHS) { p->action = MMI_DA_PUSH; } else if (mod_src == MSF_MODID_SMA || mod_src == MSF_MODID_MEA) { p->action = MMI_DA_SAVE_AS; strcpy((char *)p->url, "mms://"); } else if (data_type == MsfResourceFile) { p->action = MMI_DA_SAVE_AS; } else { p->action = MMI_DA_WAP_DOWNLOAD; if (strlen(url) > 0) { strncpy((char *)p->url, url, strlen(url) > sizeof(p->url) ? sizeof(p->url) : strlen(url)); } else { strcpy((char *)p->url, "http://"); } } memset(p->filepath, 0, sizeof(p->filepath)); widget_ucs2_strcpy((kal_uint8*) p->filepath, (const kal_uint8*)file_name); strcpy((char *)p->mime_type_string, (const char*)mime_type); ilm_ptr = allocate_ilm(MOD_WAP); ilm_ptr->msg_id = (kal_uint16) MSG_ID_MMI_DA_DISPATCH_FILE_REQ; /* Set the message id */ ilm_ptr->peer_buff_ptr = NULL; /* there are no peer message */ ilm_ptr->local_para_ptr = (local_para_struct*) p; SEND_ILM(MOD_WAP, MOD_MMI, WAP_MMI_SAP, ilm_ptr); return; }
void das_send_file_dl_progress_ind(int session_id) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; wap_mmi_file_dl_progress_ind_struct *p; das_job_t *job; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ job = das_find_job_by_session_id(session_id); p = (wap_mmi_file_dl_progress_ind_struct*) construct_local_para(sizeof(wap_mmi_file_dl_progress_ind_struct), TD_RESET); p->session_id = session_id; if(!job) { p->seq_num = 0; p->acc_size = 0; } else { if(job->status == DAS_STATUS_DOWNLOADING) { p->status = WAP_DL_STATUS_DOWNLOADING; p->cause = WAP_DL_ERROR_OK; } else if(job->status == DAS_STATUS_COMPLETE) { p->status = WAP_DL_STATUS_COMPLETE; p->cause = WAP_DL_ERROR_OK; } else { p->status = WAP_DL_STATUS_ABORTED; p->cause = job->cause; } p->seq_num = ++job->seq_num; p->acc_size = job->download_size; job->indication_sent = TRUE; job->status = DAS_STATUS_WAITING; } ilm_ptr = allocate_ilm(MOD_WAP); ilm_ptr->msg_id = (kal_uint16) MSG_ID_WAP_MMI_FILE_DL_PROGRESS_IND; /* Set the message id */ ilm_ptr->peer_buff_ptr = NULL; /* there are no peer message */ ilm_ptr->local_para_ptr = (local_para_struct*) p; SEND_ILM(MOD_WAP, MOD_MMI, WAP_MMI_SAP, ilm_ptr); return; }
/************************************************************** FUNCTION NAME : OslIntMsgSendExtQueue PURPOSE : Writes to Task External Queue INPUT PARAMETERS : nil OUTPUT PARAMETERS : nil RETURNS : nil **************************************************************/ void OslIntMsgSendExtQueue(MYQUEUE *Message) { #ifdef MMI_ON_HARDWARE_P MYQUEUE *oslMessage; oslMessage = allocate_ilm(Message->oslSrcId); memcpy(oslMessage, Message, sizeof(MYQUEUE)); oslMessage->sap_id=INVALID_SAP; #if 1 do { COS_EVENT ev; ev.nEventId = oslMessage->msg_id; ev.nParam1 = (UINT32)oslMessage; ev.nParam3 = oslMessage->dest_mod_id; SEND_COSMSG(oslMessage->dest_mod_id, &ev); } while (0); #else msg_send_ext_queue(oslMessage); #endif CheckAndPrintMsgId (Message->msg_id); #else if(Message->oslDestId==MOD_MMI) Message->oslDestId=MOD_PRT; if(Message->oslSrcId==MOD_MMI) Message->oslSrcId=MOD_PRT; if(Message->oslDestId==MOD_WAP) Message->oslDestId=MOD_PRT; // Add by zhuoxz,2009-6-19 if (Message->oslDestId==MOD_L4C) Message->oslDestId=MOD_PST; if(Message->oslSrcId==MOD_L4C) Message->oslSrcId=MOD_PST; if (Message->oslDestId==MOD_L4C_2) Message->oslDestId=MOD_PST_2; if(Message->oslSrcId==MOD_L4C_2) Message->oslSrcId=MOD_PST_2; if (Message->oslDestId == MOD_PST || Message->oslDestId == MOD_PST_2) { OslIntWriteMsgQ(task_info_g1[MOD_PST].task_ext_qid, Message, sizeof(MYQUEUE), OSL_INFINITE_WAIT); } else { OslIntWriteMsgQ(task_info_g1[Message->oslDestId].task_ext_qid, Message, sizeof(MYQUEUE), OSL_INFINITE_WAIT); } #endif }
/* * FUNCTION * l4a_sendmsg_ilm * DESCRIPTION * get an ilm structure and send to dest module. * * CALLS * l4a_send_msg_ft[] * PARAMETERS * src: source module * dest: destination module * msg: message id which is defined in mmi_sap.h * param: an ilm message structure pointer * RETURNS * none * GLOBALS AFFECTED * none */ void l4a_sendmsg_ilm(module_type src,module_type dest,msg_type msg,void *param) { ilm_struct *ilm_ptr = NULL; /* First allocate a memory for an interlayer message structure */ ilm_ptr = allocate_ilm( src ); ilm_ptr->msg_id = (kal_uint16) msg;/* Set the message id */ ilm_ptr->peer_buff_ptr = NULL;/* there are no peer message */ ilm_ptr->local_para_ptr = (local_para_struct *)param; SEND_ILM(src,dest,MMI_L4C_SAP,ilm_ptr); }
/******************************************************************************* * * Local Functions * *******************************************************************************/ ilm_struct * FTC_ALLOC_MSG(kal_uint16 size) { ilm_struct *ilm_ptr = NULL; if( NULL == (ilm_ptr=allocate_ilm(MOD_FTC)) ) { return NULL; } ilm_ptr->local_para_ptr = NULL; ilm_ptr->peer_buff_ptr = NULL; if( 0 < size ) { if( NULL == (ilm_ptr->local_para_ptr=construct_local_para(size, TD_CTRL)) ) { cancel_ilm(MOD_FTC); return NULL; } } return ilm_ptr; }
static void e_compass_write_nvram(E_CompassSensorCalibratedDataStruct *calibrated_data) { ilm_struct *ec_ilm_ptr = 0; void *parm_stream = 0; void *data_stream = 0; kal_uint16 pdu_len; nvram_ef_ecompass_calibration ec_nvram; module_type module_id; module_id = MOD_EC_TASK; /* for now we just save three fields */ ec_nvram.usr_moffset_x = calibrated_data->usr_moffset_x; ec_nvram.usr_moffset_y = calibrated_data->usr_moffset_y; ec_nvram.usr_moffset_z = calibrated_data->usr_moffset_z; ec_nvram.cali_result = calibrated_data->cali_result; ec_nvram.x_axis_sensitivity = calibrated_data->x_axis_sensitivity; ec_nvram.y_axis_sensitivity = calibrated_data->y_axis_sensitivity; ec_nvram.x_max = calibrated_data->x_max; ec_nvram.y_max = calibrated_data->y_max; ec_nvram.x_min = calibrated_data->x_min; ec_nvram.y_min = calibrated_data->y_min; /* E_COMPASS_DEBUG_OUTPUT("Calibrated result usr_moffset_x = %d, usr_moffset_y = %d, usr_moffset_z = %d, misc = %d", ec_nvram.usr_moffset_x, ec_nvram.usr_moffset_y, ec_nvram.usr_moffset_z, 0); */ drv_trace4(TRACE_GROUP_10, EC_NVRAM_SAVE, ec_nvram.usr_moffset_x, ec_nvram.usr_moffset_y, ec_nvram.usr_moffset_z, ec_nvram.cali_result); ec_ilm_ptr = allocate_ilm(module_id); ec_ilm_ptr->msg_id = MSG_ID_NVRAM_WRITE_REQ; parm_stream = construct_local_para(sizeof(nvram_write_req_struct), TD_CTRL); data_stream = construct_peer_buff(sizeof(nvram_ef_ecompass_calibration), 0, 0, TD_CTRL); ((nvram_write_req_struct*) parm_stream)->file_idx = NVRAM_EF_ECOMPASS_DATA_LID; ((nvram_write_req_struct*) parm_stream)->para = 1; pdu_len = sizeof(nvram_ef_ecompass_calibration); kal_mem_cpy(get_pdu_ptr(data_stream, &pdu_len), (void*)&ec_nvram, sizeof(nvram_ef_ecompass_calibration)); ec_ilm_ptr->local_para_ptr = (local_para_struct*) parm_stream; ec_ilm_ptr->peer_buff_ptr = (peer_buff_struct*) data_stream; ec_ilm_ptr->src_mod_id = module_id; ec_ilm_ptr->dest_mod_id = MOD_NVRAM; ec_ilm_ptr->sap_id = PS_NVRAM_SAP; msg_send_ext_queue(ec_ilm_ptr); }
/***************************************************************************** * FUNCTION * drmt_mmi_send_ilm * DESCRIPTION * * PARAMETERS * local_para_ptr [?] [?] [?] * peer_buff_ptr [?] [?] [?] * ilm_id [IN] * dst_id(?) [IN](?) * RETURNS * void *****************************************************************************/ static void drmt_mmi_send_ilm(void *local_para_ptr, void *peer_buff_ptr, msg_type ilm_id) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ilm_ptr = allocate_ilm(MOD_DRMT); ilm_ptr->local_para_ptr = (local_para_struct*) local_para_ptr; ilm_ptr->msg_id = ilm_id; ilm_ptr->peer_buff_ptr = (peer_buff_struct*) peer_buff_ptr; SEND_ILM(MOD_DRMT, MOD_MMI, DRMT_MMI_SAP, ilm_ptr); }
static void send_message(void *local_para_ptr, void *peer_buff_ptr, msg_type ilm_id, module_type dst_id) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->local_para_ptr = (local_para_struct*) local_para_ptr; ilm_ptr->msg_id = ilm_id; ilm_ptr->peer_buff_ptr = (peer_buff_struct*) peer_buff_ptr; SEND_ILM(MOD_MMI, dst_id, MMI_GADGET_SAP, ilm_ptr); }
/***************************************************************************** * FUNCTION * sppa_sendData * DESCRIPTION * send data to SPP * PARAMETERS * owner [IN] * port [IN] * RETURNS * void *****************************************************************************/ #ifdef BTMTK_ON_WISE /*SPP_PORTING*/ void sppa_sendData(module_type owner, UART_PORT port) { ilm_struct *ilm; bt_spp_send_data_req_struct *pLocal; ilm = allocate_ilm(owner); pLocal = (bt_spp_send_data_req_struct*) construct_local_para(sizeof(bt_spp_send_data_req_struct), TD_UL); pLocal->port = port; ilm->dest_mod_id = MOD_BT; ilm->sap_id = 0; ilm->src_mod_id = owner; ilm->msg_id = MSG_ID_BT_SPP_SEND_DATA_REQ; ilm->peer_buff_ptr = NULL; ilm->local_para_ptr = (local_para_struct*) pLocal; msg_send_ext_queue(ilm); }
void GPSLocateNvramRepeatHandler(GPSAppTimerID_t Id) { ilm_struct *send_ilm; kal_uint16 src_mod; src_mod = stack_int_get_active_module_id(); send_ilm = allocate_ilm(src_mod); send_ilm->src_mod_id = src_mod; #ifdef GPS_NVRAM_TASK send_ilm->dest_mod_id = MOD_GPS_NVRAM; #else send_ilm->dest_mod_id = MOD_GPS_APP_TASK; #endif send_ilm->msg_id = MSG_ID_GPSLOCATE_NVRAMSTORE_IND; send_ilm->local_para_ptr = NULL; msg_send_ext_queue(send_ilm); }
void SPPOS_sendMsg( msg_type msg, module_type dstMod, sap_type sap, local_para_struct *local_para, peer_buff_struct *peer_buff) { ilm_struct *ilmPtr; ilmPtr = allocate_ilm(MOD_BT); ilmPtr->msg_id = msg; ilmPtr->local_para_ptr = local_para; ilmPtr->peer_buff_ptr = peer_buff; ilmPtr->dest_mod_id = dstMod; ilmPtr->src_mod_id = MOD_BT; ilmPtr->sap_id = sap; msg_send_ext_queue(ilmPtr); }
/***************************************************************************** * FUNCTION * bitstream_send_msg * DESCRIPTION * * PARAMETERS * * RETURNS * *****************************************************************************/ void bitstream_send_msg(module_type src_id, module_type dst_id, kal_uint16 msg_id, void *local_param_ptr) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = allocate_ilm(src_id); /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ilm_ptr->src_mod_id = src_id; ilm_ptr->dest_mod_id = dst_id; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) msg_id; ilm_ptr->local_para_ptr = (local_para_struct*) local_param_ptr; ilm_ptr->peer_buff_ptr = (peer_buff_struct*) NULL; msg_send_ext_queue(ilm_ptr); }
/***************************************************************************** * FUNCTION * mmi_mms_cancel_download_rsp_callback * DESCRIPTION * * PARAMETERS * filepath [IN] * RETURNS * file size *****************************************************************************/ void mmi_mms_cancel_download_rsp_callback(U32 msg_id, U8 result) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ struct ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ /* Write your code here */ mmi_mms_bgsr_result = result; ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_CANCEL_DOWNLOAD_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); return; }
/***************************************************************************** * FUNCTION * vis_send_encode_visual_data_ind * DESCRIPTION * This function is to send encode visual data indication message. * PARAMETERS * event [IN] * RETURNS * void *****************************************************************************/ void vis_send_encode_visual_data_ind(kal_uint8 event) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ media_encode_visual_data_ind_struct *ind_p; ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (event == VIDEO_ENC_EVENT_COUNT_FILE_SIZE) { if (vid_evaluate_residual_size(video_enc_get_bitstream_file_size()) == 0) { video_enc_stop_record(); event = VIDEO_ENC_EVENT_COMPLETE; } else { return; } } ind_p = (media_encode_visual_data_ind_struct*) construct_local_para(sizeof(media_encode_visual_data_ind_struct), TD_CTRL); ind_p->event = event; ilm_ptr = allocate_ilm(MOD_VISUAL_HISR); ilm_ptr->src_mod_id = MOD_VISUAL_HISR; ilm_ptr->dest_mod_id = MOD_MED_V; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_ENCODE_VISUAL_DATA_IND; ilm_ptr->local_para_ptr = (local_para_struct*) ind_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
static void das_send_dl_stop_rsp(int session_id) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; wap_mmi_file_dl_stop_rsp_struct *p; das_job_t *job; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ p = (wap_mmi_file_dl_stop_rsp_struct*) construct_local_para(sizeof(wap_mmi_file_dl_stop_rsp_struct), TD_RESET); p->session_id = session_id; p->status = WAP_DL_STATUS_CANCELLED; job = das_find_job_by_session_id(session_id); if(!job) { p->seq_num = 0; p->cause = WAP_DL_ERROR_INVALID_SESSION_ID; p->acc_size = 0; } else { p->seq_num = ++job->seq_num; p->cause = WAP_DL_ERROR_CANCELLED; p->acc_size = job->download_size; } ilm_ptr = allocate_ilm(MOD_WAP); ilm_ptr->msg_id = (kal_uint16) MSG_ID_WAP_MMI_FILE_DL_STOP_RSP; /* Set the message id */ ilm_ptr->peer_buff_ptr = NULL; /* there are no peer message */ ilm_ptr->local_para_ptr = (local_para_struct*) p; SEND_ILM(MOD_WAP, MOD_MMI, WAP_MMI_SAP, ilm_ptr); return; }
/***************************************************************************** * FUNCTION * vis_send_error_recover_ind * DESCRIPTION * This function is to send error recover indication message to Media task. * PARAMETERS * void * RETURNS * void *****************************************************************************/ void vis_send_error_recover_ind(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ ilm_ptr = allocate_ilm(MOD_MED_V); ilm_ptr->src_mod_id = MOD_MED_V; ilm_ptr->dest_mod_id = MOD_MED; ilm_ptr->sap_id = MED_SAP; ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_VID_ERROR_RECOVER_IND; ilm_ptr->local_para_ptr = NULL; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); }
/***************************************************************************** * FUNCTION * bpp_adp_send_msg2app * DESCRIPTION * This function send msg to bpp app(mmi) * PARAMETERS * msg_id [IN] * wparam [?] [?] * RETURNS * void *****************************************************************************/ static void bpp_adp_send_msg2app(kal_uint16 msg_id, local_para_struct *wparam) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ #ifdef __ON_MAUI__ ilm_struct *ilm_send = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ BT_BPP_TRACE_INFO_ARG1(BPP_ADP_SEND_MSG2APP, msg_id); ilm_send = allocate_ilm(MOD_BT); ilm_send->src_mod_id = MOD_BT; ilm_send->dest_mod_id = MOD_MMI; ilm_send->sap_id = BT_BPP_SAP; ilm_send->msg_id = (kal_uint16) msg_id; ilm_send->local_para_ptr = (local_para_struct*) wparam; ilm_send->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_send); #else U16 msg_len; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ BT_BPP_TRACE_INFO_ARG1(BPP_ADP_SEND_MSG2APP, msg_id); msg_len = wparam ? ((local_para_struct*)wparam)->msg_len : 0; BT_SendMessage(msg_id, MOD_MMI, wparam, msg_len); #endif }
/***************************************************************************** * FUNCTION * nvram_send_ilm * DESCRIPTION * This is nvram_send_ilm function of NVRAM module. * PARAMETERS * dest_id [IN] * msg_id [IN] * local_param_ptr [?] * peer_buf_ptr [?] * ilm_ptr(?) [IN] The primitives * RETURNS * void *****************************************************************************/ void nvram_send_ilm(module_type dest_id, msg_type msg_id, void *local_param_ptr, void *peer_buf_ptr) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (dest_id == MOD_RTC_HISR || dest_id == MOD_SIM) { if (local_param_ptr) free_ctrl_buffer(local_param_ptr); if (peer_buf_ptr) free_peer_buff(peer_buf_ptr); return; } ilm_ptr = allocate_ilm(MOD_NVRAM); ASSERT(ilm_ptr != NULL); ilm_ptr->src_mod_id = MOD_NVRAM; ilm_ptr->msg_id = msg_id; ilm_ptr->local_para_ptr = (local_para_struct*) local_param_ptr; ilm_ptr->peer_buff_ptr = (peer_buff_struct*) peer_buf_ptr; ilm_ptr->dest_mod_id = dest_id; ilm_ptr->sap_id = PS_NVRAM_SAP; /** * Sigh, since SEND_ILM is a macro uses ## directive, * the formal parameter of dest_mod_id must be hardcoded. * So NVRAM DOES NOT use it. >=P */ msg_send_ext_queue(ilm_ptr); } /* End of nvram_send_ilm */
/***************************************************************************** * FUNCTION * mmi_bt_avrcp_tst_only_down_cmd * DESCRIPTION * Test when only down cmd comes witout up cmd * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_bt_avrcp_tst_only_down_cmd() { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ bt_avrcp_cmd_frame_ind_res_struct* msg_p = (bt_avrcp_cmd_frame_ind_res_struct*) construct_local_para(sizeof(bt_avrcp_cmd_frame_ind_res_struct), TD_CTRL); /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ msg_p->chnl_num = BT_AVRCP_TG ; msg_p->profile_id = 0; msg_p->seq_id = 0; msg_p->c_type = 0; msg_p->data_len = 1; /*assign a value that's larger than 0*/ msg_p->subunit_id = BT_AVRCP_SUBUNIT_ID_PASS_THROUGH; msg_p->subunit_type = BT_AVRCP_SUBUNIT_TYPE_PASS_THROUGH; msg_p->frame_data[0] = BT_AVRCP_OP_PASS_THROUGH; msg_p->frame_data[1] = MMI_AVRCP_POP_STOP; //MMI_AVRCP_POP_PLAY ; /*play button down*/ /*send msg*/ { ilm_struct *ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->src_mod_id = MOD_MMI; ilm_ptr->dest_mod_id = MOD_MMI; ilm_ptr->sap_id = BT_AVRCP_SAP; ilm_ptr->msg_id = (msg_type)MSG_ID_BT_AVRCP_CMD_FRAME_IND; ilm_ptr->local_para_ptr = (local_para_struct*)msg_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); } }
/***************************************************************************** * FUNCTION * mmi_bt_avrcp_tst_same_down_cmd * DESCRIPTION * Test when same down cmd comes before previous down cmd times up * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_bt_avrcp_tst_same_down_cmd() { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ bt_avrcp_cmd_frame_ind_res_struct* msg_p = (bt_avrcp_cmd_frame_ind_res_struct*) construct_local_para(sizeof(bt_avrcp_cmd_frame_ind_res_struct), TD_CTRL); /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ msg_p->chnl_num = BT_AVRCP_TG ; msg_p->profile_id = 0; msg_p->seq_id = 0; msg_p->c_type = 0; msg_p->data_len = 1; /*assign a value that's larger than 0*/ msg_p->subunit_id = BT_AVRCP_SUBUNIT_ID_PASS_THROUGH; msg_p->subunit_type = BT_AVRCP_SUBUNIT_TYPE_PASS_THROUGH; msg_p->frame_data[0] = BT_AVRCP_OP_PASS_THROUGH; if(avrcp_test_counter <4) { if(avrcp_forward%2) { msg_p->frame_data[1] = MMI_AVRCP_POP_FORWARD; /*stop button down*/ } else { msg_p->frame_data[1] = MMI_AVRCP_POP_BACKWARD; /*stop button down*/ } } else { if(avrcp_forward%2) { msg_p->frame_data[1] = MMI_AVRCP_POP_FORWARD| 0x80; /*stop button up*/ } else { msg_p->frame_data[1] = MMI_AVRCP_POP_BACKWARD| 0x80; /*stop button up*/ } avrcp_forward ++ ; } /*send msg*/ { ilm_struct *ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->src_mod_id = MOD_MMI; ilm_ptr->dest_mod_id = MOD_MMI; ilm_ptr->sap_id = BT_AVRCP_SAP; ilm_ptr->msg_id = (msg_type)MSG_ID_BT_AVRCP_CMD_FRAME_IND; ilm_ptr->local_para_ptr = (local_para_struct*)msg_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); } if( avrcp_test_counter < 4 ) { avrcp_test_counter ++ ; StartTimer(BT_AVRCP_TEST_TIMER, 1000, (FuncPtr)mmi_bt_avrcp_tst_same_down_cmd); } else { avrcp_test_counter = 0; } }
/***************************************************************************** * FUNCTION * mmi_bt_avrcp_tst_different_down_cmd * DESCRIPTION * Test when different down cmd comes before previous down cmd times up * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_bt_avrcp_tst_different_down_cmd() { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ bt_avrcp_cmd_frame_ind_res_struct* msg_p = (bt_avrcp_cmd_frame_ind_res_struct*) construct_local_para(sizeof(bt_avrcp_cmd_frame_ind_res_struct), TD_CTRL); /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ msg_p->chnl_num = BT_AVRCP_TG ; msg_p->profile_id = 0; msg_p->seq_id = 0; msg_p->c_type = 0; msg_p->data_len = 1; /*assign a value that's larger than 0*/ msg_p->subunit_id = BT_AVRCP_SUBUNIT_ID_PASS_THROUGH; msg_p->subunit_type = BT_AVRCP_SUBUNIT_TYPE_PASS_THROUGH; msg_p->frame_data[0] = BT_AVRCP_OP_PASS_THROUGH; switch(avrcp_test_counter) { case 0 : { msg_p->frame_data[1] = MMI_AVRCP_POP_PLAY ; /*play button down*/ avrcp_test_counter ++ ; } break; case 1 : { msg_p->frame_data[1] = MMI_AVRCP_POP_STOP ; /*stop button down*/ avrcp_test_counter ++ ; } break; case 2 : { msg_p->frame_data[1] = MMI_AVRCP_POP_STOP | 0x80 ; /*stop button up*/ avrcp_test_counter = 0 ; } break; default: avrcp_test_counter = 0 ; break; } /*send msg*/ { ilm_struct *ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->src_mod_id = MOD_MMI; ilm_ptr->dest_mod_id = MOD_MMI; ilm_ptr->sap_id = BT_AVRCP_SAP; ilm_ptr->msg_id = (msg_type)MSG_ID_BT_AVRCP_CMD_FRAME_IND; ilm_ptr->local_para_ptr = (local_para_struct*)msg_p; ilm_ptr->peer_buff_ptr = NULL; msg_send_ext_queue(ilm_ptr); } if( avrcp_test_counter != 0 ) { StartTimer(BT_AVRCP_TEST_TIMER, 1000, (FuncPtr)mmi_bt_avrcp_tst_different_down_cmd); } }
/***************************************************************************** * FUNCTION * mmi_mms_bgsr_get_msg_info_cb * DESCRIPTION * * PARAMETERS * filepath [IN] * RETURNS * file size *****************************************************************************/ void mmi_mms_bgsr_change_msg_cb(U32 msg_id, U8 result) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /* Write your local var declare here */ struct ilm_struct *ilm_ptr = NULL; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ /* Write your code here */ MMI_ASSERT(msg_id == mmi_mms_bgsr_op_msg_id); mmi_mms_bgsr_result = result; switch(mmi_mms_bgsr_op) { case MMI_MMS_BGSR_OP_CANCEL_ALL_INBOX: { ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_CANCEL_ALL_INBOX_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); break; } case MMI_MMS_BGSR_OP_MOVE_TO_FOLDER: { ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_MOVE_TO_FOLDER_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); break; } case MMI_MMS_BGSR_OP_DELETE: { ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_DELETE_MSG_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); break; } case MMI_MMS_BGSR_OP_DELETE_ALL_INBOX: { ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_DELETE_ALL_INBOX_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); break; } case MMI_MMS_BGSR_OP_DELETE_ALL_OUTBOX: { ilm_ptr = allocate_ilm(MOD_MMI); ilm_ptr->msg_id = MSG_ID_MMS_BGSR_DELETE_ALL_OUTBOX_RSP; ilm_ptr->peer_buff_ptr = NULL; ilm_ptr->local_para_ptr = NULL; SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr); break; } } return; }