#define MIN_MOVE_DISTANCE 30
#ifdef __LP64__
-typedef int64_t int_of_ptr_size;
+typedef long long int int_of_ptr_size;
#else
typedef int int_of_ptr_size;
#endif
ret = storage_get_internal_memory_size(&s);
if (0 == ret) {
SETTING_TRACE("Total = %llu, Available = %llu",
- (s.f_frsize * s.f_blocks),
- (s.f_bsize * s.f_bavail));
+ (long long unsigned int)(s.f_frsize * s.f_blocks),
+ (long long unsigned int)(s.f_bsize * s.f_bavail));
tmp_total = (double)s.f_frsize * s.f_blocks;
#if 0
*avail = (double)s.f_bfree * s.f_frsize;
} Cycle_Mode_E;
typedef struct {
- int64_t total_data_used;
- int64_t warning;
- int64_t limit;
+ long long int total_data_used;
+ long long int warning;
+ long long int limit;
Cycle_Mode_E cycle_mode;
time_t interval_from;
time_t interval_to;
int get_days_in_current_month();
-void get_data_amount_str(const char *prefix, int64_t num_bytes, char *txt_out,
+void get_data_amount_str(const char *prefix, long long int num_bytes, char *txt_out,
int len_max);
-void get_data_int_amount_str(int64_t num_bytes, char *int_amount_str,
+void get_data_int_amount_str(long long int num_bytes, char *int_amount_str,
int len_max);
-void get_data_unit_str(int64_t num_bytes, char *unit_str, int len_max);
+void get_data_unit_str(long long int num_bytes, char *unit_str, int len_max);
/**
* @brief Formats string composed of number and ordinal number postfix
bool compare_subscriber_ids(const char *id_a, const char *id_b);
restrictions_result set_mobile_limit_restrictions(stc_h stc_handle,
- const char *subscriber_id, int64_t limit, int64_t warning_limit);
+ const char *subscriber_id, long long int limit, long long int warning_limit);
restrictions_result set_mobile_restriction_rule_parameters(
- stc_restriction_rule_h rule, const char *subscriber_id, int64_t limit,
- int64_t warning_limit);
+ stc_restriction_rule_h rule, const char *subscriber_id, long long int limit,
+ long long int warning_limit);
bool unset_mobile_limit_restrictions(stc_h stc_handle,
stc_restriction_rule_cb restrictions_cb, void *data);
long long hard_limit_data,
time_t interval_from, time_t interval_to)
{
- int64_t gigs_multiplier = 0;
+ long long int gigs_multiplier = 0;
char buff[64] = {'\0',};
_get_time_interval_str(interval_from, interval_to, buff, sizeof(buff));
elm_layout_text_set(layout, "timespan_txt", buff);
#include "smartmanager-data-usage-mobile-settings.h"
#include "smartmanager-utils.h"
-#define MAX_LIMIT_IN_BYTES (((int64_t)LONG_MAX+1)*50)
+#define MAX_LIMIT_IN_BYTES (((long long int)LONG_MAX+1)*50)
static int _create(void *data);
static int _destroy(void *data);
}
static void _entry_set_displayed_value(Evas_Object *entry, Evas_Object *button,
- int64_t value)
+ long long int value)
{
char int_amount_buf[256] = {0};
char unit_buf[256] = {0};
int ret = STC_ERROR_NONE;
char *app_id = NULL;
char *subscriber_id = NULL;
- int64_t limit = 0;
- int64_t warning_limit = 0;
+ long long int limit = 0;
+ long long int warning_limit = 0;
stc_iface_type_e iface_type = STC_IFACE_UNKNOWN;
stc_restriction_rule_h rule = NULL;
restrictions_result restrictions_res = RESTRICTIONS_ERROR;
SETTING_TRACE_ERROR(
"set_mobile_restriction_rule_parameters() error");
- stc_restriction_rule_destroy(mobile_rule);
+ stc_restriction_rule_destroy(rule);
free(subscriber_id);
return STC_CALLBACK_CONTINUE;
}
if (STC_ERROR_NONE != ret) {
SETTING_TRACE_ERROR("stc_unset_restriction() error: %s",
get_error_message(ret));
- stc_restriction_rule_destroy(mobile_rule);
+ stc_restriction_rule_destroy(rule);
free(subscriber_id);
return STC_CALLBACK_CONTINUE;
}
- stc_restriction_rule_destroy(mobile_rule);
+ stc_restriction_rule_destroy(rule);
}
free(subscriber_id);
if (set_mobile_limit_restrictions(smd->stc,
smd->selected_sim_subscriber_id,
smd->selected_sim_limits->limit,
- (int64_t)value) == RESTRICTIONS_ERROR)
+ (long long int)value) == RESTRICTIONS_ERROR)
SETTING_TRACE_DEBUG("Warning limit not writen to stc.");
- smd->selected_sim_limits->warning = (int64_t)value;
+ smd->selected_sim_limits->warning = (long long int)value;
evas_object_del(popup_info.popup);
} else {
create_toast_popup(popup_info.popup,
if (value > smd->selected_sim_limits->warning) {
if (set_mobile_limit_restrictions(smd->stc,
smd->selected_sim_subscriber_id,
- (int64_t)value,
+ (long long int)value,
smd->selected_sim_limits->warning) ==
RESTRICTIONS_ERROR)
SETTING_TRACE_DEBUG("Limit not writen to stc.");
- smd->selected_sim_limits->limit = (int64_t)value;
+ smd->selected_sim_limits->limit = (long long int)value;
evas_object_del(popup_info.popup);
} else {
create_toast_popup(popup_info.popup,
char *app_id = NULL;
char *subscriber_id = NULL;
const char *subscriber_id_to_look_for = user_data;
- int64_t incoming = 0;
- int64_t outgoing = 0;
+ long long int incoming = 0;
+ long long int outgoing = 0;
stc_iface_type_e iface = STC_IFACE_UNKNOWN;
SETTING_TRACE_DEBUG("per app cb, looking for subscriber id: %s",
static stc_callback_ret_e _total_stats_cb(stc_error_e result,
stc_stats_info_h info, void *user_data)
{
- int64_t incoming = 0;
- int64_t outgoing = 0;
+ long long int incoming = 0;
+ long long int outgoing = 0;
char *subscriber_id = NULL;
const char *subscriber_id_to_look_for = user_data;
int ret = STC_ERROR_NONE;
return now_tm.tm_mday;
}
-void get_data_amount_str(const char *prefix, int64_t num_bytes, char *txt_out,
+void get_data_amount_str(const char *prefix, long long int num_bytes, char *txt_out,
int len_max)
{
float amount = 0.0;
}
}
-void get_data_int_amount_str(int64_t num_bytes, char *int_amount_str,
+void get_data_int_amount_str(long long int num_bytes, char *int_amount_str,
int len_max)
{
int amount = 0;
}
}
-void get_data_unit_str(int64_t num_bytes, char *unit_str, int len_max)
+void get_data_unit_str(long long int num_bytes, char *unit_str, int len_max)
{
int amount = 0;
restrictions_result set_mobile_restriction_rule_parameters(
stc_restriction_rule_h rule,
const char *subscriber_id,
- int64_t limit,
- int64_t warning_limit)
+ long long int limit,
+ long long int warning_limit)
{
SETTING_TRACE_BEGIN;
int ret = STC_ERROR_NONE;
}
restrictions_result set_mobile_limit_restrictions(stc_h stc_handle,
- const char *subscriber_id, int64_t limit, int64_t warning_limit)
+ const char *subscriber_id, long long int limit, long long int warning_limit)
{
SETTING_TRACE_BEGIN;
int ret = STC_ERROR_NONE;