INSTALL(TARGETS pkgmgr-info DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-info.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include
- PATTERN "*_debug.h" EXCLUDE PATTERN "*_private.h" EXCLUDE)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/parser_path.conf DESTINATION ${SYSCONFDIR}/package-manager/)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mdparser_list.txt DESTINATION ${SYSCONFDIR}/package-manager/parserlib/metadata)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/category_parser_list.txt DESTINATION ${SYSCONFDIR}/package-manager/parserlib/category)
### Build modules
# This library is for installer backend
-AUX_SOURCE_DIRECTORY(src SRCS)
-add_library(pkgmgr_parser SHARED ${SRCS})
+AUX_SOURCE_DIRECTORY(src PARSER_SRCS)
+add_library(pkgmgr_parser SHARED ${PARSER_SRCS})
set_target_properties(pkgmgr_parser PROPERTIES SOVERSION ${VERSION_MAJOR})
set_target_properties(pkgmgr_parser PROPERTIES VERSION ${VERSION})
set_target_properties(pkgmgr_parser PROPERTIES COMPILE_FLAGS "${parser_pkgs_CFLAGS_str}")
## Install
INSTALL(TARGETS pkgmgr_parser DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/pkgmgr
- PATTERN "*_internal.h" EXCLUDE)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include/pkgmgr)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgmgr-parser.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifest.xsd DESTINATION ${SYSCONFDIR}/package-manager/preload/)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/xml.xsd DESTINATION ${SYSCONFDIR}/package-manager/preload/)
#include "pkgmgr-info.h"
#include "pkgmgrinfo_basic.h"
-#include "pkgmgrinfo_debug.h"
#include "pkgmgr_parser.h"
#include "pkgmgr_parser_internal.h"
#include "pkgmgr_parser_db.h"
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "PKGMGR_PARSER"
+#include "pkgmgr_parser_debug.h"
#define ASCII(s) (char *)s
#define XMLCHAR(s) (const xmlChar *)s
#include "pkgmgr-info.h"
#include "pkgmgrinfo_basic.h"
-#include "pkgmgrinfo_debug.h"
#include "pkgmgr_parser_internal.h"
#include "pkgmgr_parser_db.h"
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-#define LOG_TAG "PKGMGR_PARSER"
+#include "pkgmgr_parser_debug.h"
#define PKGMGR_PARSER_DB_FILE tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_parser.db")
#define PKGMGR_CERT_DB_FILE tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_cert.db")
--- /dev/null
+/*
+ * pkgmgrinfo_debug
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: junsuk. oh <junsuk77.oh@samsung.com>
+ *
+ * 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 __PKGMGR_PARSER_DEBUG_H__
+#define __PKGMGR_PARSER_DEBUG_H__
+
+#include <dlog.h>
+
+#define _LOGE(fmt, arg...) LOGE(fmt, ##arg)
+#define _LOGI(fmt, arg...) LOGI(fmt, ##arg)
+#define _LOGD(fmt, arg...) LOGD(fmt, ##arg)
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+#define LOG_TAG "PKGMGR_PARSER"
+
+#define ret_if(expr) do { \
+ if (expr) { \
+ _LOGE("(%s) ", #expr); \
+ return; \
+ } \
+} while (0)
+
+#define retm_if(expr, fmt, arg...) do { \
+ if (expr) { \
+ _LOGE("(%s) "fmt, #expr, ##arg); \
+ return; \
+ } \
+} while (0)
+
+#define retv_if(expr, val) do { \
+ if (expr) { \
+ _LOGE("(%s) ", #expr); \
+ return (val); \
+ } \
+} while (0)
+
+#define retvm_if(expr, val, fmt, arg...) do { \
+ if (expr) { \
+ _LOGE("(%s) "fmt, #expr, ##arg); \
+ return (val); \
+ } \
+} while (0)
+
+#define trym_if(expr, fmt, arg...) do { \
+ if (expr) { \
+ _LOGE("(%s) "fmt, #expr, ##arg); \
+ goto catch; \
+ } \
+} while (0)
+
+#define tryvm_if(expr, val, fmt, arg...) do { \
+ if (expr) { \
+ _LOGE("(%s) "fmt, #expr, ##arg); \
+ val; \
+ goto catch; \
+ } \
+} while (0)
+
+#endif /* __PKGMGR_PARSER_DEBUG_H__ */
#include "pkgmgrinfo_debug.h"
#include "pkgmgrinfo_private.h"
#include "pkgmgr_parser.h"
-#include "pkgmgr_parser_internal.h"
#define QUERY_CREATE_TABLE_PACKAGE_CERT_INDEX_INFO \
"CREATE TABLE IF NOT EXISTS package_cert_index_info( " \
#include <sqlite3.h>
#include <glib.h>
-#include "pkgmgr_parser.h"
#include "pkgmgrinfo_basic.h"
#include "pkgmgrinfo_private.h"
#include "pkgmgrinfo_debug.h"
#include "pkgmgr-info.h"
-#include "pkgmgr_parser_db.h"
-#include "pkgmgr_parser_internal.h"
static bool _get_bool_value(const char *str)
{
#define MAX_QUERY_LEN 4096
#define MAX_CERT_TYPE 9
#define CERT_DB tzplatform_mkpath(TZ_SYS_DB, ".pkgmgr_cert.db")
+#define PKG_STRING_LEN_MAX 1024
#define PKG_TYPE_STRING_LEN_MAX 128
#define PKG_VERSION_STRING_LEN_MAX 128
#define PKG_VALUE_STRING_LEN_MAX 512
int __pkginfo_check_installed_storage(package_x *pkginfo);
int __appinfo_check_installed_storage(application_x *appinfo);
+#define GLOBAL_USER tzplatform_getuid(TZ_SYS_GLOBALAPP_USER)
#define REGULAR_USER 5000
static inline uid_t _getuid(void)
{