[C-Api/CodeClean] remove unnecessary code
authorJaeyun Jung <jy1210.jung@samsung.com>
Tue, 2 May 2023 07:28:53 +0000 (16:28 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Thu, 4 May 2023 02:13:28 +0000 (11:13 +0900)
Code clean,
1. fix indent and remove unnecessary lines.
2. replace function to compare pkg type (case-insensitive).

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
c/src/ml-api-service-common.c
c/src/ml-api-service-private.h
daemon/pkg-mgr.cc

index 1c66a60..e696ff3 100644 (file)
@@ -13,7 +13,7 @@
 #include "ml-api-internal.h"
 #include "ml-api-service.h"
 #include "ml-api-service-private.h"
-#include "../../daemon/includes/ml-agent-dbus-interface.h"
+#include "ml-agent-dbus-interface.h"
 
 /**
  * @brief Destroy the pipeline of given ml_service_h
index 3daa95f..5ff4b0d 100644 (file)
@@ -65,17 +65,6 @@ typedef struct
   GAsyncQueue *out_data_queue;
 } _ml_service_query_s;
 
-
-/**
- * @brief Internal function to get proxy of the pipeline d-bus interface
- */
-MachinelearningServicePipeline * _get_mlsp_proxy_new_for_bus_sync (void);
-
-/**
- * @brief Internal function to get proxy of the model d-bus interface
- */
-MachinelearningServiceModel * _get_mlsm_proxy_new_for_bus_sync (void);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
index 3f00fcc..c133d82 100644 (file)
@@ -30,7 +30,6 @@ _pkg_mgr_echo_pkg_path_info (const gchar *pkg_path)
   GDir *dir;
 
   if (g_file_test (pkg_path, G_FILE_TEST_IS_DIR)) {
-
     _I ("package path: %s", pkg_path);
 
     dir = g_dir_open (pkg_path, 0, NULL);
@@ -73,7 +72,7 @@ _pkg_mgr_event_cb (const char *type, const char *package_name,
     return;
   }
 
-  if (g_strcmp0 (type, "rpk") != 0)
+  if (g_ascii_strcasecmp (type, "rpk") != 0)
     return;
 
   /* TODO handle allowed resources. Currently this only supports global resources */
@@ -236,11 +235,11 @@ pkg_mgr_init (void)
   }
 
   /* Monitoring install, uninstall and upgrade events of the resource package. */
+  /** @todo Find when these ACKAGE_MANAGER_STATUS_TYPE_RES_* status called */
   ret = package_manager_set_event_status (pkg_mgr,
       PACKAGE_MANAGER_STATUS_TYPE_INSTALL | PACKAGE_MANAGER_STATUS_TYPE_UNINSTALL
           | PACKAGE_MANAGER_STATUS_TYPE_UPGRADE | PACKAGE_MANAGER_STATUS_TYPE_RES_COPY
-          | /* TODO: Find when these RES_* status called */
-          PACKAGE_MANAGER_STATUS_TYPE_RES_CREATE_DIR | PACKAGE_MANAGER_STATUS_TYPE_RES_REMOVE
+          | PACKAGE_MANAGER_STATUS_TYPE_RES_CREATE_DIR | PACKAGE_MANAGER_STATUS_TYPE_RES_REMOVE
           | PACKAGE_MANAGER_STATUS_TYPE_RES_UNINSTALL);
   if (ret != PACKAGE_MANAGER_ERROR_NONE) {
     _E ("package_manager_set_event_status() failed: %d", ret);