common: clean up to mv_private.h file
authorInki Dae <inki.dae@samsung.com>
Tue, 25 Jul 2023 02:00:58 +0000 (11:00 +0900)
committerKwanghoon Son <k.son@samsung.com>
Mon, 7 Aug 2023 04:25:06 +0000 (13:25 +0900)
[Issue type] : code cleanup

Clean up mv_private.h by dropping unnecessary inclusions and by moving
mv_private.h from include/ to mv_common/include/.
There is no reason for the header file should exist in include directory
because it is used by internal framework code only.

Change-Id: I4160942cd4966eb4104393e4193d5dfb30ed3691
Signed-off-by: Inki Dae <inki.dae@samsung.com>
include/mv_pose_landmark_internal.h
include/mv_private.h [deleted file]
mv_common/include/mv_private.h [new file with mode: 0644]
mv_machine_learning/inference/src/mv_inference_open.cpp

index 8543bb6e6e516e3a8aa859d6360982013145fb45..617869cbbb953bdff0b40a3bdb233a16806a15a3 100644 (file)
@@ -18,7 +18,6 @@
 #define __MEDIA_VISION_POSE_LANDMARK_INTERNAL_H__
 
 #include <mv_common.h>
-#include <mv_private.h>
 #include <mv_pose_landmark_type.h>
 
 #ifdef __cplusplus
diff --git a/include/mv_private.h b/include/mv_private.h
deleted file mode 100644 (file)
index 94c5a7b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_MEDIA_VISION_PRIVATE_H__
-#define __TIZEN_MEDIA_VISION_PRIVATE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <stdbool.h>
-#include <dlog.h>
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "TIZEN_MEDIA_VISION"
-
-#define MEDIA_VISION_FUNCTION_ENTER() LOGI("[%s] <ENTER>", __FUNCTION__)
-
-#define MEDIA_VISION_FUNCTION_LEAVE() LOGI("[%s] <LEAVE>", __FUNCTION__)
-
-#define MEDIA_VISION_ASSERT(function, msg)           \
-       do {                                             \
-               int error_code = function;                   \
-               if (error_code != MEDIA_VISION_ERROR_NONE) { \
-                       LOGE("%s(0x%08x)", msg, error_code);     \
-                       return error_code;                       \
-               }                                            \
-       } while (0)
-
-#define MEDIA_VISION_CHECK_CONDITION(condition, error, msg)    \
-       do {                                                       \
-               if (!(condition)) {                                    \
-                       LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); \
-                       return error;                                      \
-               }                                                      \
-       } while (0)
-
-#define MEDIA_VISION_INSTANCE_CHECK(arg) \
-       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_INVALID_PARAMETER, "MEDIA_VISION_ERROR_INVALID_PARAMETER")
-
-#define MEDIA_VISION_NULL_ARG_CHECK(arg) \
-       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_INVALID_PARAMETER, "MEDIA_VISION_ERROR_INVALID_PARAMETER")
-
-#define MEDIA_VISION_SUPPORT_CHECK(arg) \
-       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_NOT_SUPPORTED, "MEDIA_VISION_ERROR_NOT_SUPPORTED")
-
-bool _mv_check_system_info_feature_supported(void);
-bool _mv_barcode_detect_check_system_info_feature_supported(void);
-bool _mv_barcode_generate_check_system_info_feature_supported(void);
-bool _mv_face_check_system_info_feature_supported(void);
-bool _mv_image_check_system_info_feature_supported(void);
-bool _mv_inference_check_system_info_feature_supported(void);
-bool _mv_inference_image_check_system_info_feature_supported(void);
-bool _mv_inference_face_check_system_info_feature_supported(void);
-bool _mv_roi_tracking_check_system_info_feature_supported(void);
-bool _mv_3d_all_check_system_info_feature_supported(void);
-bool _mv_3d_check_system_info_feature_supported(void);
-bool _mv_3d_depth_check_system_info_feature_supported(void);
-bool _mv_3d_pointcloud_check_system_info_feature_supported(void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __TIZEN_MEDIA_VISION_PRIVATE_H__ */
diff --git a/mv_common/include/mv_private.h b/mv_common/include/mv_private.h
new file mode 100644 (file)
index 0000000..94c5a7b
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_MEDIA_VISION_PRIVATE_H__
+#define __TIZEN_MEDIA_VISION_PRIVATE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <stdbool.h>
+#include <dlog.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "TIZEN_MEDIA_VISION"
+
+#define MEDIA_VISION_FUNCTION_ENTER() LOGI("[%s] <ENTER>", __FUNCTION__)
+
+#define MEDIA_VISION_FUNCTION_LEAVE() LOGI("[%s] <LEAVE>", __FUNCTION__)
+
+#define MEDIA_VISION_ASSERT(function, msg)           \
+       do {                                             \
+               int error_code = function;                   \
+               if (error_code != MEDIA_VISION_ERROR_NONE) { \
+                       LOGE("%s(0x%08x)", msg, error_code);     \
+                       return error_code;                       \
+               }                                            \
+       } while (0)
+
+#define MEDIA_VISION_CHECK_CONDITION(condition, error, msg)    \
+       do {                                                       \
+               if (!(condition)) {                                    \
+                       LOGE("[%s] %s(0x%08x)", __FUNCTION__, msg, error); \
+                       return error;                                      \
+               }                                                      \
+       } while (0)
+
+#define MEDIA_VISION_INSTANCE_CHECK(arg) \
+       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_INVALID_PARAMETER, "MEDIA_VISION_ERROR_INVALID_PARAMETER")
+
+#define MEDIA_VISION_NULL_ARG_CHECK(arg) \
+       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_INVALID_PARAMETER, "MEDIA_VISION_ERROR_INVALID_PARAMETER")
+
+#define MEDIA_VISION_SUPPORT_CHECK(arg) \
+       MEDIA_VISION_CHECK_CONDITION((arg), MEDIA_VISION_ERROR_NOT_SUPPORTED, "MEDIA_VISION_ERROR_NOT_SUPPORTED")
+
+bool _mv_check_system_info_feature_supported(void);
+bool _mv_barcode_detect_check_system_info_feature_supported(void);
+bool _mv_barcode_generate_check_system_info_feature_supported(void);
+bool _mv_face_check_system_info_feature_supported(void);
+bool _mv_image_check_system_info_feature_supported(void);
+bool _mv_inference_check_system_info_feature_supported(void);
+bool _mv_inference_image_check_system_info_feature_supported(void);
+bool _mv_inference_face_check_system_info_feature_supported(void);
+bool _mv_roi_tracking_check_system_info_feature_supported(void);
+bool _mv_3d_all_check_system_info_feature_supported(void);
+bool _mv_3d_check_system_info_feature_supported(void);
+bool _mv_3d_depth_check_system_info_feature_supported(void);
+bool _mv_3d_pointcloud_check_system_info_feature_supported(void);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __TIZEN_MEDIA_VISION_PRIVATE_H__ */
index aa717570a67102a0451f80642ed30db8fb289151..612f2134a19d1edf2be0b3fe688407ba7b368d1d 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
-#include "mv_private.h"
 #include "mv_inference_open.h"
 
 #include "Inference.h"