* @since_tizen 4.0
*/
typedef enum {
- STC_ROAMING_UNKNOWN, /**< Roaming unknown */
+ STC_ROAMING_DISABLED, /**< Not in roaming */
STC_ROAMING_ENABLED, /**< In roaming */
- STC_ROAMING_DISABLED, /**< Not in roaming */
} stc_roaming_type_e;
/**
* @since_tizen 4.0
*/
typedef enum {
- STC_PROCESS_STATE_UNKNOWN = 0, /**< Unknown state */
- STC_PROCESS_STATE_FOREGROUND = 1 << 1, /**< Foreground state */
- STC_PROCESS_STATE_BACKGROUND = 1 << 2, /**< Background state */
+ STC_PROCESS_STATE_UNKNOWN, /**< Unknown state */
+ STC_PROCESS_STATE_FOREGROUND, /**< Foreground state */
+ STC_PROCESS_STATE_BACKGROUND, /**< Background state */
} stc_process_state_e;
/**
const char *_stc_convert_roaming_to_string(stc_roaming_type_e type)
{
switch (type) {
- case STC_ROAMING_UNKNOWN:
- return "Unknown";
- case STC_ROAMING_ENABLED:
- return "Enable";
case STC_ROAMING_DISABLED:
return "Disable";
+ case STC_ROAMING_ENABLED:
+ return "Enable";
default:
return "Unknown";
}
if (rule->subscriber_id[0] != '\0')
STC_LOGD("Sub_id: [%s]", rule->subscriber_id);
- if (rule->roaming_type != STC_ROAMING_UNKNOWN)
- STC_LOGD("Roaming: [%s]", _stc_convert_roaming_to_string(rule->roaming_type));
+ STC_LOGD("Roaming: [%s]", _stc_convert_roaming_to_string(rule->roaming_type));
if (rule->rstn_type != STC_RSTN_TYPE_UNKNOWN)
STC_LOGD("Type: [%s]", _stc_convert_rstn_type_to_string(rule->rstn_type));
restriction_rule->month_start_date);
}
- STC_RETURN_VAL_IF(restriction_rule->roaming_type <= STC_ROAMING_UNKNOWN ||
- restriction_rule->roaming_type > STC_ROAMING_DISABLED,
+ STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
STC_ERROR_INVALID_PARAMETER,
"Roaming type is not valid [%s]",
_stc_convert_roaming_to_string(restriction_rule->roaming_type));
"Invalid month start date [%d]",
restriction_rule->month_start_date);
- STC_RETURN_VAL_IF(restriction_rule->roaming_type <= STC_ROAMING_UNKNOWN ||
- restriction_rule->roaming_type > STC_ROAMING_DISABLED,
+ STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
STC_ERROR_INVALID_PARAMETER,
"Roaming type is not valid [%s]",
_stc_convert_roaming_to_string(restriction_rule->roaming_type));
"Invalid rx limit [%lld] bytes",
restriction_rule->data_warn_limit);
- STC_RETURN_VAL_IF(restriction_rule->roaming_type <= STC_ROAMING_UNKNOWN ||
- restriction_rule->roaming_type > STC_ROAMING_DISABLED,
+ STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
STC_ERROR_INVALID_PARAMETER,
"Roaming type is not valid [%d]",
restriction_rule->roaming_type);
"Invalid rx limit [%lld] bytes",
restriction_rule->data_warn_limit);
- STC_RETURN_VAL_IF(restriction_rule->roaming_type <= STC_ROAMING_UNKNOWN ||
- restriction_rule->roaming_type > STC_ROAMING_DISABLED,
+ STC_RETURN_VAL_IF(restriction_rule->roaming_type > STC_ROAMING_ENABLED,
STC_ERROR_INVALID_PARAMETER,
"Roaming type is not valid [%d]",
restriction_rule->roaming_type);
(stc_restriction_rule_s *)rule;
switch (roaming_type) {
- case STC_ROAMING_UNKNOWN:
- case STC_ROAMING_ENABLED:
case STC_ROAMING_DISABLED:
+ case STC_ROAMING_ENABLED:
restriction_rule->roaming_type = roaming_type;
break;
default:
if (info->subscriber_id[0] != '\0')
STC_LOGD("Sub_id: [%s]", info->subscriber_id);
- if (info->roaming_type != STC_ROAMING_UNKNOWN)
- STC_LOGD("Roaming: [%d]", info->roaming_type);
+ STC_LOGD("Roaming: [%d]", info->roaming_type);
STC_LOGD("Received: [%lld]", info->cnt.incoming_bytes);
STC_LOGD("Sent: [%lld]", info->cnt.outgoing_bytes);
return ret;
}
- if (roaming > STC_ROAMING_UNKNOWN && roaming <= STC_ROAMING_DISABLED) {
+ if (roaming <= STC_ROAMING_ENABLED) {
ret = stc_restriction_rule_set_roaming_type(g_restriction_rule, roaming);
if (ret == STC_ERROR_NONE)
msg(LOG_GREEN "Success to set roaming type" LOG_END);
{ "2", "Subscriber ID", NULL, NULL, g_subscriber_id},
{ "3", "Interface type(1.Tel/2.Wifi/3.Wired/4.BT/5.All)", NULL, NULL, g_iface_type},
{ "4", "Interface name", NULL, NULL, g_iface_name},
- { "5", "Roaming(1.Enable/2.Disable)", NULL, NULL, g_roaming},
+ { "5", "Roaming(0.Disable/1.Enable)", NULL, NULL, g_roaming},
{ "6", "Type(1.Accept/2.Drop)", NULL, NULL, g_rstn_type},
{ "7", "Data limit", NULL, NULL, g_data_limit},
{ "8", "Warn limit", NULL, NULL, g_data_warn_limit},
const char *test_stc_convert_roaming_to_string(stc_roaming_type_e type)
{
switch (type) {
- case STC_ROAMING_UNKNOWN:
- return "Unknown";
- case STC_ROAMING_ENABLED:
- return "Enable";
case STC_ROAMING_DISABLED:
return "Disable";
+ case STC_ROAMING_ENABLED:
+ return "Enable";
default:
return "Unknown";
}