}
static stc_callback_ret_e _get_and_unset_limit_restrictions_cb(
- stc_error_e result, stc_restriction_info_h info, void *user_data)
+ stc_error_e result, stc_restriction_rule_h info, void *user_data)
{
int ret = STC_ERROR_NONE;
char *app_id = NULL;
int64_t limit = 0;
int64_t warning_limit = 0;
stc_iface_type_e iface_type = STC_IFACE_UNKNOWN;
- stc_restriction_status_e status = STC_RESTRICTION_UNKNOWN;
stc_restriction_rule_h rule = NULL;
restrictions_result restrictions_res = RESTRICTIONS_ERROR;
SmartMgrData *smd = (SmartMgrData *)user_data;
return STC_CALLBACK_CONTINUE;
}
- ret = stc_restriction_info_get_app_id(info, &app_id);
+ ret = stc_restriction_rule_get_app_id(info, &app_id);
if (STC_ERROR_NONE != ret || !app_id || strcmp("TOTAL_DATACALL", app_id)) {
free(app_id);
return STC_CALLBACK_CONTINUE;
free(app_id);
- ret = stc_restriction_info_get_status(info, &status);
+ ret = stc_restriction_rule_get_iface_type(info, &iface_type);
if (STC_ERROR_NONE != ret) {
- SETTING_TRACE_ERROR("stc_restriction_info_get_status error: %s",
- get_error_message(ret));
- return STC_CALLBACK_CONTINUE;
- }
-
- ret = stc_restriction_info_get_iface_type(info, &iface_type);
- if (STC_ERROR_NONE != ret) {
- SETTING_TRACE_ERROR("stc_restriction_info_get_iface_type error: %s",
+ SETTING_TRACE_ERROR("stc_restriction_rule_get_iface_type error: %s",
get_error_message(ret));
return STC_CALLBACK_CONTINUE;
}
if (iface_type != STC_IFACE_DATACALL)
return STC_CALLBACK_CONTINUE;
- ret = stc_restriction_info_get_subscriber_id(info, &subscriber_id);
+ ret = stc_restriction_rule_get_subscriber_id(info, &subscriber_id);
if (STC_ERROR_NONE != ret) {
- SETTING_TRACE_ERROR("stc_restriction_info_get_subscriber_id error: %s",
+ SETTING_TRACE_ERROR("stc_restriction_rule_get_subscriber_id error: %s",
get_error_message(ret));
return STC_CALLBACK_CONTINUE;
}
if (compare_subscriber_ids(smd->selected_sim_subscriber_id,
subscriber_id)) {
- ret = stc_restriction_info_get_limit(info, &limit);
+ ret = stc_restriction_rule_get_limit(info, &limit);
if (STC_ERROR_NONE != ret) {
- SETTING_TRACE_ERROR("stc_restriction_info_get_limit() error: %s",
+ SETTING_TRACE_ERROR("stc_restriction_rule_get_limit() error: %s",
get_error_message(ret));
free(subscriber_id);
return STC_CALLBACK_CONTINUE;
}
- ret = stc_restriction_info_get_warning_limit(info, &warning_limit);
+ ret = stc_restriction_rule_get_warning_limit(info, &warning_limit);
if (STC_ERROR_NONE != ret) {
SETTING_TRACE_ERROR(
- "stc_restriction_info_get_warning_limit() error: %s",
+ "stc_restriction_rule_get_warning_limit() error: %s",
get_error_message(ret));
free(subscriber_id);
return STC_CALLBACK_CONTINUE;
static Eina_Bool _pop_view_cb(void *data, Elm_Object_Item *it)
{
SmartMgrData *smd = (SmartMgrData *)data;
- retv_if(!smd, FALSE);
+ retv_if(!smd, EINA_FALSE);
smd->selected_sim_subscriber_id = NULL;
smd->selected_sim_limits = NULL;
static stc_callback_ret_e _total_stats_cb(stc_error_e result,
stc_stats_info_h info, void *user_data);
static stc_callback_ret_e _get_restrictions_cb(stc_error_e result,
- stc_restriction_info_h info, void *user_data);
+ stc_restriction_rule_h info, void *user_data);
static void _initialize_cycle(Data_Limits_T *limits);
static void _read_all_stat_cycles(void);
}
static stc_callback_ret_e _get_restrictions_cb(stc_error_e result,
- stc_restriction_info_h info, void *user_data)
+ stc_restriction_rule_h info, void *user_data)
{
int ret = STC_ERROR_NONE;
char *app_id = NULL;
char *subscriber_id = NULL;
stc_iface_type_e iface_type = STC_IFACE_UNKNOWN;
- stc_restriction_status_e status = STC_RESTRICTION_UNKNOWN;
SETTING_TRACE_DEBUG("restriction cb:");
if (STC_ERROR_NONE != result) {
return STC_CALLBACK_CONTINUE;
}
- (void)stc_restriction_info_get_app_id(info, &app_id);
+ (void)stc_restriction_rule_get_app_id(info, &app_id);
if (!app_id ||
(strcmp("TOTAL_DATACALL", app_id) && strcmp("TOTAL_WIFI", app_id))) {
free(app_id);
SETTING_TRACE_DEBUG("Obtaining restrictions for: %s", app_id);
free(app_id);
- ret = stc_restriction_info_get_status(info, &status);
- if (STC_ERROR_NONE != ret) {
- SETTING_TRACE_ERROR("stc_restriction_info_get_status error: %s",
- get_error_message(ret));
- return STC_CALLBACK_CONTINUE;
- }
-
- (void)stc_restriction_info_get_iface_type(info, &iface_type);
+ (void)stc_restriction_rule_get_iface_type(info, &iface_type);
SETTING_TRACE_DEBUG("Obtained iface: %d", iface_type);
if (iface_type == STC_IFACE_DATACALL) {
- ret = stc_restriction_info_get_subscriber_id(info, &subscriber_id);
+ ret = stc_restriction_rule_get_subscriber_id(info, &subscriber_id);
if (STC_ERROR_NONE == ret) {
SETTING_TRACE_DEBUG("Obtained Subscriber ID: %s", subscriber_id);
if (compare_subscriber_ids(ad.subscriber_id_1, subscriber_id)) {
- (void)stc_restriction_info_get_limit(info,
+ (void)stc_restriction_rule_get_limit(info,
&(ad.sim_1_limits.limit));
- (void)stc_restriction_info_get_warning_limit(info,
+ (void)stc_restriction_rule_get_warning_limit(info,
&(ad.sim_1_limits.warning));
ad.main_view_update_type = MV_UPDATE_SIM_1_WARN_N_LIMIT;
}
if (compare_subscriber_ids(ad.subscriber_id_2, subscriber_id)) {
- (void)stc_restriction_info_get_limit(info,
+ (void)stc_restriction_rule_get_limit(info,
&(ad.sim_2_limits.limit));
- (void)stc_restriction_info_get_warning_limit(info,
+ (void)stc_restriction_rule_get_warning_limit(info,
&(ad.sim_2_limits.warning));
ad.main_view_update_type = MV_UPDATE_SIM_2_WARN_N_LIMIT;
}
}
if (iface_type == STC_IFACE_WIFI) {
- (void)stc_restriction_info_get_limit(info,
+ (void)stc_restriction_rule_get_limit(info,
&(ad.wifi_limits.limit));
- (void)stc_restriction_info_get_warning_limit(info,
+ (void)stc_restriction_rule_get_warning_limit(info,
&(ad.wifi_limits.warning));
ad.main_view_update_type = MV_UPDATE_WIFI_WARN_N_LIMIT;
setting_view_update(ad.main_view, &ad);
stc_stats_info_cb stats_cb, void *cb_data,
time_t t_from, time_t t_to);
static bool _get_restrictions(stc_h stc, stc_iface_type_e iface_type,
- stc_restriction_info_cb restrictions_cb,
+ stc_restriction_rule_cb restrictions_cb,
void *restriction_info_cb_data);
int get_days_in_current_month()
NULL, t_from, t_to);
}
-bool get_sim_restrictions(stc_h stc, stc_restriction_info_cb restrictions_cb)
+bool get_sim_restrictions(stc_h stc, stc_restriction_rule_cb restrictions_cb)
{
return _get_restrictions(stc, STC_IFACE_DATACALL, restrictions_cb, NULL);
}
-bool get_wifi_restrictions(stc_h stc, stc_restriction_info_cb restrictions_cb)
+bool get_wifi_restrictions(stc_h stc, stc_restriction_rule_cb restrictions_cb)
{
return _get_restrictions(stc, STC_IFACE_WIFI, restrictions_cb, NULL);
}
}
static bool _get_restrictions(stc_h stc, stc_iface_type_e iface_type,
- stc_restriction_info_cb restrictions_cb,
+ stc_restriction_rule_cb restrictions_cb,
void *restriction_info_cb_data)
{
int ret = STC_ERROR_NONE;
}
bool unset_mobile_limit_restrictions(stc_h stc_handle,
- stc_restriction_info_cb _get_and_unset_limit_restrictions_cb, void *data)
+ stc_restriction_rule_cb _get_and_unset_limit_restrictions_cb, void *data)
{
return _get_restrictions(stc_handle, STC_IFACE_DATACALL,
_get_and_unset_limit_restrictions_cb, data);