static DBusMessage *powerkey_popup(E_DBus_Object *obj, DBusMessage *msg)
{
set_timer_to_terminate();
- return launch_powerkey_popup(obj, msg, POWERKEY_SYSPOPUP);
+ return launch_popup(obj, msg, POWERKEY_SYSPOPUP);
}
/* Overheat popup */
static const struct edbus_method
dbus_powerkey_methods[] = {
- { "PopupLaunch", NULL, "i", powerkey_popup },
+ { "PopupLaunch", "a{ss}", "i", powerkey_popup },
/* Add methods here */
};
return reply;
}
-
-DBusMessage *launch_powerkey_popup(E_DBus_Object *obj,
- DBusMessage *msg, char *name)
-{
- DBusMessage *reply;
- DBusMessageIter iter;
- int ret;
- bundle *b = NULL;
-
- if (!name) {
- ret = -EINVAL;
- goto out;
- }
-
- _I("launch popup (%s)", name);
-
- b = bundle_create();
- if (!b) {
- ret = -ENOMEM;
- goto out;
- }
-
- ret = bundle_add(b, POPUP_CONTENT, POPUP_NAME_POWERKEY);
- if (ret < 0) {
- _E("Failed to add bundle (%s,%s) (ret:%d)", POPUP_CONTENT, POPUP_NAME_POWERKEY, ret);
- goto out;
- }
-
- ret = syspopup_launch(name, b);
- if (ret < 0)
- _E("Failed to launch popup(%d)", ret);
-
-out:
- if (b)
- bundle_free(b);
-
- reply = dbus_message_new_method_return(msg);
- dbus_message_iter_init_append(reply, &iter);
- dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret);
- return reply;
-}