remove api for enabling external pkg. 25/72825/1
authorjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 2 Jun 2016 02:44:27 +0000 (11:44 +0900)
committerjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 2 Jun 2016 02:44:27 +0000 (11:44 +0900)
Change-Id: Ie49a3d4307a4b123134e0343f746dc1449cc4e54
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
include/pkgmgr-info.h
src/pkgmgrinfo_client.c

index 4faedea..4c36afb 100644 (file)
@@ -5604,7 +5604,6 @@ pkgmgrinfo_client *pkgmgrinfo_client_new(pkgmgrinfo_client_type ctype);
 int pkgmgrinfo_client_set_status_type(pkgmgrinfo_client *pc, int status_type);
 int pkgmgrinfo_client_listen_status(pkgmgrinfo_client *pc, pkgmgrinfo_handler event_cb, void *data);
 int pkgmgrinfo_client_free(pkgmgrinfo_client *pc);
-int pkgmgrinfo_client_request_enable_external_pkg(char *pkgid);
 
 /**
  * @brief      TEMP
index 7527d21..8dbc4f5 100644 (file)
@@ -117,54 +117,3 @@ catch:
         /* same as pkgmgrinfo_client_new */
        return ret;
 }
-
-static int __get_pkg_location(const char *pkgid)
-{
-       retvm_if(pkgid == NULL, PMINFO_R_OK, "pkginfo handle is NULL");
-
-       FILE *fp = NULL;
-       char pkg_mmc_path[FILENAME_MAX] = { 0, };
-       snprintf(pkg_mmc_path, FILENAME_MAX, "%s%s", PKG_SD_PATH, pkgid);
-
-       /*check whether application is in external memory or not */
-       fp = fopen(pkg_mmc_path, "r");
-       if (fp != NULL) {
-               fclose(fp);
-               fp = NULL;
-               return PMINFO_EXTERNAL_STORAGE;
-       }
-
-       return PMINFO_INTERNAL_STORAGE;
-}
-
-API int pkgmgrinfo_client_request_enable_external_pkg(char *pkgid)
-{
-       DBusConnection *bus;
-       DBusMessage *message = NULL;
-       DBusMessage *reply = NULL;
-
-       retvm_if(pkgid == NULL, PMINFO_R_EINVAL, "pkgid is NULL\n");
-
-       if(__get_pkg_location(pkgid) != PMINFO_EXTERNAL_STORAGE)
-               return PMINFO_R_OK;
-
-       bus = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
-       retvm_if(bus == NULL, PMINFO_R_EINVAL, "dbus_bus_get() failed.");
-
-       message = dbus_message_new_method_call (SERVICE_NAME, PATH_NAME, INTERFACE_NAME, METHOD_NAME);
-       trym_if(message == NULL, "dbus_message_new_method_call() failed.");
-
-       dbus_message_append_args(message, DBUS_TYPE_STRING, &pkgid, DBUS_TYPE_INVALID);
-
-       reply = dbus_connection_send_with_reply_and_block(bus, message, -1, NULL);
-       trym_if(reply == NULL, "connection_send dbus fail");
-
-catch:
-       dbus_connection_flush(bus);
-       if (message)
-               dbus_message_unref(message);
-       if (reply)
-               dbus_message_unref(reply);
-
-       return PMINFO_R_OK;
-}