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>
31 #define API __attribute__ ((visibility("default")))
32 #define DEBUG_ERR 0x0001
33 #define DEBUG_INFO 0x0002
34 #define DEBUG_RESULT 0x0004
36 #define LIBRPM_SUCCESS 0
37 #define LIBRPM_ERROR -1
39 #define BLOCK_SIZE 4096 /*in bytes*/
40 #define LIKELY(expr) __builtin_expect((expr), 1)
41 #define UNLIKELY(expr) __builtin_expect((expr), 0)
43 void _librpm_print_msg(int type, int exetype, char *format, ...);
44 #define _librpm_print(type, fmtstr, args...) { \
45 _librpm_print_msg(type, LIBRPM_LOG, "%s():%d: " fmtstr, \
46 __func__, __LINE__, ##args); \
49 int _librpm_get_package_header_info(char *pkg_path,
50 package_manager_pkg_detail_info_t *pkg_detail_info);
51 int _librpm_get_installed_package_info(char *pkgid,
52 package_manager_pkg_detail_info_t *pkg_detail_info);
53 int _librpm_app_is_installed(char *pkgid);
54 long long _librpm_calculate_dir_size(char *dirname);
58 #endif /* __cplusplus */