ADD_DEFINITIONS("-DWAYLAND")
ENDIF(with_wayland)
-pkg_check_modules(libpkgs REQUIRED aul dlog bundle sqlite3 glib-2.0 gio-2.0 libtzplatform-config)
+pkg_check_modules(libpkgs REQUIRED dlog bundle sqlite3 glib-2.0 gio-2.0 libtzplatform-config)
FOREACH(flag ${libpkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#define SYSPOPUP_DBUS_SIGNAL_INTERFACE "org.tizen.syspopup.signal"
#define SYSPOPUP_DBUS_SP_TERM_SIGNAL "syspopup_term"
+#define AUL_SP_DBUS_PATH "/Org/Tizen/Aul/Syspopup"
+#define AUL_SP_DBUS_SIGNAL_INTERFACE "org.tizen.aul.syspopup"
+#define AUL_SP_DBUS_LAUNCH_REQUEST_SIGNAL "syspopup_launch_request"
+
#endif
--- /dev/null
+<?xml version="1.0"?>
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<busconfig>
+ <policy context="default">
+ <allow send_destination="*" send_interface="org.tizen.aul.syspopup" send_member="syspopup_launch_request" send_type="signal"/>
+ <check send_destination="*" send_interface="org.tizen.aul.syspopup" send_member="syspopup_launch_request" send_type="signal" privilege="http://tizen.org/privilege/appmanager.launch"/>
+ </policy>
+</busconfig>
Source1002: %{name}-devel.manifest
Source1003: %{name}-caller.manifest
Source1004: %{name}-caller-devel.manifest
+Source1005: org.tizen.aul.syspopup.conf.in
BuildRequires: cmake
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(ecore-x)
%endif
-BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(evas)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(libtzplatform-config)
touch %{buildroot}%{_datadir}/popup_noti_term
+mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
+install -m 0644 %SOURCE1005 %{buildroot}%{_sysconfdir}/dbus-1/system.d/org.tizen.aul.syspopup.conf
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%defattr(-,root,root,-)
%{_libdir}/libsyspopup_caller.so.0.1.0
/usr/share/license/%{name}-caller
+%{_sysconfdir}/dbus-1/system.d/org.tizen.aul.syspopup.conf
%files caller-devel
%manifest %{name}-caller-devel.manifest
#include <fcntl.h>
#include <glib.h>
#include <gio/gio.h>
-#include <aul.h>
+#include <bundle.h>
#include "syspopup_core.h"
#include "syspopup_db.h"
#include "syspopup_api.h"
#include "simple_util.h"
+static int syspopup_send_launch_request(const char *appid, bundle *b)
+{
+ GDBusConnection *conn = NULL;
+ GError *err = NULL;
+ bundle_raw *b_raw = NULL;
+ int ret = 0;
+ int len;
+
+#if !(GLIB_CHECK_VERSION(2, 36, 0))
+ g_type_init();
+#endif
+
+ conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
+ if (err) {
+ _E("gdbus connection error: %s", err->message);
+ g_error_free(err);
+ return -1;
+ }
+
+ if (bundle_encode(b, &b_raw, &len) != BUNDLE_ERROR_NONE) {
+ _E("bundle encode error");
+ ret = -1;
+ goto end;
+ }
+
+ if (g_dbus_connection_emit_signal(conn,
+ NULL,
+ AUL_SP_DBUS_PATH,
+ AUL_SP_DBUS_SIGNAL_INTERFACE,
+ AUL_SP_DBUS_LAUNCH_REQUEST_SIGNAL,
+ g_variant_new("(ss)", appid, (char *)b_raw),
+ &err) == FALSE) {
+ _E("emitting the signal error: %s", err->message);
+ ret = -1;
+ goto end;
+ }
+
+ if (g_dbus_connection_flush_sync(conn, NULL, &err) == FALSE) {
+ _E("gdbus connection flush sync failed: %s", err->message);
+ ret = -1;
+ }
+
+end:
+ if (err)
+ g_error_free(err);
+ if (conn)
+ g_object_unref(conn);
+
+ return ret;
+}
+
API int syspopup_launch(char *popup_name, bundle *b)
{
syspopup_info_t *info = NULL;
return -1;
}
- ret = aul_launch_app(info->pkgname, b);
+ ret = syspopup_send_launch_request(info->pkgname, b);
if (ret < 0)
- _E("aul launch error: %d", ret);
+ _E("syspopup launch error: %d", ret);
if (is_bundle == 1)
bundle_free(b);