#include "ciss-resp.h"
#include "ciss-converter.h"
-static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *noti_id, void *data, void *user_data);
+static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *event_type, void *data, void *user_data);
static void __ciss_ss_forward_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
static void __ciss_ss_barring_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
static void __ciss_ss_waiting_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
static void __ciss_ss_ussd_resp_cb(TapiHandle *handle, int result, void *data, void *user_data);
EventHandler event_list[] = {
- {TAPI_NOTIFY_SS_REL_COMP_MSG, 0, __ciss_tapi_ss_rel_complete_cb},
+ {TAPI_NOTI_SS_RELEASE_COMPLETE, 0, __ciss_tapi_ss_rel_complete_cb},
};
int _ciss_tapi_event_setup(ciss_appdata_t *ad)
int ret = TAPI_API_SUCCESS;
ret = tel_deinit(ad->tapi_handle);
- if (ret != TAPI_API_SUCCESS)
+ if (ret != TAPI_API_SUCCESS) {
DBG("tapi_deinit() ret : %d", ret);
+ }
}
ciss_err_t _ciss_send_tapi_request(ciss_mmi_context_t *mmi_ctx, void *data)
break;
case activateSS:
DBG("activateSS");
- switch(mmi_ctx->ss_type){
+ switch (mmi_ctx->ss_type) {
case CISS_SERVICE_FORWARDING:
stCfActReq.Mode = TAPI_SS_CF_MODE_ENABLE_EV;
break;
case deactivateSS:
DBG("deactivateSS");
- switch(mmi_ctx->ss_type){
+ switch (mmi_ctx->ss_type) {
case CISS_SERVICE_FORWARDING:
stCfActReq.Mode = TAPI_SS_CF_MODE_DISABLE_EV;
err = tel_set_ss_forward(ad->tapi_handle, &stCfActReq, __ciss_ss_forward_resp_cb, ad);
break;
case interrogateSS:
DBG("interrogateSS");
- switch(mmi_ctx->ss_type){
+ switch (mmi_ctx->ss_type) {
case CISS_SERVICE_FORWARDING:
err = tel_get_ss_forward_status(ad->tapi_handle, stCfActReq.Class, stCfActReq.Condition,
- __ciss_ss_forward_resp_cb, ad);
+ __ciss_ss_forward_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_get_ss_forward_status call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
break;
case CISS_SERVICE_BARRING:
err = tel_get_ss_barring_status(ad->tapi_handle, stCbReq.Class, stCbReq.Type,
- __ciss_ss_barring_resp_cb, ad);
+ __ciss_ss_barring_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_get_ss_barring_status call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
}
break;
case CISS_SERVICE_WAITING:
- err = tel_get_ss_waiting_status(ad->tapi_handle, stCbReq.Class,
- __ciss_ss_waiting_resp_cb, ad);
+ err = tel_get_ss_waiting_status(ad->tapi_handle, stCwReq.Class,
+ __ciss_ss_waiting_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_get_ss_waiting_status call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
case CISS_SERVICE_IDENTIFICATION:
cliType = (TelSsCliType_t)mmi_ctx->ss_flavor;
err = tel_get_ss_cli_status(ad->tapi_handle, cliType,
- __ciss_ss_cli_resp_cb, ad);
+ __ciss_ss_cli_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_get_ss_cli_status call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
/* password registration request */
/* check for too short password and mismatch password */
if (CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_password) ||
- CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password) ||
- CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password2)) {
+ CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password) ||
+ CISS_MAX_PASSWORD_LEN > strlen(mmi_ctx->ss_new_password2)) {
/* too short password */
DBG("\n [CISS-ENGINE] Too short password");
error_code = CISS_ERR_CB_PWD_TOO_SORT;
}
err = tel_change_ss_barring_password(ad->tapi_handle,
- mmi_ctx->ss_password,
- mmi_ctx->ss_new_password,
- mmi_ctx->ss_new_password2,
- __ciss_change_ss_barring_pw_resp_cb, ad);
+ mmi_ctx->ss_password,
+ mmi_ctx->ss_new_password,
+ mmi_ctx->ss_new_password2,
+ __ciss_change_ss_barring_pw_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_change_ss_barring_password call fails g_err_code = %x", err);
DBG("\n [CISS-ENGINE] stUssdRecord.Length = %d, stUssdRecord.ussd_string = %s", stUssdRecord.Length, stUssdRecord.szString);
err = tel_send_ss_ussd_request(ad->tapi_handle,
- &stUssdRecord,
- __ciss_ss_ussd_resp_cb, ad);
+ &stUssdRecord,
+ __ciss_ss_ussd_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_send_ss_ussd_request call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
DBG("\n [CISS-ENGINE] stUssdRecord.Length = %d, stUssdRecord.ussd_string = %s", stUssdRecord.Length, stUssdRecord.szString);
err = tel_send_ss_ussd_request(ad->tapi_handle,
- &stUssdRecord,
- __ciss_ss_ussd_resp_cb, ad);
+ &stUssdRecord,
+ __ciss_ss_ussd_resp_cb, ad);
if (err != TAPI_API_SUCCESS) {
DBG("\n [CISS-ENGINE] tel_send_ss_ussd_request call fails g_err_code = %x", err);
_ciss_get_error_from_tapi_error(&error_code, err);
} else {
TelSatAppsRetInfo_t app_ret_info;
memset(&app_ret_info, 0, sizeof(TelSatAppsRetInfo_t));
-
+
app_ret_info.commandType = TAPI_SAT_CMD_TYPE_SEND_SS;
app_ret_info.commandId = ad->sat_terminal_response.sat_command_id;
app_ret_info.appsRet.sendSs.resp = TAPI_SAT_R_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME;
TelSsUssdMsgInfo_t ussd_info;
ussd_info.Type = TAPI_SS_USSD_TYPE_USER_INIT;
ussd_info.Length = (int)(send_ussd_info.ussdStringLen);
- if (ussd_info.Length >0)
+ if (ussd_info.Length >0) {
memcpy(&ussd_info.szString, send_ussd_info.ussdString, ussd_info.Length);
+ }
ret = tel_send_ss_ussd_request(ad->tapi_handle, &ussd_info,
- __ciss_ss_ussd_resp_cb, ad);
+ __ciss_ss_ussd_resp_cb, ad);
} else {
TelSatAppsRetInfo_t app_ret_info;
memset(&app_ret_info, 0, sizeof(TelSatAppsRetInfo_t));
-
+
app_ret_info.commandType = TAPI_SAT_CMD_TYPE_SEND_USSD;
app_ret_info.commandId = ad->sat_terminal_response.sat_command_id;
return ret;
}
-static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *noti_id, void *data, void *user_data)
+static void __ciss_tapi_ss_rel_complete_cb(TapiHandle *tapi_handle, const char *event_type, void *data, void *user_data)
{
DBG("Enter");
ret_if(data == NULL);
ret_if(user_data == NULL);
- char * msg_length_temp;
-
ciss_appdata_t *ad = (ciss_appdata_t *)user_data;
TelSsRelCompMsgInfo_t rel_comp_info;
+ memset(&rel_comp_info, 0, sizeof(TelSsRelCompMsgInfo_t));
- DBG("event type=%s, is_sat_request=%d", noti_id, ad->is_sat_request);
+ DBG("event type=%s, is_sat_request=%d", event_type, ad->is_sat_request);
ad->sat_terminal_response.rel_comp_msg_length = 0;
if (ad->is_sat_request == EINA_TRUE) {
memcpy(&rel_comp_info, data, sizeof(TelSsRelCompMsgInfo_t));
- msg_length_temp = (char *)(&(rel_comp_info.RelCompMsgLen));
- ad->sat_terminal_response.rel_comp_msg_length = (unsigned short)(atoi(msg_length_temp));
-
+ ad->sat_terminal_response.rel_comp_msg_length = (unsigned short)rel_comp_info.RelCompMsgLen;
+
if (ad->sat_terminal_response.rel_comp_msg_length > 0) {
- memcpy(ad->sat_terminal_response.rel_comp_msg_string, rel_comp_info.szRelCompMsg, rel_comp_info.RelCompMsgLen);
+ memcpy(ad->sat_terminal_response.rel_comp_msg_string, rel_comp_info.szRelCompMsg, TAPI_MAX_RELEASE_COMPLETE_DATA_LEN);
}
- }
- DBG("rel_comp_info.RelCompMsgLen = %s", rel_comp_info.RelCompMsgLen);
- DBG("rel_comp_info.szRelCompMsg = %s", rel_comp_info.szRelCompMsg);
- DBG("ad->sat_terminal_response.rel_comp_msg_length = %d", ad->sat_terminal_response.rel_comp_msg_length);
- DBG("ad->sat_terminal_response.rel_comp_msg_string = %s", ad->sat_terminal_response.rel_comp_msg_string);
+ DBG("rel_comp_info.RelCompMsgLen = 0x%x", rel_comp_info.RelCompMsgLen);
+ DBG("rel_comp_info.szRelCompMsg = %s", rel_comp_info.szRelCompMsg);
+ DBG("ad->sat_terminal_response.rel_comp_msg_length = 0x%x", ad->sat_terminal_response.rel_comp_msg_length);
+ DBG("ad->sat_terminal_response.rel_comp_msg_string = %s", ad->sat_terminal_response.rel_comp_msg_string);
+ }
return ;
}
if (ad->sat_terminal_response.rel_comp_msg_length >0) {
app_ret_info.appsRet.sendSs.ssString.stringLen = ad->sat_terminal_response.rel_comp_msg_length;
memcpy(app_ret_info.appsRet.sendSs.ssString.string,
- ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
+ ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
} else {
app_ret_info.appsRet.sendSs.ssString.stringLen = 0;
}
DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
- if (result == TAPI_SS_SUCCESS) {
- if (ad->bg == NULL) {
- ad->bg = _ciss_create_bg(ad->win_main);
- ret_if(ad->bg == NULL);
- }
+ if (ad->conformant == NULL) {
+ ad->conformant = _ciss_create_conformant(ad->win_main);
+ ret_if(ad->conformant == NULL);
+ evas_object_show(ad->conformant);
+ }
- if (ad->layout_main == NULL) {
- ad->layout_main = _ciss_create_layout_main(ad->win_main);
- ret_if(ad->layout_main== NULL);
- }
+ if (ad->layout_main == NULL) {
+ ad->layout_main = _ciss_create_layout_main(ad->conformant);
+ ret_if(ad->layout_main== NULL);
+ evas_object_show(ad->layout_main);
+ }
+
+ if (ad->bg == NULL) {
+ ad->bg = _ciss_create_bg(ad->conformant);
+ ret_if(ad->bg == NULL);
+ elm_object_part_content_set(ad->layout_main, "elm.swallow.bg", ad->bg);
+ }
+
+ if (result == TAPI_SS_SUCCESS) {
DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
content = (Evas_Object *)_ciss_create_ss_resp_view(ad->layout_main, tapi_data, ad);
} else {
ciss_err_t ciss_err;
_ciss_get_error_from_tapi_error(&ciss_err, result);
- _ciss_create_error_popup(ad->win_main, ciss_err, 2.0, ad);
+ _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad);
}
}
if (ad->sat_terminal_response.rel_comp_msg_length >0) {
app_ret_info.appsRet.sendUssd.ussdString.stringLen = ad->sat_terminal_response.rel_comp_msg_length;
memcpy(app_ret_info.appsRet.sendUssd.ussdString.string,
- ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
+ ad->sat_terminal_response.rel_comp_msg_string, ad->sat_terminal_response.rel_comp_msg_length);
} else {
app_ret_info.appsRet.sendUssd.ussdString.stringLen = 0;
}
ad->end_key_event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _ciss_on_end_key_down, NULL);
}
- if (result == TAPI_SS_SUCCESS) {
- if (ad->bg == NULL) {
- ad->bg = _ciss_create_bg(ad->win_main);
- retv_if(ad->bg == NULL, -1);
- }
+ if (ad->conformant == NULL) {
+ ad->conformant = _ciss_create_conformant(ad->win_main);
+ retv_if(ad->conformant == NULL, -1);
+ evas_object_show(ad->conformant);
+ }
- if (ad->layout_main == NULL) {
- ad->layout_main = _ciss_create_layout_main(ad->win_main);
- retv_if(ad->layout_main== NULL, -1);
- }
+ if (ad->layout_main == NULL) {
+ ad->layout_main = _ciss_create_layout_main(ad->conformant);
+ retv_if(ad->layout_main== NULL, -1);
+ evas_object_show(ad->layout_main);
+ }
+
+ if (ad->bg == NULL) {
+ ad->bg = _ciss_create_bg(ad->conformant);
+ retv_if(ad->bg == NULL, -1);
+ elm_object_part_content_set(ad->layout_main, "elm.swallow.bg", ad->bg);
+ }
+
+ if (result == TAPI_SS_SUCCESS) {
DBG("win=0x%p main=0x%p", ad->win_main, ad->layout_main);
content = (Evas_Object *)_ciss_create_ussd_view(ad->layout_main, tapi_data, ad);
} else {
ciss_err_t ciss_err;
_ciss_get_error_from_tapi_error(&ciss_err, result);
- _ciss_create_error_popup(ad->win_main, ciss_err, 2.0, ad);
+ _ciss_create_error_popup(ad->layout_main, ciss_err, 2.0, ad);
}
ret = 0;
static void __ciss_change_ss_barring_pw_resp_cb(TapiHandle *handle, int result, void *data, void *user_data)
{
DBG("Enter");
- ret_if(data == NULL);
ret_if(user_data == NULL);
ciss_appdata_t *ad = (ciss_appdata_t *)user_data;