int64_t warning_limit);
bool unset_mobile_limit_restrictions(stc_h stc_handle, stc_restriction_info_cb restrictions_cb, void *data);
+bool save_cycle_start_value(int cycle_start_value);
+bool save_cycle_interval_value(int cycle_interval_value);
+bool save_cycle_mode_value(int cycle_mode);
+bool load_cycle_start_value(int *cycle_start_value);
+bool load_cycle_interval_value(int *cycle_interval_value);
+bool load_cycle_mode_value(int *cycle_mode);
+
#endif /* SMARTMANAGER_UTILS_H_ */
elm_naviframe_item_pop_cb_set(nf_it, _pop_view_cb, smd);
sm_view_data_usage_mobile.is_create = 1;
+
SETTING_TRACE_END;
return true;
}
Elm_Object_Item *item = (Elm_Object_Item *)event_info;
elm_genlist_item_selected_set(item, EINA_FALSE);
-
switch (element->type) {
case ELEMENT_TYPE_WARNING:
_create_limit_popup(element->smd, "Set data usage warning level", ELEMENT_TYPE_WARNING);
#include <stdio.h>
#include <stdlib.h>
+#include <app_preference.h>
+
static bool _create_stats_list(stc_h stc, stc_iface_type_e iface,
stc_stats_info_cb stats_cb);
static bool _get_total_stats(stc_h stc, stc_iface_type_e iface_type,
return _get_restrictions(stc_handle, STC_IFACE_DATACALL, _get_and_unset_limit_restrictions_cb, data);
SETTING_TRACE_END;
}
+
+bool load_int_value(const char *key, int *value)
+{
+ bool existing = false;
+ int res = preference_is_existing(key, &existing);
+ if (PREFERENCE_ERROR_NONE != res || !existing)
+ return false;
+ res = preference_get_int(key, value);
+ if (PREFERENCE_ERROR_NONE != res)
+ return false;
+ return true;
+}
+
+bool save_cycle_start_value(int cycle_start_value)
+{
+ int res = preference_set_int("cycle_start", cycle_start_value);
+ if (PREFERENCE_ERROR_NONE != res)
+ return false;
+ return true;
+}
+
+bool save_cycle_interval_value(int cycle_interval_value)
+{
+ int res = preference_set_int("cycle_interval", cycle_interval_value);
+ if (PREFERENCE_ERROR_NONE != res)
+ return false;
+ return true;
+}
+
+bool save_cycle_mode_value(int cycle_mode)
+{
+ int res = preference_set_int("cycle_mode", cycle_mode);
+ if (PREFERENCE_ERROR_NONE != res)
+ return false;
+ return true;
+}
+
+bool load_cycle_start_value(int *cycle_start_value)
+{
+ return load_int_value("cycle_start", cycle_start_value);
+}
+
+bool load_cycle_interval_value(int *cycle_interval_value)
+{
+ return load_int_value("cycle_interval", cycle_interval_value);
+}
+
+bool load_cycle_mode_value(int *cycle_mode)
+{
+ return load_int_value("cycle_mode", cycle_mode);
+}