Add DATAUSAGE_WARNING and DATAUSAGE_DISABLED to fix build warning.
Change-Id: If8421e8a2bc429570f4daee811dc27b7f505e9cd
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
return activate_notification_no_param(obj, msg, BATTERY_CRITICAL_CHG_ACT);
}
+/* Datausage */
+static DBusMessage *data_warning_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+ set_timer_to_terminate();
+ return activate_notification_no_param(obj, msg, DATAUSAGE_WARNING);
+}
+
+static DBusMessage *data_disabled_noti_on(E_DBus_Object *obj, DBusMessage *msg)
+{
+ set_timer_to_terminate();
+ return activate_notification_no_param(obj, msg, DATAUSAGE_DISABLED);
+}
+
/* Notification Off */
static DBusMessage *noti_off(E_DBus_Object *obj, DBusMessage *msg)
{
{ "TempCooldownNotiOff" , "i" , "i" , noti_off },
/* SD Card */
{ "SDcardNoti" , "s" , "i" , sdcard_noti },
+ /* Data Usage */
+ { "DataWarningNotiOn" , NULL , "i" , data_warning_noti_on },
+ { "DataWarningNotiOff" , "i" , "i" , noti_off },
+ { "DataDisabledNotiOn" , NULL , "i" , data_disabled_noti_on },
+ { "DataDisabledNotiOff" , "i" , "i" , noti_off },
/* Add notifications here */
};
/* Setting ugs */
#define SETTING_ENCRYPTING_APP "org.tizen.setting.encrypting"
#define SETTING_LIGHTOFF_APP "org.tizen.setting.turnofflight"
-#define SETTING_DATAUSAGE_UG "setting-datausage-efl"
+#define SETTING_DATAUSAGE_APP "org.tizen.setting-data"
/* App to show Host devices list */
#define HOST_DEVICES "org.tizen.host-devices"
b = bundle_create();
if (b)
- appsvc_set_pkgname(b, SETTING_DATAUSAGE_UG);
+ appsvc_set_pkgname(b, SETTING_DATAUSAGE_APP);
ret = add_notification(NOTIFICATION_TYPE_NOTI,
NOTIFICATION_LY_NOTI_EVENT_SINGLE,
b = bundle_create();
if (b)
- appsvc_set_pkgname(b, SETTING_DATAUSAGE_UG);
+ appsvc_set_pkgname(b, SETTING_DATAUSAGE_APP);
ret = add_notification(NOTIFICATION_TYPE_ONGOING,
NOTIFICATION_LY_ONGOING_EVENT,
{
int ret = -EINVAL;
+#ifndef PROFILE_MOBILE // event noti should be supported in mobile profile only
+ return ret;
+#endif
+
if (type == BATTERY_FULL) {
ret = add_notification(NOTIFICATION_TYPE_ONGOING,
NOTIFICATION_LY_ONGOING_EVENT,
_D("Load notification");
// event noti should be supported in mobile profile only
-#ifdef PROFILE_MOBILE
priv_id = launch_notification_no_param_by_type(type);
-#else
- priv_id = -1;
-#endif
if (priv_id < 0)
_E("FAIL: launch_noti_by_type()");
static void ode_launch_settings(const struct popup_ops *ops)
{
unload_simple_popup(ops);
- launch_app(SETTING_MMC_ENCRYPTION_UG);
+ launch_app(EXT_SETTING_MMC_UG);
terminate_if_no_popup();
}
char* gl_text_get(int index)
{
- char *text = NULL, buffer[BUF_MAX] = {NULL};
+ char *text = NULL, buffer[BUF_MAX] = {'\0',};
if (index == 2) {
text = _(items[2]);
Evas_Object *win;
struct object_ops *obj;
int ret;
- char content[BUF_MAX] = {NULL};
+ char content[BUF_MAX] = {'\0',};
ret = get_object_by_ops(ops, &obj);
if (ret < 0) {
static guint noti_timer;
static GMainLoop *loop;
-static int loop_type = LOOP_ERROR;
+static int looptype = LOOP_ERROR;
-static void quit_main_loop(ltype)
+static void quit_main_loop(int ltype)
{
switch (ltype) {
case LOOP_G_MAIN_LOOP:
static gboolean time_expired(gpointer data)
{
feedback_deinitialize();
- quit_main_loop(loop_type);
+ quit_main_loop(looptype);
return FALSE;
}
return 0;
type = atoi(argv[1]);
- loop_type = get_main_loop_type(type);
+ looptype = get_main_loop_type(type);
- ret = init_main_loop(loop_type);
+ ret = init_main_loop(looptype);
if (ret < 0) {
_E("Failed to init main loop (%d)", ret);
return ret;
goto out;
}
- start_main_loop(loop_type);
+ start_main_loop(looptype);
out:
ret = app_terminate(type);
if (ret < 0)
_E("Failed to release handlers(%d)", ret);
- finalize_main_loop(loop_type);
+ finalize_main_loop(looptype);
return 0;
}