2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_APPFW_PACKAGE_MANAGER_INTERNAL_H__
18 #define __TIZEN_APPFW_PACKAGE_MANAGER_INTERNAL_H__
21 #include <pkgmgr-info.h>
22 #include "package_manager.h"
25 #define API __attribute__ ((visibility("default")))
32 #define LOG_TAG "CAPI_APPFW_PACKAGE_MANAGER"
34 #define _LOGE(fmt, arg...) LOGE(fmt, ##arg)
35 #define _LOGD(fmt, arg...) LOGD(fmt, ##arg)
42 PRIVILEGE_PACKAGE_MANAGER_INFO,
43 PRIVILEGE_PACKAGE_MANAGER_ADMIN,
44 PRIVILEGE_PACKAGE_MANAGER_CACHE
47 int check_privilege(privilege_type type);
49 int package_manager_error(package_manager_error_e error, const char *function, const char *description);
51 int package_info_get_package_info(const char *package, package_info_h *package_info);
53 int package_info_foreach_package_info(package_manager_package_info_cb callback, void *user_data);
55 int package_info_filter_foreach_package_info(pkgmgrinfo_pkginfo_filter_h handle, package_manager_package_info_cb callback, void *user_data);
57 int package_info_create_with_pkginfo(pkgmgrinfo_pkginfo_h pkg_handle, package_info_h *package_info);
59 int package_info_destroy_handle(package_info_h handle);
65 #endif /* __TIZEN_APPFW_PACKAGE_MANAGER_INTERNAL_H__ */