#include <auth-passwd.h>
#include <efl_extension.h>
+#include <E_DBus.h>
+
#include "setting-backup-and-reset-main-view.h"
#include "setting-backup-and-reset-cloud-view.h"
evas_object_freeze_events_set(data, EINA_FALSE);
}
+
+static void _dbus_call_notify_cb(DBusPendingCall *pending, void *popup)
+{
+ SETTING_TRACE("dbus call end %p %d", pending,
+ dbus_pending_call_get_completed(pending));
+ if (TRUE == dbus_pending_call_get_completed(pending))
+ evas_object_del(popup);
+}
+
static void create_transition_popup(SettingBackupReset *sbr)
{
+ DBusMessage *message = NULL;
+ DBusConnection *conn = NULL;
+ DBusPendingCall *pending_call = NULL;
Elm_Transit *transit;
Eina_List *image_list = NULL;
elm_transit_repeat_times_set(transit, 100);
elm_transit_go(transit);
evas_object_freeze_events_set(box, EINA_TRUE);
+
+ conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
+ if (!conn) {
+ SETTING_TRACE_WARNING("dbus_bus_get() error");
+ return;
+ }
+ message = dbus_message_new_signal("/com/samsung/factoryreset",
+ "com.samsung.factoryreset.start",
+ "setting");
+ if (!message) {
+ SETTING_TRACE_WARNING("dbus_message_new_signal() error");
+ dbus_connection_unref(conn);
+ return;
+ }
+ dbus_message_set_destination(message, "com.samsung.factoryreset");
+
+ if (FALSE ==
+ dbus_connection_send_with_reply(conn, message, &pending_call, 100)) {
+ SETTING_TRACE_WARNING("dbus_connection_send_with_reply() error");
+ dbus_message_unref(message);
+ dbus_connection_unref(conn);
+ return;
+ }
+
+ if (FALSE == dbus_pending_call_set_notify(pending_call,
+ _dbus_call_notify_cb, popup, NULL)) {
+ SETTING_TRACE("dbus_pending_call_set_notify() error");
+ }
+
+ dbus_pending_call_block(pending_call);
+ dbus_message_unref(message);
+ dbus_connection_unref(conn);
}
static void _password_check_result_cb(app_control_h request,