From: Kim Kibum Date: Sun, 29 Apr 2012 08:01:56 +0000 (+0900) Subject: upload tizen1.0 source X-Git-Tag: 2.0_alpha~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ca44dd70a13eb7cf8618f6ee162d6d1b50906cc;p=platform%2Fcore%2Fappfw%2Fslp-pkgmgr.git upload tizen1.0 source --- diff --git a/client/include/package-manager.h b/client/include/package-manager.h index 82899f2..f886599 100755 --- a/client/include/package-manager.h +++ b/client/include/package-manager.h @@ -112,13 +112,12 @@ typedef enum _pkgmgr_return_val { /** @} */ /** - * @defgroup pkg_operate APIs to install /uninstall / activate application + * @defgroup pkg_operate APIs to install /uninstall / application * @ingroup pkgmgr * @brief - * APIs to install /uninstall / activate application + * APIs to install /uninstall / application * - Install application using application package filepath * - Uninstall application using application package name - * - Activate application using application package name * */ @@ -215,38 +214,6 @@ int pkgmgr_client_uninstall(pkgmgr_client *pc, const char *pkg_type, const char *pkg_name, pkgmgr_mode mode, pkgmgr_handler event_cb, void *data); -/** - * @brief This API activates package. - * - * This API is for package-manager client application.\n - * - * @param[in] pc pkgmgr_client - * @param[in] pkg_type package type - * @param[in] pkg_name package name - * @return request_id (>0) if success, error code(<0) if fail\n - * @retval PKGMGR_R_OK success - * @retval PKGMGR_R_EINVAL invalid argument - * @retval PKGMGR_R_ECOMM communication error -*/ -int pkgmgr_client_activate(pkgmgr_client *pc, const char *pkg_type, - const char *pkg_name); - -/** - * @brief This API deactivates package. - * - * This API is for package-manager client application.\n - * - * @param[in] pc pkgmgr_client - * @param[in] pkg_type package type - * @param[in] pkg_name package name - * @return request_id (>0) if success, error code(<0) if fail\n - * @retval PKGMGR_R_OK success - * @retval PKGMGR_R_EINVAL invalid argument - * @retval PKGMGR_R_ECOMM communication error -*/ -int pkgmgr_client_deactivate(pkgmgr_client *pc, const char *pkg_type, - const char *pkg_name); - /** * @brief This API deletes application's private data. * @@ -337,18 +304,6 @@ typedef void pkgmgr_info; */ pkgmgr_info * pkgmgr_info_new(const char *pkg_type, const char *pkg_name); -/** - * @brief This API gets the package's information. - * - * This API is for package-manager client application.\n - * - * @param[in] pkg_type package type for the package to get infomation - * @param[in] pkg_path package file path to get infomation - * @return package entry pointer if success, NULL if fail\n -*/ -pkgmgr_info * pkgmgr_info_new_from_file(const char *pkg_type, - const char *pkg_path); - /** * @brief This API get package information value * diff --git a/client/src/pkgmgr.c b/client/src/pkgmgr.c index 17337a0..8302f67 100755 --- a/client/src/pkgmgr.c +++ b/client/src/pkgmgr.c @@ -743,113 +743,12 @@ API int pkgmgr_client_uninstall(pkgmgr_client *pc, const char *pkg_type, return req_id; } -API int pkgmgr_client_activate(pkgmgr_client * pc, const char *pkg_type, - const char *pkg_name) -{ - const char *pkgtype; - char *req_key; - char *cookie = NULL; - int ret; - /* Check for NULL value of pc */ - if (pc == NULL) { - _LOGD("package manager client handle is NULL\n"); - return PKGMGR_R_EINVAL; - } - pkgmgr_client_t *mpc = (pkgmgr_client_t *) pc; - - /* 0. check the pc type */ - if (mpc->ctype != PC_REQUEST) - return PKGMGR_R_EINVAL; - - /* 1. check argument */ - if (pkg_name == NULL) - return PKGMGR_R_EINVAL; - - if (pkg_type == NULL) { - pkgtype = _get_pkg_type_from_desktop_file(pkg_name); - if (pkgtype == NULL) - return PKGMGR_R_EINVAL; - } else - pkgtype = pkg_type; - - if (strlen(pkg_name) >= PKG_STRING_LEN_MAX) - return PKGMGR_R_EINVAL; - - /* 2. generate req_key */ - req_key = __get_req_key(pkg_name); - - /* 3. request activate */ - ret = comm_client_request(mpc->info.request.cc, req_key, - COMM_REQ_TO_ACTIVATOR, pkgtype, - pkg_name, "1", cookie, 1); - if (ret < 0) { - _LOGE("request failed, ret=%d\n", ret); - free(req_key); - return PKGMGR_R_ECOMM; - } - - free(req_key); - - return PKGMGR_R_OK; -} - -API int pkgmgr_client_deactivate(pkgmgr_client *pc, const char *pkg_type, - const char *pkg_name) -{ - const char *pkgtype; - char *req_key; - char *cookie = NULL; - int ret; - /* Check for NULL value of pc */ - if (pc == NULL) { - _LOGD("package manager client handle is NULL\n"); - return PKGMGR_R_EINVAL; - } - pkgmgr_client_t *mpc = (pkgmgr_client_t *) pc; - - /* 0. check the pc type */ - if (mpc->ctype != PC_REQUEST) - return PKGMGR_R_EINVAL; - - /* 1. check argument */ - if (pkg_name == NULL) - return PKGMGR_R_EINVAL; - - if (pkg_type == NULL) { - pkgtype = _get_pkg_type_from_desktop_file(pkg_name); - if (pkgtype == NULL) - return PKGMGR_R_EINVAL; - } else - pkgtype = pkg_type; - - if (strlen(pkg_name) >= PKG_STRING_LEN_MAX) - return PKGMGR_R_EINVAL; - - /* 2. generate req_key */ - req_key = __get_req_key(pkg_name); - - /* 3. request activate */ - ret = comm_client_request(mpc->info.request.cc, req_key, - COMM_REQ_TO_ACTIVATOR, pkgtype, - pkg_name, "0", cookie, 1); - if (ret < 0) { - _LOGE("request failed, ret=%d\n", ret); - free(req_key); - return PKGMGR_R_ECOMM; - } - - free(req_key); - - return PKGMGR_R_OK; -} - API int pkgmgr_client_clear_user_data(pkgmgr_client *pc, const char *pkg_type, const char *pkg_name, pkgmgr_mode mode) { const char *pkgtype; char *installer_path; char *req_key; - int req_id; int i = 0; char *argv[PKG_ARGC_MAX] = { NULL, }; char *args = NULL; @@ -1124,12 +1023,14 @@ API pkgmgr_info *pkgmgr_info_new(const char *pkg_type, const char *pkg_name) plugin_set = _package_manager_load_library(pkgtype); if (plugin_set == NULL) { + _LOGE("*** Failed to load library"); free(pkg_detail_info); return NULL; } if (plugin_set->pkg_is_installed) { if (plugin_set->pkg_is_installed(pkg_name) != 0) { + _LOGE("*** Failed to call pkg_is_installed()"); free(pkg_detail_info); return NULL; } @@ -1137,6 +1038,7 @@ API pkgmgr_info *pkgmgr_info_new(const char *pkg_type, const char *pkg_name) if (plugin_set->get_pkg_detail_info) { if (plugin_set->get_pkg_detail_info(pkg_name, pkg_detail_info) != 0) { + _LOGE("*** Failed to call get_pkg_detail_info()"); free(pkg_detail_info); return NULL; } diff --git a/comm/pkgmgr_installer.c b/comm/pkgmgr_installer.c index c1fc6ec..02ac2b8 100755 --- a/comm/pkgmgr_installer.c +++ b/comm/pkgmgr_installer.c @@ -51,43 +51,7 @@ struct pkgmgr_installer { DBusConnection *conn; }; -static int __pkgmgr_installer_receive_request_by_socket(pkgmgr_installer *pi); -/* Internal func */ - -static int __pkgmgr_installer_receive_request_by_socket(pkgmgr_installer *pi) -{ - CHK_PI_RET(-EINVAL); - int r = 0; - -#ifdef USE_SOCKET - /* TODO: implement this */ - - /* Try to connect to socket */ - comm_socket_client *csc = - comm_socket_client_new(pi->quiet_socket_path); - if (!csc) - return -EINVAL; - - /* Receive request */ - char *req = NULL, *pkg_info = NULL; - if (0 != comm_socket_client_receive_request(csc, &req, &pkg_info)) { - r = -EINVAL; - goto CLEANUP_RET; - } - - /* Verify requester */ - - /* Set request value */ - - /* Cleanup */ - CLEANUP_RET: - if (csc) - comm_socket_client_free(csc); -#endif - - return r; -} /* API */ @@ -204,7 +168,7 @@ pkgmgr_installer_receive_request(pkgmgr_installer *pi, /* pi->quiet_socket_path = strndup(optarg, MAX_STRLEN); maximum 255 bytes return - __pkgmgr_installer_receive_request_by_socket(pi); */ + */ break; diff --git a/comm/pkgmgr_installer.h b/comm/pkgmgr_installer.h index 4579f47..4a3ff2c 100755 --- a/comm/pkgmgr_installer.h +++ b/comm/pkgmgr_installer.h @@ -341,7 +341,7 @@ int main(int argc, char **argv) // Do something... pkgmgr_installer_send_signal(pi, - "deb", "deb.org.tizen.foo", "install_percent", "100"); + "deb", "org.tizen.foo", "install_percent", "100"); // A sample signal pkgmgr_installer_free(pi); diff --git a/debian/changelog b/debian/changelog index efc3ff4..a5c1e7f 100755 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ -slp-pkgmgr (0.1.100-2) unstable; urgency=low +slp-pkgmgr (0.1.111) unstable; urgency=low * Initial Release. * Git: pkgs/s/slp-pkgmgr - * Tag: slp-pkgmgr_0.1.100-2 + * Tag: slp-pkgmgr_0.1.111 - -- Sewook Park Wed, 07 Dec 2011 12:55:49 +0900 + -- Sewook Park Fri, 30 Mar 2012 11:50:01 +0900 diff --git a/packaging/pkgmgr.spec b/packaging/pkgmgr.spec new file mode 100755 index 0000000..0843254 --- /dev/null +++ b/packaging/pkgmgr.spec @@ -0,0 +1,163 @@ +Name: pkgmgr +Summary: Packager Manager client library package +Version: 0.1.111 +Release: 1 +Group: System/Libraries +License: Apache License, Version 2.0 +Source0: %{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: gettext-tools +BuildRequires: pkgconfig(ecore) +BuildRequires: pkgconfig(security-server) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(aul) +BuildRequires: pkgconfig(ail) +BuildRequires: pkgconfig(appcore-efl) + + +%description +Packager Manager client library package for packaging + + +%package client +Summary: Package Manager client library develpoment package +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + +%description client +Package Manager client library develpoment package for packaging + +%package client-devel +Summary: Package Manager client library develpoment package +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description client-devel +Package Manager client library develpoment package for packaging + +%package server +Summary: Package Manager server +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description server +Package Manager server for packaging + +%package installer +Summary: Library for installer frontend/backend. +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + +%description installer +Library for installer frontend/backend for packaging. + +%package installer-devel +Summary: Dev package for libpkgmgr-installer +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description installer-devel +Dev package for libpkgmgr-installer for packaging. + +%package types-devel +Summary: Package Manager client types develpoment package +Group: TO_BE/FILLED_IN +Requires: %{name} = %{version}-%{release} + +%description types-devel +Package Manager client types develpoment package for packaging + + +%prep +%setup -q + +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + +%build + +make %{?jobs:-j%jobs} +%install +rm -rf %{buildroot} +%make_install + + +%post +/sbin/ldconfig + +mkdir -p /usr/etc/package-manager/frontend +mkdir -p /usr/etc/package-manager/backend + +# For pkgmgr-install: +# Update mime database to support package mime types +update-mime-database /usr/share/mime + +%post server + +/sbin/ldconfig +mkdir -p /usr/etc/package-manager/server + +%post client -p /sbin/ldconfig + +%postun client -p /sbin/ldconfig + +%post installer -p /sbin/ldconfig + +%postun installer -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%{_bindir}/pkgcmd +%exclude %{_bindir}/pkgmgr_backend_sample +%exclude %{_includedir}/pkgmgr/comm_client.h +%exclude %{_includedir}/pkgmgr/comm_config.h +%exclude %{_includedir}/pkgmgr/comm_status_broadcast_server.h +%exclude %{_libdir}/libpkgmgr_backend_lib_sample.so +%exclude /usr/etc/package-manager/server/queue_status + +%files client +%defattr(-,root,root,-) +%{_prefix}/etc/package-manager/pkg_path.conf +%{_datadir}/mime/packages/mime.wac.xml +%{_bindir}/pkgmgr-install +%{_libdir}/libpkgmgr-client.so.* +/opt/share/applications/org.tizen.pkgmgr-install.desktop + +%files client-devel +%defattr(-,root,root,-) +%{_includedir}/package-manager.h +%{_libdir}/pkgconfig/pkgmgr.pc +%{_libdir}/libpkgmgr-client.so + +%files server +%defattr(-,root,root,-) +%{_datadir}/dbus-1/services/org.tizen.slp.pkgmgr.service +%{_bindir}/pkgmgr-server +%{_datadir}/locale/*/LC_MESSAGES/*.mo + +%files installer +%defattr(-,root,root,-) +%{_libdir}/libpkgmgr_installer.so.* +%{_libdir}/libpkgmgr_installer_status_broadcast_server.so.* +%{_libdir}/libpkgmgr_installer_client.so.* + +%files installer-devel +%defattr(-,root,root,-) +%{_includedir}/pkgmgr/pkgmgr_installer.h +%{_libdir}/pkgconfig/pkgmgr-installer-status-broadcast-server.pc +%{_libdir}/pkgconfig/pkgmgr-installer.pc +%{_libdir}/pkgconfig/pkgmgr-installer-client.pc +%{_libdir}/libpkgmgr_installer.so +%{_libdir}/libpkgmgr_installer_client.so +%{_libdir}/libpkgmgr_installer_status_broadcast_server.so + +%files types-devel +%defattr(-,root,root,-) +%{_includedir}/package-manager-types.h +%{_includedir}/package-manager-plugin.h +%{_libdir}/pkgconfig/pkgmgr-types.pc diff --git a/packaging/slp-pkgmgr.spec b/packaging/slp-pkgmgr.spec deleted file mode 100644 index edf0540..0000000 --- a/packaging/slp-pkgmgr.spec +++ /dev/null @@ -1,150 +0,0 @@ -Name: slp-pkgmgr -Summary: Packager Manager client library package -Version: 0.1.100 -Release: 1 -Group: TO_BE/FILLED_IN -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz -BuildRequires: cmake -BuildRequires: pkgconfig(ecore) -BuildRequires: pkgconfig(security-server) -BuildRequires: pkgconfig(dbus-1) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(aul) -BuildRequires: pkgconfig(ail) -BuildRequires: pkgconfig(appcore-efl) -BuildRequires: gettext-tools - - -%description -Packager Manager client library package for packaging - - -%package client -Summary: Package Manager client library develpoment package -Group: TO_BE/FILLED_IN -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - -%description client -Package Manager client library develpoment package for packaging - -%package client-devel -Summary: Package Manager client library develpoment package -Group: TO_BE/FILLED_IN - -%description client-devel -Package Manager client library develpoment package for packaging - -%package server -Summary: Package Manager server -Group: TO_BE/FILLED_IN - -%description server -Package Manager server for packaging - -%package installer -Summary: Library for installer frontend/backend. -Group: TO_BE/FILLED_IN -Requires(post): /sbin/ldconfig, /usr/bin/update-mime-database -Requires(postun): /sbin/ldconfig - -%description installer -Library for installer frontend/backend for packaging. - -%package installer-devel -Summary: Dev package for libpkgmgr-installer -Group: TO_BE/FILLED_IN - -%description installer-devel -Dev package for libpkgmgr-installer for packaging. - -%package types-devel -Summary: Package Manager client types develpoment package -Group: TO_BE/FILLED_IN - -%description types-devel -Package Manager client types develpoment package for packaging - - -%prep -%setup -q - - -%build -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -make %{?jobs:-j%jobs} - -%install -%make_install - -mkdir -p %{buildroot}/usr/etc/package-manager/frontend -mkdir -p %{buildroot}/usr/etc/package-manager/backend -mkdir -p %{buildroot}/usr/etc/package-manager/server - -%find_lang package-manager - -%post server - -/sbin/ldconfig - -%post client -p /sbin/ldconfig - -%postun client -p /sbin/ldconfig - -%post installer -/sbin/ldconfig -update-mime-database /usr/share/mime - -%postun installer -p /sbin/ldconfig - - -%files -%exclude %{_bindir}/pkgmgr_backend_sample -%exclude %{_includedir}/pkgmgr/comm_client.h -%exclude %{_includedir}/pkgmgr/comm_config.h -%exclude %{_includedir}/pkgmgr/comm_status_broadcast_server.h -%exclude %{_libdir}/libpkgmgr_backend_lib_sample.so -%exclude /usr/etc/package-manager/server/queue_status - - -%files client -f package-manager.lang -%{_prefix}/etc/package-manager/pkg_path.conf -%{_datadir}/mime/packages/mime.wac.xml -%{_bindir}/pkgmgr-install -%{_libdir}/libpkgmgr-client.so.* -/usr/bin/pkgcmd -/opt/share/applications/org.tizen.pkgmgr-install.desktop - -%files client-devel -%{_includedir}/package-manager.h -%{_libdir}/pkgconfig/pkgmgr.pc -%{_libdir}/libpkgmgr-client.so - -%files server -%{_datadir}/dbus-1/services/org.tizen.slp.pkgmgr.service -%{_bindir}/pkgmgr-server -%dir /usr/etc/package-manager/frontend -%dir /usr/etc/package-manager/backend -%dir /usr/etc/package-manager/server - - -%files installer -%{_libdir}/libpkgmgr_installer.so.* -%{_libdir}/libpkgmgr_installer_status_broadcast_server.so.* -%{_libdir}/libpkgmgr_installer_client.so.* - -%files installer-devel -%{_includedir}/pkgmgr/pkgmgr_installer.h -%{_libdir}/pkgconfig/pkgmgr-installer-status-broadcast-server.pc -%{_libdir}/pkgconfig/pkgmgr-installer.pc -%{_libdir}/pkgconfig/pkgmgr-installer-client.pc -%{_libdir}/libpkgmgr_installer.so -%{_libdir}/libpkgmgr_installer_client.so -%{_libdir}/libpkgmgr_installer_status_broadcast_server.so - -%files types-devel -%{_includedir}/package-manager-types.h -%{_includedir}/package-manager-plugin.h -%{_libdir}/pkgconfig/pkgmgr-types.pc diff --git a/server/src/pkgmgr-server.c b/server/src/pkgmgr-server.c index b99b833..9527efb 100755 --- a/server/src/pkgmgr-server.c +++ b/server/src/pkgmgr-server.c @@ -87,7 +87,6 @@ int ail_db_update = 1; GMainLoop *mainloop = NULL; -static const char *activate_cmd = "/usr/bin/activator"; /* operation_type */ typedef enum { @@ -113,10 +112,9 @@ typedef struct pm_desktop_notifier_t pm_desktop_notifier; pm_desktop_notifier desktop_notifier; pm_inotify_paths paths[DESKTOP_FILE_DIRS_NUM]; -static -void response_cb(void *data, Evas_Object *notify, void *event_info); -static -int create_popup(struct appdata *ad); +static void response_cb1(void *data, Evas_Object *notify, void *event_info); +static void response_cb2(void *data, Evas_Object *notify, void *event_info); +static int create_popup(struct appdata *ad); static void sighandler(int signo); gboolean queue_job(void *data); static Eina_Bool __directory_notify(void *data, Ecore_Fd_Handler *fd_handler); @@ -230,65 +228,86 @@ static Eina_Bool __directory_notify(void *data, Ecore_Fd_Handler *fd_handler) } static -void response_cb(void *data, Evas_Object *notify, void *event_info) +void response_cb1(void *data, Evas_Object *notify, void *event_info) { struct appdata *ad = (struct appdata *)data; DBG("start of response_cb()\n"); - if ((int)event_info == ELM_POPUP_RESPONSE_OK) { /* YES */ - DBG("Uninstalling... [%s]\n", ad->item->pkg_name); + /* YES */ + DBG("Uninstalling... [%s]\n", ad->item->pkg_name); - if (strlen(ad->item->pkg_name) == 0) { - DBG("package_name is empty\n"); - } + if (strlen(ad->item->pkg_name) == 0) { + DBG("package_name is empty\n"); + } - if (strlen(ad->item->pkg_type) == 0) { - DBG("Fail : Uninstalling... [%s]\n", - ad->item->pkg_name); - free(ad->item); - evas_object_del(ad->notify); - evas_object_del(ad->win); - drawing_popup = 0; + if (strlen(ad->item->pkg_type) == 0) { + DBG("Fail : Uninstalling... [%s]\n", + ad->item->pkg_name); + free(ad->item); + evas_object_del(ad->notify); + evas_object_del(ad->win); + drawing_popup = 0; - return; - } + return; + } - DBG("pkg_type = [%s]\n", ad->item->pkg_type); + DBG("pkg_type = [%s]\n", ad->item->pkg_type); - _pm_queue_push(*(ad->item)); + _pm_queue_push(*(ad->item)); - } else { /* NO */ - pkgmgr_installer *pi; - gboolean ret_parse; - gint argcp; - gchar **argvp; - GError *gerr = NULL; + /* Free resource */ + free(ad->item); + evas_object_del(ad->notify); + evas_object_del(ad->win); + /***************/ - pi = pkgmgr_installer_new(); - if (!pi) { - DBG("Failure in creating the pkgmgr_installer object"); - return; - } + g_idle_add(queue_job, NULL); - ret_parse = g_shell_parse_argv(ad->item->args, - &argcp, &argvp, &gerr); - if (FALSE == ret_parse) { - DBG("Failed to split args: %s", ad->item->args); - DBG("messsage: %s", gerr->message); - pkgmgr_installer_free(pi); - return; - } + DBG("end of response_cb()\n"); + + drawing_popup = 0; + + return; +} + +static +void response_cb2(void *data, Evas_Object *notify, void *event_info) +{ + struct appdata *ad = (struct appdata *)data; - pkgmgr_installer_receive_request(pi, argcp, argvp); + DBG("start of response_cb()\n"); + + /* NO */ + pkgmgr_installer *pi; + gboolean ret_parse; + gint argcp; + gchar **argvp; + GError *gerr = NULL; - pkgmgr_installer_send_signal(pi, ad->item->pkg_type, - ad->item->pkg_name, "end", - "cancel"); + pi = pkgmgr_installer_new(); + if (!pi) { + DBG("Failure in creating the pkgmgr_installer object"); + return; + } + ret_parse = g_shell_parse_argv(ad->item->args, + &argcp, &argvp, &gerr); + if (FALSE == ret_parse) { + DBG("Failed to split args: %s", ad->item->args); + DBG("messsage: %s", gerr->message); pkgmgr_installer_free(pi); + return; } + pkgmgr_installer_receive_request(pi, argcp, argvp); + + pkgmgr_installer_send_signal(pi, ad->item->pkg_type, + ad->item->pkg_name, "end", + "cancel"); + + pkgmgr_installer_free(pi); + /* Free resource */ free(ad->item); evas_object_del(ad->notify); @@ -304,6 +323,7 @@ void response_cb(void *data, Evas_Object *notify, void *event_info) return; } + static char *__get_exe_path(const char *pkg_name) { ail_appinfo_h handle; @@ -390,7 +410,7 @@ int create_popup(struct appdata *ad) double s; s = w / DESKTOP_W; - elm_scale_set(s); + elm_config_scale_set(s); evas_object_show(ad->win); @@ -446,23 +466,27 @@ int create_popup(struct appdata *ad) } else snprintf(sentence, sizeof(sentence) - 1, _("Invalid request")); - elm_popup_title_label_set(ad->notify, pkg_name); + elm_object_part_text_set(ad->notify, "title,text", pkg_name); evas_object_size_hint_weight_set(ad->notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -/* elm_popup_mode_set(ad->notify, ELM_POPUP_TYPE_ALERT); */ evas_object_show(ad->notify); /***********************************/ - elm_popup_desc_set(ad->notify, sentence); + elm_object_text_set(ad->notify, sentence); + + Evas_Object *button1 = NULL; + Evas_Object *button2 = NULL; + + button1 = elm_button_add(ad->notify); + elm_object_text_set(button1, dgettext("sys_string", "IDS_COM_SK_YES")); + elm_object_part_content_set(ad->notify, "button1", button1); + evas_object_smart_callback_add(button1, "clicked", response_cb1, ad); - elm_popup_buttons_add(ad->notify, 2, - dgettext("sys_string", "IDS_COM_SK_YES"), - ELM_POPUP_RESPONSE_OK, dgettext("sys_string", - "IDS_COM_SK_NO"), - ELM_POPUP_RESPONSE_CANCEL, NULL); - evas_object_smart_callback_add(ad->notify, - "response", response_cb, ad); + button2 = elm_button_add(ad->notify); + elm_object_text_set(button2, dgettext("sys_string", "IDS_COM_SK_NO")); + elm_object_part_content_set(ad->notify, "button2", button2); + evas_object_smart_callback_add(button2, "clicked", response_cb2, ad); evas_object_show(ad->notify); diff --git a/tool/org.tizen.pkgmgr-install.desktop.in b/tool/org.tizen.pkgmgr-install.desktop.in index 7f65a6d..a3e63e1 100755 --- a/tool/org.tizen.pkgmgr-install.desktop.in +++ b/tool/org.tizen.pkgmgr-install.desktop.in @@ -1,9 +1,10 @@ Name=pkgmgr-install Type=Application Exec=/usr/bin/pkgmgr-install -Hidden=True +NoDisplay=True Version=0.1 -Mimetype=application/x-deb;application/x-java-archive;text/vnd.sun.j2me.app-descriptor;application/widget;application/vnd.wac.widget-sharing -X-SLP-TaskManage=False -X-SLP-Multiple=True -X-SLP-Removable=False +Mimetype=application/x-deb;application/x-java-archive;text/vnd.sun.j2me.app-descriptor;application/widget;application/vnd.wac.widget-sharing;application/x-rpm;application/x-redhat-package-manager +X-Tizen-TaskManage=False +X-Tizen-Multiple=True +X-Tizen-Removable=False +X-Tizen-SVC=http://tizen.org/appsvc/operation/view|NULL|application/x-deb;http://tizen.org/appsvc/operation/view|NULL|application/x-java-archive;http://tizen.org/appsvc/operation/view|NULL|text/vnd.sun.j2me.app-descriptor;http://tizen.org/appsvc/operation/view|NULL|application/widget;http://tizen.org/appsvc/operation/view|NULL|application/vnd.wac.widget-sharing;http://tizen.org/appsvc/operation/view|NULL|application/x-rpm;http://tizen.org/appsvc/operation/view|NULL|application/x-redhat-package-manager \ No newline at end of file diff --git a/tool/pkgmgr-install.c b/tool/pkgmgr-install.c index 2adbf5d..92189be 100755 --- a/tool/pkgmgr-install.c +++ b/tool/pkgmgr-install.c @@ -31,9 +31,13 @@ #include #include + #define KEY_MIME_TYPE "__AUL_MIME_TYPE__" #define KEY_MIME_CONTENT "__AUL_MIME_CONTENT__" +#define KEY_MIME_TYPE_NEW "__APP_SVC_MIME_TYPE__" +#define KEY_MIME_CONTENT_NEW "__APP_SVC_URI__" + char *supported_mime_type_list[] = { NULL /* sentinel */ }; @@ -56,8 +60,13 @@ static int __parse_argv(int argc, char **argv, errno = 0; - *mime_type = (char *)bundle_get_val(b, KEY_MIME_TYPE); - *file_path = (char *)bundle_get_val(b, KEY_MIME_CONTENT); + if(bundle_get_val(b, KEY_MIME_CONTENT_NEW)) { + /* *mime_type = (char *)bundle_get_val(b, KEY_MIME_TYPE_NEW); */ + *file_path = (char *)bundle_get_val(b, KEY_MIME_CONTENT_NEW); + } else { + *mime_type = (char *)bundle_get_val(b, KEY_MIME_TYPE); + *file_path = (char *)bundle_get_val(b, KEY_MIME_CONTENT); + } if (errno) return -1;