From: sinikang Date: Fri, 23 Nov 2018 07:01:38 +0000 (+0900) Subject: Add some parameters on core_object X-Git-Tag: accepted/tizen/5.5/unified/20191031.020019^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_5.5_tv;p=platform%2Fcore%2Ftelephony%2Flibtcore.git Add some parameters on core_object - EF PSISMSC handling - call ended request flag - throttled apn flag - drop packet falg Change-Id: I5ff8c49df73c953b91ff54693470fc561b7fb9ba --- diff --git a/include/co_call.h b/include/co_call.h index 6fce3db..1640d4d 100644 --- a/include/co_call.h +++ b/include/co_call.h @@ -283,6 +283,9 @@ gboolean tcore_call_object_set_is_release_pending(CallObject *co, gboolean flag) gboolean tcore_call_object_get_is_release_pending(CallObject *co); +gboolean tcore_call_object_set_is_end_requested(CallObject *co, gboolean flag); +gboolean tcore_call_object_get_is_end_requested(CallObject *co); + gboolean tcore_call_object_set_silent_redial_reason(CallObject *co, enum tcore_call_silent_redial_reason reason); enum tcore_call_silent_redial_reason tcore_call_object_get_silent_redial_reason(CallObject *co); diff --git a/include/co_context.h b/include/co_context.h index 4b39629..18c9f96 100644 --- a/include/co_context.h +++ b/include/co_context.h @@ -186,6 +186,11 @@ TReturn tcore_context_set_roaming_apn(CoreObject *o, gboolean flag); gboolean tcore_context_get_roaming_apn(CoreObject *o); TReturn tcore_context_set_disable_apn(CoreObject *o, gboolean flag); gboolean tcore_context_get_disable_apn(CoreObject *o); +TReturn tcore_context_set_throttled_apn(CoreObject *o, gboolean flag); +gboolean tcore_context_get_throttled_apn(CoreObject *o); +TReturn tcore_context_set_drop_packet(CoreObject *o, gboolean flag); +gboolean tcore_context_get_drop_packet(CoreObject *o); + TReturn tcore_context_set_rs_state(CoreObject *o, enum co_context_rs_state rs_state); enum co_context_rs_state tcore_context_get_rs_state(CoreObject *o); TReturn tcore_context_set_ra_timer_id(CoreObject *o, gint id); diff --git a/include/co_sim.h b/include/co_sim.h old mode 100755 new mode 100644 index daf36a2..21cbe58 --- a/include/co_sim.h +++ b/include/co_sim.h @@ -122,6 +122,10 @@ struct tel_sim_ist *tcore_sim_get_isim_service_table(CoreObject *o); gboolean tcore_sim_set_isim_service_table(CoreObject *o, const struct tel_sim_ist *ist); enum tcore_return tcore_sim_delete_isim_service_table(CoreObject *o); +char *tcore_sim_get_psismsc(CoreObject *o); +gboolean tcore_sim_set_psismsc(CoreObject *o, const char *uridata); +enum tcore_return tcore_sim_delete_psismsc(CoreObject *o); + char *tcore_sim_get_isim_impi(CoreObject *o); gboolean tcore_sim_set_isim_impi(CoreObject *o, const char *impi); enum tcore_return tcore_sim_delete_isim_impi(CoreObject *o); @@ -176,6 +180,7 @@ gboolean tcore_sim_decode_information_number(struct tel_sim_cphs_info_number *p_ gboolean tcore_sim_decode_opl(struct tel_sim_opl *p_opl, unsigned char *p_in, int in_length); gboolean tcore_sim_decode_pnn(struct tel_sim_pnn *p_pnn, unsigned char *p_in, int in_length); gboolean tcore_sim_decode_oplmnwact(struct tel_sim_oplmnwact_list *p_list, unsigned char *p_in, int in_length); +gboolean tcore_sim_decode_psismsc(struct tel_sim_psismsc *p_out, unsigned char *p_in, int in_length); gboolean tcore_sim_decode_ext(struct tel_sim_ext *p_ext, unsigned char *p_in, int in_length); gboolean tcore_sim_decode_img(struct tel_sim_img *p_out, unsigned char *p_in, int in_length); gboolean tcore_sim_check_plmn_having_3digits_mnc(char *plmn); diff --git a/include/type/request.h b/include/type/request.h index 813a84b..ed93f33 100644 --- a/include/type/request.h +++ b/include/type/request.h @@ -159,6 +159,7 @@ enum tcore_request_command { TREQ_SIM_GET_ISIM_SERVICE_TABLE, TREQ_SIM_GET_CDMAIMSI, TREQ_SIM_SET_PROVISIONING, + TREQ_SIM_GET_PSISMSC, TREQ_SAT = TCORE_REQUEST | TCORE_TYPE_SAT, TREQ_SAT_REQ_ENVELOPE, diff --git a/packaging/libtcore.spec b/packaging/libtcore.spec index b03936c..0b50593 100644 --- a/packaging/libtcore.spec +++ b/packaging/libtcore.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 3 -%define patchlevel 29 +%define patchlevel 30 Name: libtcore Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/core_object/co_call.c b/src/core_object/co_call.c index c1aed15..66db3aa 100644 --- a/src/core_object/co_call.c +++ b/src/core_object/co_call.c @@ -83,6 +83,9 @@ struct call_object { gboolean is_release_pending; /* Need to end call */ enum tcore_call_silent_redial_reason redial_reason; /* Call re-dial reason */ + + gboolean is_end_requested; /*for SRVCC case , the call which has end requested from application should not be the target of SRVCC handover*/ + }; struct private_object_data { @@ -1034,6 +1037,11 @@ gboolean tcore_call_object_get_added_to_conference(CallObject *co) gboolean tcore_call_object_set_audio_codec(CallObject *co, gchar *audio_codec) { tcore_check_null_ret_err("co", co, FALSE); + + if (co->audio_codec) { + g_free(co->audio_codec); + co->audio_codec = NULL; + } co->audio_codec = g_strdup(audio_codec); return TRUE; @@ -1676,6 +1684,22 @@ void tcore_call_information_set_operations(CoreObject *o, struct tcore_call_info po->iops = iops; } +gboolean tcore_call_object_set_is_end_requested(CallObject *co, gboolean flag) +{ + tcore_check_null_ret_err("co", co, FALSE); + + co->is_end_requested = flag; + + return TRUE; +} + +gboolean tcore_call_object_get_is_end_requested(CallObject *co) +{ + tcore_check_null_ret_err("co", co, FALSE); + + return co->is_end_requested; +} + CoreObject *tcore_call_new(TcorePlugin *p, const char *name, struct tcore_call_operations *ops, TcoreHal *hal) { CoreObject *o = NULL; diff --git a/src/core_object/co_context.c b/src/core_object/co_context.c index 72a220e..4cbf1b4 100644 --- a/src/core_object/co_context.c +++ b/src/core_object/co_context.c @@ -39,6 +39,8 @@ struct private_object_data { gboolean attach_apn; gboolean roaming_apn; gboolean disable_apn; + gboolean throttled_apn; + gboolean drop_packet; char *apn; char *addr; @@ -164,6 +166,7 @@ CoreObject *tcore_context_new(TcorePlugin *p, const char *name, TcoreHal *hal) po->tech_pref = CONTEXT_TECH_3GPP; po->disable_apn = FALSE; po->pco = -1; + po->drop_packet = FALSE; tcore_object_set_type(o, CORE_OBJECT_TYPE_PS_CONTEXT); tcore_object_link_object(o, po); @@ -1515,6 +1518,62 @@ gboolean tcore_context_get_disable_apn(CoreObject *o) return po->disable_apn; } +TReturn tcore_context_set_drop_packet(CoreObject *o, gboolean flag) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL); + + po = tcore_object_ref_object(o); + if (!po) + return TCORE_RETURN_EINVAL; + + po->drop_packet = flag; + + return TCORE_RETURN_SUCCESS; +} + +gboolean tcore_context_get_drop_packet(CoreObject *o) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, 0); + + po = tcore_object_ref_object(o); + if (!po) + return 0; + + return po->drop_packet; +} + +TReturn tcore_context_set_throttled_apn(CoreObject *o, gboolean flag) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL); + + po = tcore_object_ref_object(o); + if (!po) + return TCORE_RETURN_EINVAL; + + po->throttled_apn = flag; + + return TCORE_RETURN_SUCCESS; +} + +gboolean tcore_context_get_throttled_apn(CoreObject *o) +{ + struct private_object_data *po = NULL; + + CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, 0); + + po = tcore_object_ref_object(o); + if (!po) + return 0; + + return po->throttled_apn; +} + TReturn tcore_context_set_rs_state(CoreObject *o, enum co_context_rs_state rs_state) { struct private_object_data *po = NULL; diff --git a/src/core_object/co_sat.c b/src/core_object/co_sat.c index 13ef45c..0fb033a 100644 --- a/src/core_object/co_sat.c +++ b/src/core_object/co_sat.c @@ -195,7 +195,7 @@ static gboolean _check_file_for_refresh(enum tel_sim_file_id file_id) { int i; enum tel_sim_file_id ef_under_mf[3] = {SIM_EF_DIR, SIM_EF_ELP, SIM_EF_ICCID}; - enum tel_sim_file_id ef_under_df[29] = { + enum tel_sim_file_id ef_under_df[30] = { SIM_EF_IMSI, SIM_EF_SST, SIM_EF_EST, SIM_EF_OPLMN_ACT, SIM_EF_GID1, SIM_EF_GID2, @@ -210,7 +210,7 @@ static gboolean _check_file_for_refresh(enum tel_sim_file_id file_id) SIM_EF_CPHS_CPHS_INFO, SIM_EF_CPHS_MAILBOX_NUMBERS, SIM_EF_CPHS_OPERATOR_NAME_SHORT_FORM_STRING, SIM_EF_CPHS_INFORMATION_NUMBERS, SIM_EF_CPHS_DYNAMICFLAGS, SIM_EF_CPHS_DYNAMIC2FLAG, - SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2}; + SIM_EF_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2, SIM_EF_FDN}; dbg("[SAT] SAT PARSER - FILE ID=0x%04x", (unsigned int)file_id); @@ -226,9 +226,9 @@ static gboolean _check_file_for_refresh(enum tel_sim_file_id file_id) if ((file_id & 0x6F00) == 0x6F00) { dbg("[SAT] SAT PARSER - ADF_USIM EF=0x%04x", file_id); - for (i = 0; i < 29; i++) { + for (i = 0; i < 30; i++) { if (file_id == ef_under_df[i]) { - dbg("[SAT] SAT PARSER - MATCH!"); + dbg("[SAT] SAT PARSER - MATCH! %x", ef_under_df[i]); return TRUE; } } @@ -1602,6 +1602,7 @@ static enum tcore_sat_result _sat_decode_event_list_tlv(unsigned char *tlv_str, case EVENT_CALL_DISCONNECTED: case EVENT_LOCATION_STATUS: case EVENT_ACCESS_TECHNOLOGY_CHANGED: + case EVENT_CARD_READER_STATUS: event_list_obj->evt_list[i] = src_data[temp_index]; event_list_obj->event_list_cnt++; break; @@ -7576,6 +7577,10 @@ static int _sat_encode_open_channel(const struct tel_sat_tr_open_channel_tlv *sr dst_tr[temp_index++] = 2; dst_tr[temp_index++] = src_tr->result_type; dst_tr[temp_index++] = src_tr->me_problem_type; + + /* set bearer description */ + encoded_len = _sat_encode_bearer_desc_tlv(&(src_tr->bearer_desc), dst_tr, temp_index); + temp_index += encoded_len; break; case RESULT_BEARER_INDEPENDENT_PROTOCOL_ERROR: diff --git a/src/core_object/co_sim.c b/src/core_object/co_sim.c index 1ef6301..5a9aeb3 100644 --- a/src/core_object/co_sim.c +++ b/src/core_object/co_sim.c @@ -68,6 +68,7 @@ struct private_object_data { struct tel_sim_ist *ist; char *impi; + char *psismsc; void *userdata; /**< free use data*/ }; @@ -263,6 +264,7 @@ static TReturn _dispatcher(CoreObject *o, UserRequest *ur, enum tcore_ops_type o case TREQ_SIM_GET_PNN: case TREQ_SIM_GET_CPHS_NETNAME: case TREQ_SIM_GET_OPLMNWACT: + case TREQ_SIM_GET_PSISMSC: case TREQ_SIM_GET_ICON: case TREQ_SIM_GET_IMPI: case TREQ_SIM_GET_IMPU: @@ -338,6 +340,9 @@ static void _free_hook(CoreObject *o) if (po->impi) free(po->impi); + if (po->psismsc) + free(po->psismsc); + free(po); tcore_object_link_object(o, NULL); } @@ -3051,6 +3056,32 @@ gboolean tcore_sim_decode_oplmnwact(struct tel_sim_oplmnwact_list *p_list, unsig return TRUE; } +gboolean tcore_sim_decode_psismsc(struct tel_sim_psismsc *p_out, unsigned char *p_in, int in_length) +{ + unsigned char tag = 0, len = 0; + + if (p_in == NULL || p_out == NULL || in_length < 2) + return FALSE; + + tag = p_in[0]; + if (tag != 0x80) { + err("tag[0x%x] should be 0x80. return FALSE.", tag); + return FALSE; + } + + len = p_in[1]; + + if (in_length < len + 2) + err("invalid length. in_length[%d] < URI_len[%d] + 2", in_length, len); + + p_out->uridata = calloc(1, len + 1); + memcpy(p_out->uridata, &p_in[2], len); + + dbg("uridata: %s", p_out->uridata); + return TRUE; + +} + gboolean tcore_sim_decode_ef_info(struct tcore_sim_ef_info *p_ef_info, CoreObject *o, char *p_in, int in_length) { unsigned short arr_file_id = 0; @@ -4248,6 +4279,64 @@ enum tcore_return tcore_sim_delete_isim_service_table(CoreObject *o) return TCORE_RETURN_SUCCESS; } +char *tcore_sim_get_psismsc(CoreObject *o) +{ + struct private_object_data *po = NULL; + + po = tcore_object_ref_object(o); + if (!po) { + err("po access fail"); + return NULL; + } + + if (!po->psismsc) { + err("po->psismsc is NULL"); + return NULL; + } + + return g_strdup(po->psismsc); +} + +gboolean tcore_sim_set_psismsc(CoreObject *o, const char *uridata) +{ + struct private_object_data *po = NULL; + + po = tcore_object_ref_object(o); + if (!po) { + err("po access fail"); + return FALSE; + } + + if (!uridata) { + err("uridata is NULL"); + return FALSE; + } + + if (po->psismsc) + g_free(po->psismsc); + + po->psismsc = g_strdup(uridata); + + return TRUE; +} + +enum tcore_return tcore_sim_delete_psismsc(CoreObject *o) +{ + struct private_object_data *po = NULL; + po = tcore_object_ref_object(o); + if (!po) { + err("po access fail"); + return TCORE_RETURN_EINVAL; + } + + if (po->psismsc) { + g_free(po->psismsc); + po->psismsc = NULL; + } + + return TCORE_RETURN_SUCCESS; +} + char *tcore_sim_get_isim_impi(CoreObject *o) { struct private_object_data *po = NULL;