INCLUDE(FindPkgConfig)
pkg_check_modules(PKGS REQUIRED
appcore-efl
- aul
badge
bundle
capi-appfw-application
syspopup-caller
rua
vconf
- appsvc
capi-system-system-settings
capi-media-image-util
notification
BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(syspopup-caller)
-BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(capi-base-utils-i18n)
BuildRequires: pkgconfig(capi-system-system-settings)
BuildRequires: pkgconfig(capi-message-port)
BuildRequires: pkgconfig(capi-media-image-util)
BuildRequires: pkgconfig(notification)
BuildRequires: pkgconfig(rua)
-BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(capi-appfw-package-manager)
BuildRequires: pkgconfig(capi-appfw-app-manager)
BuildRequires: pkgconfig(capi-ui-efl-util)
#include <vconf.h>
#include <pkgmgr-info.h>
#include <pkgmgrinfo_type.h>
-#include <appsvc.h>
#include <app_control_internal.h>
#include <time.h>
+#include <app_control.h>
+#include <app_manager.h>
#include "conf.h"
#include "clock_service.h"
static int _try_to_launch(const char *clock_pkgname)
{
app_control_h watch_control = NULL;
-
- int clock_app_pid = 0;
- bundle *b;
-
+ app_context_h app_context = NULL;
+ pid_t clock_app_pid = 0;
+ int ret = 0;
if (!clock_pkgname)
clock_pkgname = "org.tizen.classic-watch";
clock_info_s.launched = 0;
watch_manager_get_app_control(clock_pkgname, &watch_control);
- app_control_to_bundle(watch_control, &b);
- clock_app_pid = appsvc_run_service(b, 0, NULL, NULL); /* Get pid of launched watch-app */
- _D("appsvc_run_service returns [%d]", clock_app_pid);
+ ret = app_control_send_launch_request(watch_control, NULL, NULL);
+ if(ret != APP_CONTROL_ERROR_NONE) {
+ _E("app_control_send_launch_request failed!");
+ app_control_destroy(watch_control);
+ return ret;
+ }
+ ret = app_manager_get_app_context(clock_pkgname, &app_context);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ _E("fail to app_manager_get_app_context(%d)", ret);
+ app_control_destroy(watch_control);
+ return ret;
+ }
+ ret = app_context_get_pid(app_context, &clock_app_pid);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ _D("Invalid PID", clock_app_pid);
+ app_control_destroy(watch_control);
+ return ret;
+ }
+
+ _D("app_context_get_pid returns [%d]", clock_app_pid);
clock_info_s.pid = clock_app_pid;
app_control_destroy(watch_control);
*/
#include <app.h>
-#include <appsvc.h>
#include <bundle.h>
#include <Elementary.h>
#include <Evas.h>
-static Eina_Bool _unblock_cb(void *data)
-{
- retv_if(NULL == data, EINA_FALSE);
-
- return EINA_FALSE;
-}
-
HAPI void apps_util_post_message_for_launch_fail(const char *name)
-static void _svc_cb(bundle *b, int request_code, appsvc_result_val result, void *data)
-{
- _D("Request code : %d", request_code);
-
- if (result != APPSVC_RES_OK) {
- char* inform;
- char* inform_with_ret;
- int len;
-
- const char *name = data;
- ret_if(NULL == name);
-
- // IDS_AT_TPOP_UNABLE_TO_OPEN_PS : "Unable to open %s"
- len = strlen(_("IDS_AT_TPOP_UNABLE_TO_OPEN_PS")) + strlen(name) + SPARE_LEN;
-
- inform = calloc(len, sizeof(char));
- if (!inform) {
- _E("cannot calloc for information");
- return;
- }
- snprintf(inform, len, _("IDS_AT_TPOP_UNABLE_TO_OPEN_PS"), name);
-
- inform_with_ret = calloc(len, sizeof(char));
- if (!inform_with_ret) {
- _E("cannot calloc for information");
- free(inform);
- return;
- }
- snprintf(inform_with_ret, len, "%s(%d)", inform, result);
- notification_status_message_post(inform_with_ret);
-
- free(inform);
- free(inform_with_ret);
- }
-}
-
-
-
-#define LAUNCH_WITH_SPECIAL_ROUTINE false
-#define PACKAGE_ORANGE_WORLD "widgetMor.orangeMobile"
-static bool _launch_special_package(const char *package, const char *name)
-{
- retv_if(NULL == package, false);
- retv_if(NULL == name, false);
-
- if (!strcmp(package, PACKAGE_ORANGE_WORLD)) {
- _D("Special launch for %s", PACKAGE_ORANGE_WORLD);
- bundle *b = bundle_create();
- retv_if(NULL == b, false);
-
- appsvc_set_operation(b, APPSVC_OPERATION_VIEW);
- appsvc_set_uri(b, "http://m.orange.fr");
- appsvc_run_service(b, 0, _svc_cb, (void *) name);
-
- bundle_free(b);
-
- return true;
- }
-
- return false;
-}
-
-
-
-#define LAYOUT_BLOCK_INTERVAL 1.0
-
-
HAPI void apps_util_notify_to_home(int pid)
{