pkg_check_modules(pkgs REQUIRED ${AUL-1_PKG_CHECK_MODULES} )
pkg_check_modules(libpkgs REQUIRED dlog bundle dbus-glib-1 ail xdgmime app-checker libtzplatform-config pkgmgr-info)
-PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 gio-2.0 dlog bundle)
+PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 gio-2.0 dlog bundle rua)
FIND_LIBRARY(LIB_DL dl)
am_daemon/amd_launch.c
am_daemon/amd_status.c
)
-SET(AUL-1_LINK_LIBRARY amd aul_mods app-checker-server rua glib-2.0 bundle ail aul)
+SET(AUL-1_LINK_LIBRARY amd aul_mods app-checker-server glib-2.0 bundle ail aul)
target_link_libraries(${AUL-1_LINK_LIBRARY} ${pkgs_LDFLAGS})
SET(REL_AGENT daemon-manager-release-agent)
#include <aul.h>
#include <glib.h>
#include <bundle.h>
-#include <rua.h>
#include <tzplatform_config.h>
#include "amd_config.h"
return ret;
}
-static gboolean __add_history_handler(gpointer user_data)
-{
- struct rua_rec rec;
- int ret;
- bundle *kb = NULL;
- char *appid = NULL;
- char *app_path = NULL;
- struct appinfo *ai;
- pkt_t *pkt_uid = (pkt_t *)user_data;
-
- if (!pkt_uid)
- return FALSE;
-
- kb = bundle_decode(pkt_uid->pkt->data, pkt_uid->pkt->len);
- appid = (char *)bundle_get_val(kb, AUL_K_PKG_NAME);
-
- ai = (struct appinfo *)appinfo_find(pkt_uid->caller_uid, appid);
- app_path = (char *)appinfo_get_value(ai, AIT_EXEC);
-
- memset((void *)&rec, 0, sizeof(rec));
-
- rec.pkg_name = appid;
- rec.app_path = app_path;
-
- if(pkt_uid->pkt->len > 0) {
- rec.arg = (char *)pkt_uid->pkt->data;
- }
-
- SECURE_LOGD("add rua history %s %s", rec.pkg_name, rec.app_path);
-
- ret = rua_add_history(&rec);
- if (ret == -1)
- _D("rua add history error");
-
- if (kb != NULL)
- bundle_free(kb);
- free(pkt_uid->pkt);
- free(pkt_uid);
-
- return FALSE;
-}
-
static int __get_pid_cb(void *user_data, const char *group, pid_t pid)
{
int *sz = user_data;
pkt_uid->caller_uid = cr.uid;
pkt_uid->pkt = pkt;
- g_timeout_add(1000, __add_history_handler, pkt_uid);
g_timeout_add(1200, __add_item_running_list, item);
}
_raf = amd->af;
- r = rua_init();
- r = rua_clear_history();
-
- _D("rua_clear_history : %d", r);
-
return 0;
}
#include <app-checker.h>
#include <sqlite3.h>
+#include <rua.h>
#define _static_ static inline
#define POLLFD_MAX 1
return menu_info;
}
+static void __add_history(const char *pkg_name, const char *app_path, unsigned char *arg)
+{
+ struct rua_rec rec;
+
+ rec.pkg_name = pkg_name;
+ rec.app_path = app_path;
+ rec.arg = arg;
+
+ if (rua_add_history(&rec))
+ _E("rua add history error");
+}
+
_static_ void __agent_main_loop(int main_fd)
{
bundle *kb = NULL;
__signal_block_sigchld();
__send_app_launch_signal_dbus(pid);
__signal_unblock_sigchld();
+
+ __add_history(pkg_name, app_path, pkt->data);
}
}
return -1;
}
+ if (rua_init()) {
+ _E("rua init failed");
+ return fd;
+ }
+
+ if (rua_clear_history())
+ _E("rua clear history failed");
+
return fd;
}