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
)
};
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;
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);
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);
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
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);
};
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 */
};
#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);
__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);
};
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);
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);
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,
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,
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,
struct telephony_call_cna_info cna;
gboolean forward;
unsigned int active_line;
+ char number_plus[MAX_CALL_NUMBER_LEN];
};
struct tnoti_call_status_waiting {
/* 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 */
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;
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,
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,
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,
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];
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 */
};
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*/
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];
};
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*/
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*/
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;
};
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 {
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;
%define major 0
%define minor 2
-%define patchlevel 91
+%define patchlevel 92
Name: libtcore
Version: %{major}.%{minor}.%{patchlevel}
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);
/* Validate Request */
if (!at->req) {
- err("at->req is NULL");
_emit_unsolicited_message(at, pos);
} else {
tcore_at_final_response ret;
struct tcore_communicator_type {
char *name;
- struct tcore_communitor_operations *ops;
+ struct tcore_communicator_operations *ops;
void *user_data;
Communicator *tcore_communicator_new(TcorePlugin *plugin,
- const char *name, struct tcore_communitor_operations *ops)
+ const char *name, struct tcore_communicator_operations *ops)
{
Communicator *comm;
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);
}
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;
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;
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;
enum co_context_role role;
gboolean default_profile;
gboolean attach_apn;
+ gboolean roaming_apn;
char *apn;
char *addr;
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;
+}
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) */
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;
}
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);
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;
}
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);
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;
}
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");
#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
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;
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)
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)
}
}
- /* 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;
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)
return TCORE_RETURN_SUCCESS;
}
- for (list = s->communicators; list;) {
+ for (list = s->communicators; list; ) {
comm = list->data;
list = list->next;
if (!comm)
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)
/* 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;
}
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)
{
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;