_E("Failed to make thread");
}
-static int dbus_method_sync(const char *dest, const char *path,
- const char *interface, const char *method,
- const char *sig, char *param[])
-{
- DBusConnection *conn = NULL;
- DBusMessage *msg = NULL;
- DBusMessageIter iter;
- DBusMessage *reply = NULL;
- DBusError err;
- int ret, result;
-
- conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
- if (!conn) {
- _E("dbus_bus_get error");
- return -EPERM;
- }
-
- msg = dbus_message_new_method_call(dest, path, interface, method);
- if (!msg) {
- _E("dbus_message_new_method_call(%s:%s-%s)", path, interface, method);
- ret = -EBADMSG;
- goto out;
- }
-
- dbus_message_iter_init_append(msg, &iter);
- ret = append_variant(&iter, sig, param);
- if (ret < 0) {
- _E("append_variant error(%d)", ret);
- goto out;
- }
-
- dbus_error_init(&err);
-
- reply = dbus_connection_send_with_reply_and_block(conn, msg, DBUS_REPLY_TIMEOUT, &err);
- if (!reply) {
- _E("dbus_connection_send error(%s:%s)", err.name, err.message);
- dbus_error_free(&err);
- ret = -ECOMM;
- goto out;
- }
-
- ret = dbus_message_get_args(reply, &err, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID);
- if (!ret) {
- _E("no message : [%s:%s]", err.name, err.message);
- dbus_error_free(&err);
- ret = -ENOMSG;
- goto out;
- }
-
- ret = result;
-
-out:
- if (msg)
- dbus_message_unref(msg);
- if (reply)
- dbus_message_unref(reply);
- if (conn)
- dbus_connection_unref(conn);
- return ret;
-}
-
int reset_window_priority(Evas_Object *win, int priority)
{
Ecore_X_Window xwin;