Sync from SPIN branch 21/46921/2 tizen_3.0.m1_mobile tizen_3.0.m1_tv accepted/tizen/mobile/20150903.053606 accepted/tizen/mobile/20151116.075011 accepted/tizen/tv/20150903.053718 accepted/tizen/tv/20151116.075017 accepted/tizen/wearable/20150903.053839 accepted/tizen/wearable/20151116.075029 submit/tizen/20150903.021205 submit/tizen/20151116.064413 submit/tizen_common/20151023.083358 submit/tizen_common/20151026.085049 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorWootak Jung <wootak.jung@samsung.com>
Thu, 27 Aug 2015 08:15:10 +0000 (17:15 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 2 Sep 2015 07:05:35 +0000 (16:05 +0900)
Change-Id: I57982c67256e54686498f61389d507ab79fb82b2

36 files changed:
CMakeLists.txt
include/co_call.h
include/co_context.h
include/co_network.h
include/co_sim.h
include/co_sms.h
include/communicator.h
include/server.h
include/storage.h
include/type/call.h
include/type/network.h
include/type/request.h
include/type/response.h
include/type/sat.h
include/type/sim.h
packaging/libtcore.spec
src/at.c
src/communicator.c
src/core_object/co_call.c [moved from src/co_call.c with 98% similarity]
src/core_object/co_context.c [moved from src/co_context.c with 97% similarity]
src/core_object/co_custom.c [moved from src/co_custom.c with 100% similarity]
src/core_object/co_gps.c [moved from src/co_gps.c with 100% similarity]
src/core_object/co_modem.c [moved from src/co_modem.c with 100% similarity]
src/core_object/co_network.c [moved from src/co_network.c with 99% similarity]
src/core_object/co_phonebook.c [moved from src/co_phonebook.c with 100% similarity]
src/core_object/co_ps.c [moved from src/co_ps.c with 98% similarity]
src/core_object/co_sap.c [moved from src/co_sap.c with 100% similarity]
src/core_object/co_sat.c [moved from src/co_sat.c with 100% similarity]
src/core_object/co_sim.c [moved from src/co_sim.c with 99% similarity]
src/core_object/co_sms.c [moved from src/co_sms.c with 100% similarity]
src/core_object/co_ss.c [moved from src/co_ss.c with 100% similarity]
src/core_object/core_object.c [moved from src/core_object.c with 100% similarity]
src/mux.c
src/server.c
src/storage.c
src/util.c

index bb6c661..9c53a5b 100644 (file)
@@ -42,20 +42,20 @@ SET(SRCS
        src/queue.c
        src/user_request.c
        src/util.c
-       src/core_object.c
-       src/co_modem.c
-       src/co_sim.c
-       src/co_network.c
-       src/co_call.c
-       src/co_sms.c
-       src/co_ss.c
-       src/co_phonebook.c
-       src/co_ps.c
-       src/co_context.c
-       src/co_sat.c
-       src/co_sap.c
-       src/co_gps.c
-       src/co_custom.c
+       src/core_object/core_object.c
+       src/core_object/co_modem.c
+       src/core_object/co_sim.c
+       src/core_object/co_network.c
+       src/core_object/co_call.c
+       src/core_object/co_sms.c
+       src/core_object/co_ss.c
+       src/core_object/co_phonebook.c
+       src/core_object/co_ps.c
+       src/core_object/co_context.c
+       src/core_object/co_sat.c
+       src/core_object/co_sap.c
+       src/core_object/co_gps.c
+       src/core_object/co_custom.c
        src/mux.c
 )
 
index 17204fb..fdd0126 100644 (file)
@@ -97,8 +97,9 @@ enum tcore_call_end_type {
 };
 
 enum tcore_call_silent_redial_reason{
-       TCORE_CALL_SILENT_REDIAL_REASON_NULL,
-       TCORE_CALL_SILENT_REDIAL_REASONL_MULTIRAT_EMERGENCY,
+       TCORE_CALL_SILENT_REDIAL_REASON_NONE,
+       TCORE_CALL_SILENT_REDIAL_REASON_MULTIRAT_EMERGENCY,
+       TCORE_CALL_SILENT_REDIAL_REASON_CS_FALLBACK     //VoLTE call Fail with some reason which is pre-defined by network operator. Need to silent-redial to CS bearer
 };
 
 typedef struct call_object CallObject;
@@ -197,6 +198,8 @@ CallObject *tcore_call_object_current_on_mo_processing(CoreObject *o);
 CallObject *tcore_call_object_find_by_id(CoreObject *o, int id);
 CallObject *tcore_call_object_find_by_handle(CoreObject *o, int handle);
 CallObject *tcore_call_object_find_by_number(CoreObject *o, char *num);
+int tcore_call_get_id_by_handle(CoreObject *o, int handle);
+int tcore_call_get_handle_by_id(CoreObject *o, int call_id);
 GSList *tcore_call_object_find_by_status(CoreObject *o, enum tcore_call_status cs);
 
 gboolean tcore_call_object_set_id(CallObject *co , int call_id);
@@ -269,7 +272,6 @@ TReturn tcore_call_control_deflect(CoreObject *o, UserRequest *ur, const char *n
 
 void tcore_call_control_set_operations(CoreObject *o, struct tcore_call_control_operations *ops);
 
-
 void tcore_call_information_mo_col(CoreObject *o, char *number);
 void tcore_call_information_mo_waiting(CoreObject *o);
 void tcore_call_information_mo_cug(CoreObject *o, int cug_index);
index 103243c..332f9b7 100644 (file)
@@ -151,6 +151,8 @@ pcscf_addr *tcore_context_get_pcscf_ipv4_addr(CoreObject *o);
 pcscf_addr *tcore_context_get_pcscf_ipv6_addr(CoreObject *o);
 TReturn tcore_context_set_attach_apn(CoreObject *o, gboolean flag);
 gboolean tcore_context_get_attach_apn(CoreObject *o);
+TReturn tcore_context_set_roaming_apn(CoreObject *o, gboolean flag);
+gboolean tcore_context_get_roaming_apn(CoreObject *o);
 
 __END_DECLS
 
index 79347c4..fc633b6 100644 (file)
@@ -124,6 +124,7 @@ struct tcore_network_operations {
        TReturn (*get_roaming_preference)(CoreObject *o, UserRequest *ur); /* 3GPP2 spcefic */
        TReturn (*get_subscription_info)(CoreObject *o, UserRequest *ur); /* 3GPP2 spcefic */
        TReturn (*search_ecc_rat)(CoreObject *o, UserRequest *ur);
+       TReturn (*ims_deregister)(CoreObject *o, UserRequest *ur);
 };
 
 
index 4615c7e..00ac9c8 100644 (file)
@@ -39,13 +39,14 @@ struct tcore_sim_operations {
        TReturn (*get_atr)(CoreObject *o, UserRequest *ur);
        TReturn (*req_authentication)(CoreObject *o, UserRequest *ur);
        TReturn (*set_powerstate)(CoreObject *o, UserRequest *ur);
+       TReturn (*set_provisioning)(CoreObject *o, UserRequest *ur);
 };
 
 enum tcore_sim_file_type_e {
        SIM_FTYPE_DEDICATED = 0x00, /**< Dedicated */
        SIM_FTYPE_TRANSPARENT = 0x01, /**< Transparent -binary type*/
        SIM_FTYPE_LINEAR_FIXED = 0x02, /**< Linear fixed - record type*/
-       SIM_FTYPE_CYCLIC = 0x04, /**< Cyclic - record type*/
+       SIM_FTYPE_CYCLIC = 0x06, /**< Cyclic - record type*/
        SIM_FTYPE_INVALID_TYPE = 0xFF /**< Invalid type */
 };
 
index 0d71f72..5e66ec0 100644 (file)
@@ -40,11 +40,6 @@ __BEGIN_DECLS
 #define nDCSOffset                             26
 #define nVPOffset                                      27
 
-struct property_sms_info {
-       int g_trans_id;
-       int SMSPRecordLen;
-};
-
 struct tcore_sms_operations {
        TReturn (*send_umts_msg)(CoreObject *o, UserRequest *ur);
        TReturn (*read_msg)(CoreObject *o, UserRequest *ur);
index 4a29ee6..5c26147 100644 (file)
@@ -23,7 +23,7 @@
 
 __BEGIN_DECLS
 
-struct tcore_communitor_operations {
+struct tcore_communicator_operations {
        TReturn (*send_response)(Communicator *comm, UserRequest *ur,
                enum tcore_response_command command,
                unsigned int data_len, const void *data);
@@ -34,7 +34,7 @@ struct tcore_communitor_operations {
 };
 
 Communicator *tcore_communicator_new(TcorePlugin *plugin,
-       const char *name, struct tcore_communitor_operations *ops);
+       const char *name, struct tcore_communicator_operations *ops);
 void tcore_communicator_free();
 
 TcorePlugin *tcore_communicator_ref_plugin(Communicator *comm);
index 084fa2f..a1efe94 100644 (file)
@@ -60,7 +60,8 @@ TReturn tcore_server_dispatch_request(Server *s, UserRequest *ur);
 TReturn tcore_server_send_notification(Server *s,
        CoreObject *source, enum tcore_notification_command command,
        unsigned int data_len, void *data);
-
+TReturn tcore_server_broadcast_notification(Server *s, CoreObject *source,
+       enum tcore_notification_command command, unsigned int data_len, void *data);
 TReturn tcore_server_add_request_hook(Server *s,
        enum tcore_request_command command,
        TcoreServerRequestHook func, void *user_data);
index ec54894..81799c3 100644 (file)
@@ -85,7 +85,6 @@ enum tcore_storage_key {
        STORAGE_KEY_SETAPPL_STATE_DATA_ROAMING_BOOL,
        STORAGE_KEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL,
        STORAGE_KEY_SETAPPL_NETWORK_RESTRICT_MODE,
-       STORAGE_KEY_SETAPPL_MOBILE_DATA_POPUP_DONE_BOOL,
        STORAGE_KEY_MSG_SERVER_READY_BOOL,
        STORAGE_KEY_FLIGHT_MODE_BOOL,
        STORAGE_KEY_TESTMODE_FAST_DORMANCY_BOOL,
@@ -148,6 +147,9 @@ struct storage_operations {
        gboolean (*read_query_database)(Storage *strg, void *handle,
                const char *query, GHashTable *in_param,
                GHashTable *out_param, int out_param_cnt);
+       gboolean (*read_query_database_in_order)(Storage *strg, void *handle,
+               const char *query, GHashTable *in_param,
+               GSList **out_param, int out_param_cnt);
        gboolean (*insert_query_database)(Storage *strg, void *handle,
                const char *query, GHashTable *in_param);
        gboolean (*remove_query_database)(Storage *strg, void *handle,
@@ -186,6 +188,9 @@ gboolean tcore_storage_update_query_database(Storage *strg, void *handle,
 gboolean tcore_storage_read_query_database(Storage *strg, void *handle,
        const char *query, GHashTable *in_param,
        GHashTable *out_param, int out_param_cnt);
+gboolean tcore_storage_read_query_database_in_order(Storage *strg, void *handle,
+       const char *query, GHashTable *in_param,
+       GSList **out_param, int out_param_cnt);
 gboolean tcore_storage_insert_query_database(Storage *strg, void *handle,
        const char *query, GHashTable *in_param);
 gboolean tcore_storage_remove_query_database(Storage *strg, void *handle,
index fcfad78..9a2e841 100644 (file)
@@ -848,6 +848,7 @@ struct tnoti_call_status_incoming {
        struct telephony_call_cna_info cna;
        gboolean                forward;
        unsigned int    active_line;
+       char number_plus[MAX_CALL_NUMBER_LEN];
 };
 
 struct tnoti_call_status_waiting {
index 47982be..cd694bc 100644 (file)
@@ -226,10 +226,9 @@ enum telephony_network_ims_reg_feature_type {
 
 /* IMS specific */
 enum telephony_network_ims_reg_network_type {
-       NETWORK_IMS_REG_NETWORK_TYPE_INTERNET = 1, /**< VoLTE Feature type */
-       NETWORK_IMS_REG_NETWORK_TYPE_WIFI, /**< SMSoverIP Feature type */
-       NETWORK_IMS_REG_NETWORK_TYPE_IMS, /**< RCS Feature type */
-       NETWORK_IMS_REG_NETWORK_TYPE_EMERGENCY /**< VT Feature type */
+       NETWORK_IMS_REG_NETWORK_TYPE_UNKNOWN, /**< Unknown */
+       NETWORK_IMS_REG_NETWORK_TYPE_MOBILE, /**< Mobile */
+       NETWORK_IMS_REG_NETWORK_TYPE_WIFI, /**< WiFi */
 };
 
 /* IMS specific */
@@ -544,6 +543,10 @@ struct tresp_network_search_ecc_rat {
        TReturn result;
 };
 
+struct tresp_network_ims_deregister {
+       TReturn result;
+};
+
 struct tnoti_network_registration_status {
        enum telephony_network_service_domain_status cs_domain_status;
        enum telephony_network_service_domain_status ps_domain_status;
index 250ebc5..18fd216 100644 (file)
@@ -146,6 +146,7 @@ enum tcore_request_command {
        TREQ_SIM_GET_DOMAIN,
        TREQ_SIM_GET_PCSCF,
        TREQ_SIM_GET_ISIM_SERVICE_TABLE,
+       TREQ_SIM_SET_PROVISIONING,
 
        TREQ_SAT = TCORE_REQUEST | TCORE_TYPE_SAT,
        TREQ_SAT_REQ_ENVELOPE,
@@ -191,6 +192,7 @@ enum tcore_request_command {
        TREQ_NETWORK_GET_ROAMING_PREFERENCE,
        TREQ_NETWORK_GET_SUBSCRIPTION_INFO,
        TREQ_NETWORK_SEARCH_ECC_RAT,
+       TREQ_NETWORK_IMS_DEREGISTER,
 
        TREQ_PS = TCORE_REQUEST | TCORE_TYPE_PS,
        TREQ_PS_SET_PDP_ACTIVATE,
index e42892d..6ea4be9 100644 (file)
@@ -182,6 +182,7 @@ enum tcore_response_command {
        TRESP_NETWORK_GET_ROAMING_PREFERENCE,
        TRESP_NETWORK_GET_SUBSCRIPTION_INFO,
        TRESP_NETWORK_SEARCH_ECC_RAT,
+       TRESP_NETWORK_IMS_DEREGISTER,
 
        TRESP_PS = TCORE_RESPONSE | TCORE_TYPE_PS,
        TRESP_PS_SET_PDP_ACTIVATE,
index 659c1ce..c38a912 100644 (file)
@@ -727,7 +727,7 @@ enum icon_qualifier{
 struct tel_sat_icon{
        unsigned char width;
        unsigned char height;
-       enum img_coding_scheme ics;
+       enum tel_sim_img_coding_scheme ics;
        unsigned short icon_data_len;
        unsigned short clut_data_len;
        char icon_file[SAT_IMG_DATA_FILE_PATH_LEN_MAX];
index c6001d1..ff75e83 100644 (file)
@@ -686,6 +686,24 @@ enum tel_sim_pcscf_type {
        SIM_PCSCF_TYPE_IPV6, /**< IPv6 */
 };
 
+enum tel_sim_powerstate {
+       SIM_POWER_OFF = 0x00, /**< OFF */
+       SIM_POWER_ON = 0x01, /**< ON */
+       SIM_POWER_UNSPECIFIED = 0xFF /**< Unspecified */
+};
+
+enum tel_sim_provision {
+       SIM_PROVISION_DEACTIVATE = 0x00, /**< De-activate Provisioning */
+       SIM_PROVISION_ACTIVATE = 0x01, /**< Activate Provisioning */
+       SIM_PROVISION_UNSPECIFIED = 0xFF /**< Unspecified */
+};
+
+enum tel_sim_img_coding_scheme{
+       SIM_IMG_CODING_SCHEME_BASIC = 0x11,
+       SIM_IMG_CODING_SCHEME_COLOUR = 0x21,
+       SIM_IMG_CODING_SCHEME_RESERVED = 0xFF
+};
+
 struct tel_sim_sst {
        char service[SIM_SST_SERVICE_CNT_MAX];  /**< should accessed with 'enum tel_sim_sst_service' as index */
 };
@@ -888,137 +906,6 @@ struct tel_sim_cphs_info_number {
        unsigned char Ext1RecordId;                             /**< Extensiion1 Record Identifier */
 };
 
-enum tel_sim_powerstate {
-       SIM_POWER_OFF = 0x00, /**< OFF */
-       SIM_POWER_ON = 0x01, /**< ON */
-       SIM_POWER_UNSPECIFIED = 0xFF /**< Unspecified */
-};
-
-
-struct treq_sim_verify_pins {
-       enum tel_sim_pin_type pin_type;
-       unsigned int pin_length;
-       char pin[9];
-};
-
-struct treq_sim_verify_puks {
-       enum tel_sim_pin_type puk_type;
-       unsigned int puk_length;
-       char puk[9];
-       unsigned int pin_length;
-       char pin[9];
-};
-
-struct treq_sim_change_pins {
-       enum tel_sim_pin_type type;
-       unsigned int old_pin_length;
-       char old_pin[9];
-       unsigned int new_pin_length;
-       char new_pin[9];
-};
-
-struct treq_sim_get_facility_status {
-       enum tel_sim_facility_type type;
-};
-
-struct treq_sim_disable_facility {
-       enum tel_sim_facility_type type;
-       unsigned int password_length;
-       char password[39];
-};
-
-struct treq_sim_enable_facility {
-       enum tel_sim_facility_type type;
-       unsigned int password_length;
-       char password[39];
-};
-
-struct treq_sim_get_lock_info {
-       enum tel_sim_facility_type type;
-};
-
-struct treq_sim_transmit_apdu {
-       unsigned int apdu_length;
-       unsigned char apdu[SIM_APDU_DATA_LEN_MAX];
-};
-
-struct treq_sim_set_language {
-       enum tel_sim_language_type language;
-};
-
-struct treq_sim_req_authentication {
-       enum tel_sim_auth_type auth_type;               /**< Authentication type */
-       unsigned int rand_length;                       /**< the length of RAND */
-       unsigned int autn_length;                       /**< the length of AUTN. it is not used in case of GSM AUTH */
-       char rand_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1];  /**< RAND data */
-       char autn_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1];  /**< AUTN data. it is not used in case of GSM AUTH */
-};
-
-struct treq_sim_set_powerstate {
-       enum tel_sim_powerstate state;
-};
-
-struct tresp_sim_set_powerstate {
-       enum tel_sim_power_set_result result;
-};
-
-
-
-struct tresp_sim_verify_pins {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_pin_type pin_type;
-       int retry_count;
-};
-
-struct tresp_sim_verify_puks {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_pin_type pin_type;
-       int retry_count;
-};
-
-struct tresp_sim_change_pins {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_pin_type pin_type;
-       int retry_count;
-};
-
-struct tresp_sim_get_facility_status {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_facility_type type;
-       gboolean b_enable;
-};
-
-struct tresp_sim_disable_facility {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_facility_type type;
-       int retry_count;
-};
-
-struct tresp_sim_enable_facility {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_facility_type type;
-       int retry_count;
-};
-
-struct tresp_sim_get_lock_info {
-       enum tel_sim_pin_operation_result result;
-       enum tel_sim_facility_type type;
-       enum tel_sim_lock_status lock_status;
-       int retry_count;
-};
-
-struct tresp_sim_transmit_apdu {
-       enum tel_sim_access_result result;
-       unsigned int apdu_resp_length;
-       unsigned char *apdu_resp;
-};
-
-struct tresp_sim_get_atr {
-       enum tel_sim_access_result result;
-       unsigned int atr_length;
-       unsigned char atr[256 + 2];
-};
-
 struct tel_sim_ecc {
        char ecc_num[SIM_ECC_BYTE_LEN_MAX * 2 + 1];             /**< Emergency Call Code info-ECC is coded in BCD format. null termination used*/
        char ecc_string[SIM_ECC_STRING_LEN_MAX + 1];            /**< Alphabet identifier. null termination used*/
@@ -1041,10 +928,6 @@ struct tel_sim_language {
        enum tel_sim_language_type language[SIM_LANG_CNT_MAX];
 };
 
-struct tresp_sim_set_data {
-       enum tel_sim_access_result result;
-};
-
 struct tel_sim_iccid {
        char iccid[SIM_ICCID_LEN_MAX + 1];
 };
@@ -1078,11 +961,6 @@ struct tel_sim_mailbox {
        struct tel_sim_mb_number mb[SIM_MSP_CNT_MAX*5]; /**< each profile mailbox number can exist 5 numbers */
 };
 
-struct treq_sim_set_mailbox {
-       gboolean b_cphs;
-       struct tel_sim_mb_number mb_info;
-};
-
 struct tel_sim_cfis {
        int rec_index;
        unsigned char msp_num;                          /**< MSP number*/
@@ -1112,12 +990,6 @@ struct tel_sim_callforwarding {
        struct tel_sim_cphs_cf cphs_cf;
 };
 
-struct treq_sim_set_callforwarding {
-       gboolean b_cphs;
-       struct tel_sim_cfis cf;
-       struct tel_sim_cphs_cf cphs_cf;
-};
-
 struct tel_sim_mw {
        int rec_index;
        unsigned char indicator_status; /**< Indicator status*/
@@ -1219,16 +1091,10 @@ struct tel_sim_file_list{
        enum tel_sim_file_id file_id[SIM_FILE_ID_LIST_MAX_COUNT];
 };
 
-enum img_coding_scheme{
-       IMAGE_CODING_SCHEME_BASIC = 0x11,
-       IMAGE_CODING_SCHEME_COLOUR = 0x21,
-       IMAGE_CODING_SCHEME_RESERVED = 0xFF
-};
-
 struct tel_sim_img{
        unsigned char width;
        unsigned char height;
-       enum img_coding_scheme ics;
+       enum tel_sim_img_coding_scheme ics;
        unsigned short iidf_fileid;
        unsigned short offset;
        unsigned short length;
@@ -1236,30 +1102,171 @@ struct tel_sim_img{
 };
 
 struct tel_sim_impi {
-       char *impi;
+       char *impi; /**< ISIM IMPI data */
 };
 
 struct tel_sim_impu {
-       char *impu;
+       char *impu; /**< ISIM IMPU data */
 };
 
 struct tel_sim_impu_list {
-       unsigned int count;
-       struct tel_sim_impu impu[SIM_IMPU_CNT_MAX];
+       unsigned int count; /**< ISIM IMPU data count */
+       struct tel_sim_impu impu[SIM_IMPU_CNT_MAX]; /**< ISIM IMPU list */
 };
 
 struct tel_sim_domain {
-       char *domain;
+       char *domain; /**< ISIM Domain data */
 };
 
 struct tel_sim_pcscf {
-       enum tel_sim_pcscf_type type;
-       char *pcscf;
+       enum tel_sim_pcscf_type type; /**< ISIM P-CSCF type */
+       char *pcscf; /**< ISIM P-CSCF data */
 };
 
 struct tel_sim_pcscf_list {
-       unsigned int count;
-       struct tel_sim_pcscf pcscf[SIM_PCSCF_CNT_MAX];
+       unsigned int count; /**< ISIM P-CSCF data count */
+       struct tel_sim_pcscf pcscf[SIM_PCSCF_CNT_MAX]; /**< ISIM P-CSCF list */
+};
+
+struct treq_sim_verify_pins {
+       enum tel_sim_pin_type pin_type;
+       unsigned int pin_length;
+       char pin[9];
+};
+
+struct treq_sim_verify_puks {
+       enum tel_sim_pin_type puk_type;
+       unsigned int puk_length;
+       char puk[9];
+       unsigned int pin_length;
+       char pin[9];
+};
+
+struct treq_sim_change_pins {
+       enum tel_sim_pin_type type;
+       unsigned int old_pin_length;
+       char old_pin[9];
+       unsigned int new_pin_length;
+       char new_pin[9];
+};
+
+struct treq_sim_get_facility_status {
+       enum tel_sim_facility_type type;
+};
+
+struct treq_sim_disable_facility {
+       enum tel_sim_facility_type type;
+       unsigned int password_length;
+       char password[39];
+};
+
+struct treq_sim_enable_facility {
+       enum tel_sim_facility_type type;
+       unsigned int password_length;
+       char password[39];
+};
+
+struct treq_sim_get_lock_info {
+       enum tel_sim_facility_type type;
+};
+
+struct treq_sim_transmit_apdu {
+       unsigned int apdu_length;
+       unsigned char apdu[SIM_APDU_DATA_LEN_MAX];
+};
+
+struct treq_sim_set_language {
+       enum tel_sim_language_type language;
+};
+
+struct treq_sim_req_authentication {
+       enum tel_sim_auth_type auth_type;               /**< Authentication type */
+       unsigned int rand_length;                       /**< the length of RAND */
+       unsigned int autn_length;                       /**< the length of AUTN. it is not used in case of GSM AUTH */
+       char rand_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1];  /**< RAND data */
+       char autn_data[SIM_AUTH_REQ_DATA_LEN_MAX + 1];  /**< AUTN data. it is not used in case of GSM AUTH */
+};
+
+struct treq_sim_set_powerstate {
+       enum tel_sim_powerstate state;
+};
+
+struct treq_sim_set_mailbox {
+       gboolean b_cphs;
+       struct tel_sim_mb_number mb_info;
+};
+
+struct treq_sim_set_callforwarding {
+       gboolean b_cphs;
+       struct tel_sim_cfis cf;
+       struct tel_sim_cphs_cf cphs_cf;
+};
+
+struct treq_sim_set_provisioning {
+       enum tel_sim_provision cmd;
+};
+
+struct tresp_sim_set_powerstate {
+       enum tel_sim_power_set_result result;
+};
+
+struct tresp_sim_verify_pins {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_pin_type pin_type;
+       int retry_count;
+};
+
+struct tresp_sim_verify_puks {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_pin_type pin_type;
+       int retry_count;
+};
+
+struct tresp_sim_change_pins {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_pin_type pin_type;
+       int retry_count;
+};
+
+struct tresp_sim_get_facility_status {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_facility_type type;
+       gboolean b_enable;
+};
+
+struct tresp_sim_disable_facility {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_facility_type type;
+       int retry_count;
+};
+
+struct tresp_sim_enable_facility {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_facility_type type;
+       int retry_count;
+};
+
+struct tresp_sim_get_lock_info {
+       enum tel_sim_pin_operation_result result;
+       enum tel_sim_facility_type type;
+       enum tel_sim_lock_status lock_status;
+       int retry_count;
+};
+
+struct tresp_sim_transmit_apdu {
+       enum tel_sim_access_result result;
+       unsigned int apdu_resp_length;
+       unsigned char *apdu_resp;
+};
+
+struct tresp_sim_get_atr {
+       enum tel_sim_access_result result;
+       unsigned int atr_length;
+       unsigned char atr[256 + 2];
+};
+
+struct tresp_sim_set_data {
+       enum tel_sim_access_result result;
 };
 
 struct tresp_sim_read {
@@ -1304,6 +1311,10 @@ struct tresp_sim_req_authentication {
        char integrity_data[SIM_AUTH_RESP_DATA_LEN_MAX + 1]; /**< integrity key */
 };
 
+struct tresp_sim_set_provisioning {
+       enum tel_sim_access_result result;
+};
+
 struct tnoti_sim_status {
        enum tel_sim_status sim_status;
        gboolean b_changed;
index ba48890..f4ad307 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 2
-%define patchlevel 91
+%define patchlevel 92
 
 Name:           libtcore
 Version:        %{major}.%{minor}.%{patchlevel}
index c21c305..ddb3622 100644 (file)
--- a/src/at.c
+++ b/src/at.c
@@ -218,9 +218,6 @@ static void _emit_unsolicited_message(TcoreAT *at, const char *line)
        if (!at || !line)
                return;
 
-       dbg("pdu_status:  [%s] data_mode: [%s]",
-               (at->pdu_status ? "TRUE" : "FALSE"),
-               (at->data_mode == MODE_BIN ? "Binary" : "Hex"));
        if (at->pdu_status == FALSE) {
                g_hash_table_iter_init(&iter, at->unsolicited_table);
 
@@ -679,7 +676,6 @@ gboolean tcore_at_process(TcoreAT *at, unsigned int data_len, const char *data)
 
                /* Validate Request */
                if (!at->req) {
-                       err("at->req is NULL");
                        _emit_unsolicited_message(at, pos);
                } else {
                        tcore_at_final_response ret;
index e935d12..9edf8fa 100644 (file)
@@ -31,7 +31,7 @@
 
 struct tcore_communicator_type {
        char *name;
-       struct tcore_communitor_operations *ops;
+       struct tcore_communicator_operations *ops;
 
        void *user_data;
 
@@ -40,7 +40,7 @@ struct tcore_communicator_type {
 
 
 Communicator *tcore_communicator_new(TcorePlugin *plugin,
-       const char *name, struct tcore_communitor_operations *ops)
+       const char *name, struct tcore_communicator_operations *ops)
 {
        Communicator *comm;
 
@@ -123,7 +123,7 @@ TReturn tcore_communicator_send_response(Communicator *comm, UserRequest *ur,
        if (!comm || !comm->ops || !comm->ops->send_response)
                return TCORE_RETURN_EINVAL;
 
-       dbg("ur = 0x%x", ur);
+       dbg("ur: [%p]", ur);
 
        return comm->ops->send_response(comm, ur, command, data_len, data);
 }
similarity index 98%
rename from src/co_call.c
rename to src/core_object/co_call.c
index f554ea7..aa83de1 100644 (file)
@@ -547,6 +547,26 @@ CallObject *tcore_call_object_current_on_mo_processing(CoreObject *o)
        return call_obj;
 }
 
+int tcore_call_get_id_by_handle(CoreObject *o, int handle)
+{
+       CallObject *co = NULL;
+
+       co = tcore_call_object_find_by_handle(o, handle);
+       tcore_check_null_ret_err("co", co, -1);
+
+       return tcore_call_object_get_id(co);
+}
+
+int tcore_call_get_handle_by_id(CoreObject *o, int call_id)
+{
+       CallObject *co = NULL;
+
+       co = tcore_call_object_find_by_id(o, call_id);
+       tcore_check_null_ret_err("co", co, -1);
+
+       return tcore_call_object_get_handle(co);
+}
+
 CallObject *tcore_call_object_find_by_id(CoreObject *o, int id)
 {
        struct private_object_data *po = NULL;
@@ -718,8 +738,8 @@ gboolean tcore_call_object_set_cli_info(CallObject *co,
 
 int tcore_call_object_get_number(CallObject *co, char *num)
 {
-       tcore_check_null_ret_err("co", co, 0);
-       tcore_check_null_ret_err("num", num, 0);
+       tcore_check_null_ret_err( "co", co, -1);
+       tcore_check_null_ret_err( "num", num, -1);
 
        strncpy(num, co->cli.number, MAX_CALL_NUMBER_LEN);
        return co->cli.number_len;
@@ -760,8 +780,8 @@ gboolean tcore_call_object_set_cna_info(CallObject *co, enum tcore_call_cna_mode
 
 int tcore_call_object_get_name(CallObject *co, char *name)
 {
-       tcore_check_null_ret_err("co", co, 0);
-       tcore_check_null_ret_err("name", name, 0);
+       tcore_check_null_ret_err( "co", co, -1);
+       tcore_check_null_ret_err( "name", name, -1);
 
        strncpy(name, co->cna.name, MAX_CALL_NAME_LEN);
        return co->cna.name_len;
similarity index 97%
rename from src/co_context.c
rename to src/core_object/co_context.c
index e6d460a..3d3118c 100644 (file)
@@ -36,6 +36,7 @@ struct private_object_data {
        enum co_context_role role;
        gboolean default_profile;
        gboolean attach_apn;
+       gboolean roaming_apn;
 
        char *apn;
        char *addr;
@@ -1156,3 +1157,31 @@ gboolean tcore_context_get_attach_apn(CoreObject *o)
 
        return po->attach_apn;
 }
+
+TReturn tcore_context_set_roaming_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->roaming_apn = flag;
+
+       return TCORE_RETURN_SUCCESS;
+}
+
+gboolean tcore_context_get_roaming_apn(CoreObject *o)
+{
+       struct private_object_data *po = NULL;
+
+       CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS_CONTEXT, FALSE);
+
+       po = tcore_object_ref_object(o);
+       if (!po)
+               return FALSE;
+
+       return po->roaming_apn;
+}
similarity index 100%
rename from src/co_custom.c
rename to src/core_object/co_custom.c
similarity index 100%
rename from src/co_gps.c
rename to src/core_object/co_gps.c
similarity index 100%
rename from src/co_modem.c
rename to src/core_object/co_modem.c
similarity index 99%
rename from src/co_network.c
rename to src/core_object/co_network.c
index da2451f..35db47e 100644 (file)
@@ -43,7 +43,7 @@ struct private_object_data {
        char *plmn;
        gboolean roaming_state;
        int restricted_state;
-       unsigned int lac;
+       unsigned int lac; /* represent LAC or TAC(in case of LTE) */
        unsigned int rac;
        unsigned int cell_id;
        gboolean gsm_dtm_support; /* DTM (Dual Transfer Mode) */
@@ -244,6 +244,12 @@ static TReturn _dispatcher(CoreObject *co, UserRequest *ur, enum tcore_ops_type
 
                return ops->search_ecc_rat(co, ur);
 
+       case TREQ_NETWORK_IMS_DEREGISTER:
+               tcore_check_null_ret_err("ops->ims_deregister",
+                       ops->ims_deregister, TCORE_RETURN_ENOSYS);
+
+               return ops->ims_deregister(co, ur);
+
        default:
        break;
        }
similarity index 98%
rename from src/co_ps.c
rename to src/core_object/co_ps.c
index bbb2339..6a84184 100644 (file)
@@ -258,6 +258,7 @@ void tcore_ps_set_ops(CoreObject *o,
 TReturn tcore_ps_add_context(CoreObject *o, CoreObject *ctx_o)
 {
        struct private_object_data *po = NULL;
+       unsigned int count;
 
        CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS, TCORE_RETURN_EINVAL);
        CORE_OBJECT_CHECK_RETURN(ctx_o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL);
@@ -266,7 +267,9 @@ TReturn tcore_ps_add_context(CoreObject *o, CoreObject *ctx_o)
        if (!po)
                return TCORE_RETURN_EINVAL;
 
+       count = g_slist_length(po->context_list);
        po->context_list = g_slist_insert(po->context_list, ctx_o, 0);
+       dbg("num. of contexts: %d -> %d", count, g_slist_length(po->context_list));
 
        return TCORE_RETURN_SUCCESS;
 }
@@ -274,6 +277,7 @@ TReturn tcore_ps_add_context(CoreObject *o, CoreObject *ctx_o)
 TReturn tcore_ps_remove_context(CoreObject *o, CoreObject *ctx_o)
 {
        struct private_object_data *po = NULL;
+       unsigned int count;
 
        CORE_OBJECT_CHECK_RETURN(o, CORE_OBJECT_TYPE_PS, TCORE_RETURN_EINVAL);
        CORE_OBJECT_CHECK_RETURN(ctx_o, CORE_OBJECT_TYPE_PS_CONTEXT, TCORE_RETURN_EINVAL);
@@ -283,7 +287,9 @@ TReturn tcore_ps_remove_context(CoreObject *o, CoreObject *ctx_o)
                return TCORE_RETURN_EINVAL;
 
        tcore_ps_clear_context_id(o, ctx_o);
+       count = g_slist_length(po->context_list);
        po->context_list = g_slist_remove(po->context_list, ctx_o);
+       dbg("num. of contexts: %d -> %d", count, g_slist_length(po->context_list));
 
        return TCORE_RETURN_SUCCESS;
 }
@@ -798,7 +804,8 @@ TReturn tcore_ps_deactivate_context(CoreObject *o, CoreObject *ps_context, void
 
        context_state = tcore_context_get_state(ps_context);
        if (context_state == CONTEXT_STATE_DEACTIVATED) {
-               dbg("Context State : CONTEXT_STATE_DEACTIVATED");
+               warn("Context State : CONTEXT_STATE_DEACTIVATED");
+               tcore_ps_clear_context_id(o, ps_context);
                return TCORE_RETURN_SUCCESS;
        } else if (context_state == CONTEXT_STATE_DEACTIVATING) {
                dbg("Context State : CONTEXT_STATE_DEACTIVATING");
similarity index 100%
rename from src/co_sap.c
rename to src/core_object/co_sap.c
similarity index 100%
rename from src/co_sat.c
rename to src/core_object/co_sat.c
similarity index 99%
rename from src/co_sim.c
rename to src/core_object/co_sim.c
index 68456d3..7891cfc 100644 (file)
 #define SIM_TOTAL_FILE_SIZE_TAG                0x81
 #define SIM_SHORT_FILE_IDENTIFIER_TAG          0x88
 
-/* USIM file types */
-#define SIM_FTYPE_TRANSPARENT                  0x1
-#define SIM_FTYPE_LINEAR_FIXED                 0x2
-#define SIM_FTYPE_CYCLIC                       0x6
-
 /* GSM file types */
 #define SIM_FTYPE_RFU                          0x0
 #define SIM_FTYPE_MF                           0x1
@@ -279,6 +274,12 @@ static TReturn _dispatcher(CoreObject *o, UserRequest *ur, enum tcore_ops_type o
 
                return ops->set_powerstate(o, ur);
 
+       case TREQ_SIM_SET_PROVISIONING:
+               tcore_check_null_ret_err("ops->set_provisioning",
+                       ops->set_provisioning, TCORE_RETURN_ENOSYS);
+
+               return ops->set_provisioning(o, ur);
+
        default:
                warn("unhandled request command[%d]", command);
        break;
similarity index 100%
rename from src/co_sms.c
rename to src/core_object/co_sms.c
similarity index 100%
rename from src/co_ss.c
rename to src/core_object/co_ss.c
index 20e26a8..708fe99 100644 (file)
--- a/src/mux.c
+++ b/src/mux.c
@@ -772,7 +772,7 @@ static gboolean _cmux_recv_cmux_data(tcore_cmux_object *cmux_obj,
                return FALSE;
        }
 
-       dbg("Dispatching to logical HAL - hal: [0x%x]", hal);
+       dbg("Dispatching to logical HAL - hal: [%p]", hal);
        if (tcore_hal_dispatch_response_data(hal, 0,
                        cmux_obj->internal_mux.info_field_len,
                        cmux_obj->internal_mux.info_field)
index da19106..b9fc4c8 100644 (file)
@@ -502,6 +502,28 @@ TReturn tcore_server_dispatch_request(Server *s, UserRequest *ur)
        if (!s || !ur)
                return TCORE_RETURN_EINVAL;
 
+       /* In case Manager is available, process Request in Manager */
+       if (s->manager) {
+               enum tcore_manager_return mgr_ret;
+
+               mgr_ret = tcore_manager_dispatch_request(s->manager, ur);
+               switch (mgr_ret) {
+               case TCORE_MANAGER_RETURN_FAILURE:
+                       return TCORE_RETURN_FAILURE;
+
+               case TCORE_MANAGER_RETURN_STOP:
+                       return TCORE_RETURN_SUCCESS;
+
+               case TCORE_MANAGER_RETURN_CONTINUE_IMS:
+                       ops_type = TCORE_OPS_TYPE_IMS;
+               break;
+
+               default:
+                       ops_type = TCORE_OPS_TYPE_CP;
+               break;
+               }
+       }
+
        for (list = s->hook_list_request; list; list = list->next) {
                hook = list->data;
                if (!hook)
@@ -518,22 +540,6 @@ TReturn tcore_server_dispatch_request(Server *s, UserRequest *ur)
                }
        }
 
-       /* In case Manager is available, process Request in Manager */
-       if (s->manager) {
-               enum tcore_manager_return mgr_ret;
-
-               mgr_ret = tcore_manager_dispatch_request(s->manager, ur);
-
-               if (mgr_ret == TCORE_MANAGER_RETURN_FAILURE)
-                       return TCORE_RETURN_FAILURE;
-               else if (mgr_ret == TCORE_MANAGER_RETURN_STOP)
-                       return TCORE_RETURN_SUCCESS;
-               else if (mgr_ret == TCORE_MANAGER_RETURN_CONTINUE_IMS)
-                       ops_type = TCORE_OPS_TYPE_IMS;
-               else
-                       ops_type = TCORE_OPS_TYPE_CP;
-       }
-
        modem_name = tcore_user_request_get_modem_name(ur);
        if (!modem_name)
                return TCORE_RETURN_EINVAL;
@@ -582,32 +588,17 @@ TReturn tcore_server_dispatch_request(Server *s, UserRequest *ur)
        return ret;
 }
 
-TReturn tcore_server_send_notification(Server *s, CoreObject *source,
-               enum tcore_notification_command command,
-               unsigned int data_len, void *data)
+TReturn tcore_server_broadcast_notification(Server *s, CoreObject *source,
+       enum tcore_notification_command command, unsigned int data_len, void *data)
 {
        GSList *list;
        Communicator *comm;
        struct hook_notification_type *hook;
+
        if (!s)
                return TCORE_RETURN_EINVAL;
 
-       /* In case Manager is available, process Notification in Manager */
-       if (s->manager) {
-               enum tcore_manager_return mgr_ret;
-
-               /* Send notification to 'manager' */
-               mgr_ret = tcore_manager_send_notification(s->manager,
-                       source, command, data_len, data);
-
-               if (mgr_ret == TCORE_MANAGER_RETURN_FAILURE)
-                       return TCORE_RETURN_FAILURE;
-               else if (mgr_ret == TCORE_MANAGER_RETURN_STOP)
-                       return TCORE_RETURN_SUCCESS;
-               /* in other cases, send notification to communicator. */
-       }
-
-       for (list = s->hook_list_notification; list;) {
+       for (list = s->hook_list_notification; list; ) {
                hook = list->data;
                list = list->next;
                if (!hook)
@@ -620,7 +611,7 @@ TReturn tcore_server_send_notification(Server *s, CoreObject *source,
                                return TCORE_RETURN_SUCCESS;
        }
 
-       for (list = s->communicators; list;) {
+       for (list = s->communicators; list; ) {
                comm = list->data;
                list = list->next;
                if (!comm)
@@ -632,6 +623,30 @@ TReturn tcore_server_send_notification(Server *s, CoreObject *source,
        return TCORE_RETURN_SUCCESS;
 }
 
+TReturn tcore_server_send_notification(Server *s, CoreObject *source,
+               enum tcore_notification_command command,
+               unsigned int data_len, void *data)
+{
+       if (!s)
+               return TCORE_RETURN_EINVAL;
+
+       /* In case Manager is available, process Notification in Manager */
+       if (s->manager) {
+               enum tcore_manager_return mgr_ret;
+
+               /* Send notification to 'manager' */
+               mgr_ret = tcore_manager_send_notification(s->manager,
+                               source, command, data_len, data);
+               if (mgr_ret == TCORE_MANAGER_RETURN_FAILURE)
+                       return TCORE_RETURN_FAILURE;
+               else if (mgr_ret == TCORE_MANAGER_RETURN_STOP)
+                       return TCORE_RETURN_SUCCESS;
+               /* in other cases, send notification to communicator. */
+       }
+
+       return tcore_server_broadcast_notification(s, source, command, data_len, data);
+}
+
 TReturn tcore_server_add_request_hook(Server *s,
        enum tcore_request_command command,
        TcoreServerRequestHook func, void *user_data)
@@ -925,13 +940,13 @@ TReturn tcore_server_load_modem_plugin(Server *s,
        /* Open '.so' */
        handle = dlopen(filename, RTLD_LAZY);
        if (handle == NULL) {
-               err("Failed to load '%s': %s", filename, dlerror());
+               err("dlopen() failed:[%s]", filename);
                goto out;
        }
 
        desc = dlsym(handle, "plugin_define_desc");
        if (desc == NULL) {
-               err("Failed to obtain the address of plugin_define_desc: %s", dlerror());
+               err("dlsym() failed:[%s]", "plugin_define_desc");
                dlclose(handle);
                goto out;
        }
index c636cc9..75b4870 100644 (file)
@@ -297,6 +297,20 @@ gboolean tcore_storage_read_query_database(Storage *strg, void *handle,
                        in_param, out_param, out_param_cnt);
 }
 
+gboolean tcore_storage_read_query_database_in_order(Storage *strg, void *handle,
+       const char *query, GHashTable *in_param,
+       GSList **out_param, int out_param_cnt)
+{
+       if (!strg || !handle || !query)
+               return FALSE;
+
+       if (!strg->ops || !strg->ops->read_query_database)
+               return FALSE;
+
+       return strg->ops->read_query_database_in_order(strg, handle, query,
+                       in_param, out_param, out_param_cnt);
+}
+
 gboolean tcore_storage_insert_query_database(Storage *strg, void *handle,
        const char *query, GHashTable *in_param)
 {
index 33bf4ae..269811e 100644 (file)
@@ -1328,14 +1328,7 @@ TReturn tcore_util_reset_ipv4_socket(const char *name, const char *ipaddr)
                close(fd);
                return TCORE_RETURN_FAILURE;
        }
-
-       if (ipaddr) {
-               dbg("devname: %s, ipaddr: %s", name, ipaddr);
-       } else {
-               memset(&sai, 0, sizeof(struct sockaddr_in));
-               memcpy(&sai, &ifr.ifr_addr, sizeof(struct sockaddr_in));
-               dbg("devname: %s, ipaddr: %s", name, inet_ntoa(sai.sin_addr));
-       }
+       dbg("devname: [%s], ipaddr: [%s]", name, ipaddr);
 
        close(fd);
        return TCORE_RETURN_SUCCESS;