2009-08-17 22:37:20 +05:30
|
|
|
/*-
|
2011-01-27 19:06:33 +05:30
|
|
|
* Copyright (c) 2009-2011 Juan Romero Pardines.
|
2009-08-17 22:37:20 +05:30
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XBPS_BIN_DEFS_H_
|
|
|
|
#define _XBPS_BIN_DEFS_H_
|
|
|
|
|
2010-11-13 07:48:58 +05:30
|
|
|
#ifndef __UNCONST
|
|
|
|
#define __UNCONST(a) ((void *)(unsigned long)(const void *)(a))
|
|
|
|
#endif
|
|
|
|
|
2011-07-27 21:34:38 +05:30
|
|
|
#include <sys/time.h>
|
2011-01-22 17:10:19 +05:30
|
|
|
#include <xbps_api.h>
|
|
|
|
|
2011-07-27 21:34:38 +05:30
|
|
|
struct xferstat {
|
|
|
|
struct timeval start;
|
|
|
|
struct timeval last;
|
|
|
|
};
|
|
|
|
|
2011-07-27 20:43:54 +05:30
|
|
|
/* from install.c */
|
|
|
|
int install_new_pkg(const char *);
|
|
|
|
int update_pkg(const char *);
|
|
|
|
int autoupdate_pkgs(bool, bool);
|
|
|
|
int autoremove_pkgs(bool, bool);
|
|
|
|
int exec_transaction(bool, bool);
|
|
|
|
|
2011-10-27 20:38:48 +05:30
|
|
|
/* from remove.c */
|
2011-07-27 20:43:54 +05:30
|
|
|
int remove_installed_pkgs(int, char **, bool, bool, bool, bool);
|
|
|
|
|
|
|
|
/* from check.c */
|
|
|
|
int check_pkg_integrity(const char *);
|
|
|
|
int check_pkg_integrity_all(void);
|
|
|
|
|
2011-10-27 20:38:48 +05:30
|
|
|
#define CHECK_PKG_DECL(type) \
|
|
|
|
int check_pkg_##type (prop_dictionary_t, prop_dictionary_t, prop_dictionary_t)
|
|
|
|
|
|
|
|
CHECK_PKG_DECL(autoinstall);
|
|
|
|
CHECK_PKG_DECL(files);
|
|
|
|
CHECK_PKG_DECL(rundeps);
|
|
|
|
CHECK_PKG_DECL(symlinks);
|
2011-10-28 04:27:16 +05:30
|
|
|
CHECK_PKG_DECL(requiredby);
|
2011-10-27 20:38:48 +05:30
|
|
|
|
2011-07-27 20:43:54 +05:30
|
|
|
/* from show-deps.c */
|
|
|
|
int show_pkg_deps(const char *);
|
|
|
|
int show_pkg_reverse_deps(const char *);
|
|
|
|
|
|
|
|
/* from show-info-files.c */
|
2011-10-29 11:47:54 +05:30
|
|
|
int show_pkg_info_from_metadir(const char *, const char *);
|
2009-11-24 16:35:39 +05:30
|
|
|
int show_pkg_files_from_metadir(const char *);
|
2011-07-27 20:43:54 +05:30
|
|
|
|
|
|
|
/* from find-files.c */
|
2010-10-27 03:55:02 +05:30
|
|
|
int find_files_in_packages(const char *);
|
2011-01-22 17:10:19 +05:30
|
|
|
|
|
|
|
/* from question.c */
|
2011-07-27 20:43:54 +05:30
|
|
|
bool yesno(const char *, ...);
|
|
|
|
bool noyes(const char *, ...);
|
2009-08-17 22:37:20 +05:30
|
|
|
|
2011-07-28 12:55:30 +05:30
|
|
|
/* from fetch_cb.c */
|
2011-07-27 20:43:54 +05:30
|
|
|
void fetch_file_progress_cb(struct xbps_fetch_cb_data *);
|
2011-01-22 17:10:19 +05:30
|
|
|
|
2011-07-28 12:55:30 +05:30
|
|
|
/* from trans_cb.c */
|
|
|
|
void transaction_cb(struct xbps_transaction_cb_data *);
|
|
|
|
void transaction_err_cb(struct xbps_transaction_cb_data *);
|
|
|
|
|
2011-01-22 17:10:19 +05:30
|
|
|
/* From util.c */
|
2011-10-29 11:47:54 +05:30
|
|
|
int show_pkg_files(prop_dictionary_t);
|
|
|
|
void show_pkg_info(prop_dictionary_t);
|
|
|
|
void show_pkg_info_one(prop_dictionary_t, const char *);
|
|
|
|
int show_pkg_namedesc(prop_object_t, void *, bool *);
|
|
|
|
int list_strings_in_array(prop_object_t, void *, bool *);
|
|
|
|
int list_strings_sep_in_array(prop_object_t, void *, bool *);
|
|
|
|
size_t find_longest_pkgver(prop_dictionary_t);
|
|
|
|
void print_package_line(const char *, bool);
|
2011-01-22 17:10:19 +05:30
|
|
|
|
2009-08-17 22:37:20 +05:30
|
|
|
#endif /* !_XBPS_BIN_DEFS_H_ */
|