4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
24 #include <package-manager-plugin.h>
28 #include <sys/types.h>
33 #endif /* __cplusplus */
35 #define API __attribute__ ((visibility("default")))
36 #define DEBUG_ERR 0x0001
37 #define DEBUG_INFO 0x0002
38 #define DEBUG_RESULT 0x0004
40 #define LIBRPM_SUCCESS 0
41 #define LIBRPM_ERROR -1
43 #define BLOCK_SIZE 4096 /*in bytes*/
44 #define LIKELY(expr) __builtin_expect((expr), 1)
45 #define UNLIKELY(expr) __builtin_expect((expr), 0)
47 int _librpm_get_package_header_info(const char *pkg_path,
48 package_manager_pkg_detail_info_t *pkg_detail_info);
49 int _librpm_get_installed_package_info(const char *pkgid,
50 package_manager_pkg_detail_info_t *pkg_detail_info);
51 int _librpm_app_is_installed(const char *pkgid);
52 long long _librpm_calculate_dir_size(const char *dirname);
56 #endif /* __cplusplus */