*/
typedef enum {
TELEPHONY_NOTI_SIM_STATUS = 0x10, /**< Notification to be invoked when the SIM card state changes, '#telephony_sim_state_e' will be delivered in notification data */
- TELEPHONY_NOTI_SIM_CALL_FORWARDING_STATE, /**< Notification to be invoked when the SIM call forwarding state changes, 'call_forwarding_state(bool)' will be delivered in notification data (@b Since: 3.0) */
+ TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE, /**< Notification to be invoked when the SIM call forwarding indicator state changes, 'state(bool)' will be delivered in notification data (@b Since: 3.0) */
TELEPHONY_NOTI_NETWORK_SERVICE_STATE = 0x20, /**< Notification to be invoked when the network service state changes, '#telephony_network_service_state_e' will be delivered in notification data */
TELEPHONY_NOTI_NETWORK_CELLID, /**< Notification to be invoked when the cell ID changes, 'cell_id(int)' will be delivered in notification data */
TELEPHONY_SIM_LOCK_STATE_PIN_REQUIRED, /**< SIM is PIN(Personal Identification Number) locked */
TELEPHONY_SIM_LOCK_STATE_PUK_REQUIRED, /**< SIM is PUK(Personal Unblocking Code) locked */
TELEPHONY_SIM_LOCK_STATE_PERM_LOCKED, /**< SIM is permanently blocked(All the attempts for PIN/PUK failed) */
- TELEPHONY_SIM_LOCK_STATE_NCK_REQUIRED, /**< SIM is NCK(Network Control Key) locked */
- TELEPHONY_SIM_LOCK_STATE_NSCK_REQUIRED, /**< SIM is NSCK(Network Subset Control Key) locked */
- TELEPHONY_SIM_LOCK_STATE_SPCK_REQUIRED, /**< SIM is SPCK(Service Provider Control Key) locked */
- TELEPHONY_SIM_LOCK_STATE_CCK_REQUIRED, /**< SIM is CCK(Corporate Control Key) locked */
- TELEPHONY_SIM_LOCK_STATE_PHONE_REQUIRED /**< SIM is PH-SIM(Phone-SIM) locked */
+ TELEPHONY_SIM_LOCK_STATE_NCK_REQUIRED /**< SIM is NCK(Network Control Key) locked */
} telephony_sim_lock_state_e;
/**
int telephony_sim_get_group_id1(telephony_h handle, char **gid1);
/**
- * @brief Gets the call fowarding state of the SIM.
+ * @brief Gets the call fowarding indicator state of the SIM.
* @details If the state is true, incoming call will be forwarded to selected number.
+ * @c state indicates the CFU (Call Forwarding Unconditional) indicator status - Voice.
+ * (3GPP TS 31.102 4.2.64 EF CFIS)
*
* @since_tizen 3.0
* @privlevel public
* @privilege %http://tizen.org/privilege/telephony
*
* @param[in] handle The handle from telephony_init()
- * @param[out] call_forwarding_state The value whether incoming call will be forwarded or not.
- * (true: forwarded, false: not forwarded)
+ * @param[out] state The value whether incoming call will be forwarded or not.
+ * (true: forwarded, false: not forwarded)
*
* @return @c 0 on success,
* otherwise a negative error value
*
* @see telephony_sim_get_state()
*/
-int telephony_sim_get_call_forwarding_state(telephony_h handle, bool *call_forwarding_state);
+int telephony_sim_get_call_forwarding_indicator_state(telephony_h handle, bool *state);
/**
* @}
Name: capi-telephony
Summary: Telephony Core API
-Version: 0.1.55
+Version: 0.1.56
Release: 1
Group: System/Libraries
License: Apache-2.0
switch (noti_id) {
case TELEPHONY_NOTI_SIM_STATUS:
return TAPI_NOTI_SIM_STATUS;
- case TELEPHONY_NOTI_SIM_CALL_FORWARDING_STATE:
+ case TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE:
return TAPI_PROP_SIM_CALL_FORWARD_STATE;
case TELEPHONY_NOTI_NETWORK_SERVICE_STATE:
return TAPI_PROP_NETWORK_SERVICE_TYPE;
int sim_status = _mapping_sim_status(*(TelSimCardStatus_t *)data);
CALLBACK_CALL(&sim_status);
} else if (!g_strcmp0(evt_id, TAPI_PROP_SIM_CALL_FORWARD_STATE)) {
- bool call_forwarding_state = *(bool *)data;
- CALLBACK_CALL(&call_forwarding_state);
+ bool state = *(bool *)data;
+ CALLBACK_CALL(&state);
} else if (!g_strcmp0(evt_id, TAPI_PROP_NETWORK_SERVICE_TYPE)) {
int service_state = _mapping_service_state(*(int *)data);
CALLBACK_CALL(&service_state);
case TAPI_SIM_STATUS_SIM_NCK_REQUIRED:
*lock_state = TELEPHONY_SIM_LOCK_STATE_NCK_REQUIRED;
break;
- case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED:
- *lock_state = TELEPHONY_SIM_LOCK_STATE_NSCK_REQUIRED;
- break;
- case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED:
- *lock_state = TELEPHONY_SIM_LOCK_STATE_SPCK_REQUIRED;
- break;
- case TAPI_SIM_STATUS_SIM_CCK_REQUIRED:
- *lock_state = TELEPHONY_SIM_LOCK_STATE_CCK_REQUIRED;
- break;
- case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED:
- *lock_state = TELEPHONY_SIM_LOCK_STATE_PHONE_REQUIRED;
- break;
default:
*lock_state = TELEPHONY_SIM_LOCK_STATE_UNKNOWN;
break;
return error_code;
}
-int telephony_sim_get_call_forwarding_state(telephony_h handle, bool *call_forwarding_state)
+int telephony_sim_get_call_forwarding_indicator_state(telephony_h handle, bool *state)
{
int error_code;
TapiHandle *tapi_h;
CHECK_INPUT_PARAMETER(handle);
tapi_h = ((telephony_data *)handle)->tapi_h;
CHECK_INPUT_PARAMETER(tapi_h);
- CHECK_INPUT_PARAMETER(call_forwarding_state);
+ CHECK_INPUT_PARAMETER(state);
error_code = tel_get_property_int(tapi_h, TAPI_PROP_SIM_CALL_FORWARD_STATE, &tel_state);
if (error_code == TAPI_API_SUCCESS) {
- *call_forwarding_state = (bool)tel_state;
- LOGI("call_forwarding_state: [%s]", *call_forwarding_state ? "ON" : "OFF");
+ *state = (bool)tel_state;
+ LOGI("Call forwarding indicator state: [%s]", *state ? "ON" : "OFF");
error_code = TELEPHONY_ERROR_NONE;
} else if (error_code == TAPI_API_ACCESS_DENIED) {
LOGE("PERMISSION_DENIED");
static int sim_noti_tbl[] = {
TELEPHONY_NOTI_SIM_STATUS,
- TELEPHONY_NOTI_SIM_CALL_FORWARDING_STATE
+ TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE
};
static int network_noti_tbl[] = {
static void sim_noti_cb(telephony_h handle, telephony_noti_e noti_id, void *data, void *user_data)
{
- LOGI("Noti!! SIM status: [%d]", *(int *)data);
+ switch (noti_id) {
+ case TELEPHONY_NOTI_SIM_STATUS:
+ LOGI("Noti!! SIM status: [%d]", *(int *)data);
+ break;
+ case TELEPHONY_NOTI_SIM_CALL_FORWARDING_INDICATOR_STATE:
+ LOGI("Noti!! SIM Call forwarding indicator state: [%s]", *(bool *)data ? "ON" : "OFF");
+ break;
+ default:
+ break;
+ }
}
static const char *_mapping_service_state(telephony_network_service_state_e service_state)
bool is_changed = FALSE;
telephony_sim_lock_state_e lock_state = 0;
char *gid1 = NULL;
- bool call_forwarding_state = FALSE;
+ bool cf_state = FALSE;
/* Network value */
int cell_id = 0;
free(gid1);
}
- ret_value = telephony_sim_get_call_forwarding_state(handle_list.handle[0], &call_forwarding_state);
+ ret_value = telephony_sim_get_call_forwarding_indicator_state(handle_list.handle[0], &cf_state);
if (ret_value != TELEPHONY_ERROR_NONE) {
- LOGE("telephony_sim_get_call_forwarding_state() failed!!! [%d]", ret_value);
+ LOGE("telephony_sim_get_call_forwarding_indicator_state() failed!!! [%d]", ret_value);
} else {
- LOGI("Call forwarding state is [%s]", call_forwarding_state ? "ON" : "OFF");
+ LOGI("Call forwarding indicator state is [%s]", cf_state ? "ON" : "OFF");
}
/* Network API */