Get rid of libfetch and proplib external dependencies.

The list of required external deps is now confuse, libarchive and openssl.

libxbps now includes a wrapper for proplib prefixed with xbps_ rather than prop_.
This commit is contained in:
Juan RP
2013-06-20 10:26:12 +02:00
parent 31efece727
commit 42c0766c00
67 changed files with 3004 additions and 1487 deletions

View File

@@ -8,8 +8,11 @@ all:
.PHONY: install
install:
install -d $(DESTDIR)$(INCLUDEDIR)
install -d $(DESTDIR)$(INCLUDEDIR)/xbps
install -m 644 $(INCS) $(DESTDIR)$(INCLUDEDIR)
for f in array bool data dictionary number object string; do \
install -m 644 xbps/xbps_$${f}.h $(DESTDIR)$(INCLUDEDIR)/xbps; \
done
.PHONY: uninstall
uninstall:

150
include/xbps/xbps_array.h Normal file
View File

@@ -0,0 +1,150 @@
/* $NetBSD: prop_array.h,v 1.8 2008/09/11 13:15:13 haad Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_ARRAY_H_
#define _XBPS_ARRAY_H_
#include <stdint.h>
#include <xbps/xbps_object.h>
typedef struct _prop_array *xbps_array_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_array_t xbps_array_create(void);
xbps_array_t xbps_array_create_with_capacity(unsigned int);
xbps_array_t xbps_array_copy(xbps_array_t);
xbps_array_t xbps_array_copy_mutable(xbps_array_t);
unsigned int xbps_array_capacity(xbps_array_t);
unsigned int xbps_array_count(xbps_array_t);
bool xbps_array_ensure_capacity(xbps_array_t, unsigned int);
void xbps_array_make_immutable(xbps_array_t);
bool xbps_array_mutable(xbps_array_t);
xbps_object_iterator_t xbps_array_iterator(xbps_array_t);
xbps_object_t xbps_array_get(xbps_array_t, unsigned int);
bool xbps_array_set(xbps_array_t, unsigned int, xbps_object_t);
bool xbps_array_add(xbps_array_t, xbps_object_t);
void xbps_array_remove(xbps_array_t, unsigned int);
bool xbps_array_equals(xbps_array_t, xbps_array_t);
char * xbps_array_externalize(xbps_array_t);
xbps_array_t xbps_array_internalize(const char *);
bool xbps_array_externalize_to_file(xbps_array_t, const char *);
bool xbps_array_externalize_to_zfile(xbps_array_t, const char *);
xbps_array_t xbps_array_internalize_from_file(const char *);
xbps_array_t xbps_array_internalize_from_zfile(const char *);
/*
* Utility routines to make it more convenient to work with values
* stored in dictionaries.
*/
bool xbps_array_get_bool(xbps_array_t, unsigned int,
bool *);
bool xbps_array_set_bool(xbps_array_t, unsigned int,
bool);
bool xbps_array_get_int8(xbps_array_t, unsigned int,
int8_t *);
bool xbps_array_get_uint8(xbps_array_t, unsigned int,
uint8_t *);
bool xbps_array_set_int8(xbps_array_t, unsigned int,
int8_t);
bool xbps_array_set_uint8(xbps_array_t, unsigned int,
uint8_t);
bool xbps_array_get_int16(xbps_array_t, unsigned int,
int16_t *);
bool xbps_array_get_uint16(xbps_array_t, unsigned int,
uint16_t *);
bool xbps_array_set_int16(xbps_array_t, unsigned int,
int16_t);
bool xbps_array_set_uint16(xbps_array_t, unsigned int,
uint16_t);
bool xbps_array_get_int32(xbps_array_t, unsigned int,
int32_t *);
bool xbps_array_get_uint32(xbps_array_t, unsigned int,
uint32_t *);
bool xbps_array_set_int32(xbps_array_t, unsigned int,
int32_t);
bool xbps_array_set_uint32(xbps_array_t, unsigned int,
uint32_t);
bool xbps_array_get_int64(xbps_array_t, unsigned int,
int64_t *);
bool xbps_array_get_uint64(xbps_array_t, unsigned int,
uint64_t *);
bool xbps_array_set_int64(xbps_array_t, unsigned int,
int64_t);
bool xbps_array_set_uint64(xbps_array_t, unsigned int,
uint64_t);
bool xbps_array_add_int8(xbps_array_t, int8_t);
bool xbps_array_add_uint8(xbps_array_t, uint8_t);
bool xbps_array_add_int16(xbps_array_t, int16_t);
bool xbps_array_add_uint16(xbps_array_t, uint16_t);
bool xbps_array_add_int32(xbps_array_t, int32_t);
bool xbps_array_add_uint32(xbps_array_t, uint32_t);
bool xbps_array_add_int64(xbps_array_t, int64_t);
bool xbps_array_add_uint64(xbps_array_t, uint64_t);
bool xbps_array_get_cstring(xbps_array_t, unsigned int,
char **);
bool xbps_array_set_cstring(xbps_array_t, unsigned int,
const char *);
bool xbps_array_add_cstring(xbps_array_t, const char *);
bool xbps_array_add_cstring_nocopy(xbps_array_t,
const char *);
bool xbps_array_get_cstring_nocopy(xbps_array_t,
unsigned int,
const char **);
bool xbps_array_set_cstring_nocopy(xbps_array_t,
unsigned int,
const char *);
bool xbps_array_add_and_rel(xbps_array_t, xbps_object_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_ARRAY_H_ */

55
include/xbps/xbps_bool.h Normal file
View File

@@ -0,0 +1,55 @@
/* $NetBSD: prop_bool.h,v 1.4 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_BOOL_H_
#define _XBPS_BOOL_H_
#include <stdbool.h>
#include <xbps/xbps_object.h>
typedef struct _prop_bool *xbps_bool_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_bool_t xbps_bool_create(bool);
xbps_bool_t xbps_bool_copy(xbps_bool_t);
bool xbps_bool_true(xbps_bool_t);
bool xbps_bool_equals(xbps_bool_t, xbps_bool_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_BOOL_H_ */

62
include/xbps/xbps_data.h Normal file
View File

@@ -0,0 +1,62 @@
/* $NetBSD: prop_data.h,v 1.3 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_DATA_H_
#define _XBPS_DATA_H_
#include <stdint.h>
#include <sys/types.h>
#include <xbps/xbps_object.h>
typedef struct _prop_data *xbps_data_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_data_t xbps_data_create_data(const void *, size_t);
xbps_data_t xbps_data_create_data_nocopy(const void *, size_t);
xbps_data_t xbps_data_copy(xbps_data_t);
size_t xbps_data_size(xbps_data_t);
void * xbps_data_data(xbps_data_t);
const void * xbps_data_data_nocopy(xbps_data_t);
bool xbps_data_equals(xbps_data_t, xbps_data_t);
bool xbps_data_equals_data(xbps_data_t, const void *, size_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_DATA_H_ */

View File

@@ -0,0 +1,157 @@
/* $NetBSD: prop_dictionary.h,v 1.9 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_DICTIONARY_H_
#define _XBPS_DICTIONARY_H_
#include <stdint.h>
#include <xbps/xbps_object.h>
#include <xbps/xbps_array.h>
typedef struct _prop_dictionary *xbps_dictionary_t;
typedef struct _prop_dictionary_keysym *xbps_dictionary_keysym_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_dictionary_t xbps_dictionary_create(void);
xbps_dictionary_t xbps_dictionary_create_with_capacity(unsigned int);
xbps_dictionary_t xbps_dictionary_copy(xbps_dictionary_t);
xbps_dictionary_t xbps_dictionary_copy_mutable(xbps_dictionary_t);
unsigned int xbps_dictionary_count(xbps_dictionary_t);
bool xbps_dictionary_ensure_capacity(xbps_dictionary_t,
unsigned int);
void xbps_dictionary_make_immutable(xbps_dictionary_t);
xbps_object_iterator_t xbps_dictionary_iterator(xbps_dictionary_t);
xbps_array_t xbps_dictionary_all_keys(xbps_dictionary_t);
xbps_object_t xbps_dictionary_get(xbps_dictionary_t, const char *);
bool xbps_dictionary_set(xbps_dictionary_t, const char *,
xbps_object_t);
void xbps_dictionary_remove(xbps_dictionary_t, const char *);
xbps_object_t xbps_dictionary_get_keysym(xbps_dictionary_t,
xbps_dictionary_keysym_t);
bool xbps_dictionary_set_keysym(xbps_dictionary_t,
xbps_dictionary_keysym_t,
xbps_object_t);
void xbps_dictionary_remove_keysym(xbps_dictionary_t,
xbps_dictionary_keysym_t);
bool xbps_dictionary_equals(xbps_dictionary_t, xbps_dictionary_t);
char * xbps_dictionary_externalize(xbps_dictionary_t);
xbps_dictionary_t xbps_dictionary_internalize(const char *);
bool xbps_dictionary_externalize_to_file(xbps_dictionary_t,
const char *);
bool xbps_dictionary_externalize_to_zfile(xbps_dictionary_t,
const char *);
xbps_dictionary_t xbps_dictionary_internalize_from_file(const char *);
xbps_dictionary_t xbps_dictionary_internalize_from_zfile(const char *);
const char * xbps_dictionary_keysym_cstring_nocopy(xbps_dictionary_keysym_t);
bool xbps_dictionary_keysym_equals(xbps_dictionary_keysym_t,
xbps_dictionary_keysym_t);
/*
* Utility routines to make it more convenient to work with values
* stored in dictionaries.
*/
bool xbps_dictionary_get_dict(xbps_dictionary_t, const char *,
xbps_dictionary_t *);
bool xbps_dictionary_get_bool(xbps_dictionary_t, const char *,
bool *);
bool xbps_dictionary_set_bool(xbps_dictionary_t, const char *,
bool);
bool xbps_dictionary_get_int8(xbps_dictionary_t, const char *,
int8_t *);
bool xbps_dictionary_get_uint8(xbps_dictionary_t, const char *,
uint8_t *);
bool xbps_dictionary_set_int8(xbps_dictionary_t, const char *,
int8_t);
bool xbps_dictionary_set_uint8(xbps_dictionary_t, const char *,
uint8_t);
bool xbps_dictionary_get_int16(xbps_dictionary_t, const char *,
int16_t *);
bool xbps_dictionary_get_uint16(xbps_dictionary_t, const char *,
uint16_t *);
bool xbps_dictionary_set_int16(xbps_dictionary_t, const char *,
int16_t);
bool xbps_dictionary_set_uint16(xbps_dictionary_t, const char *,
uint16_t);
bool xbps_dictionary_get_int32(xbps_dictionary_t, const char *,
int32_t *);
bool xbps_dictionary_get_uint32(xbps_dictionary_t, const char *,
uint32_t *);
bool xbps_dictionary_set_int32(xbps_dictionary_t, const char *,
int32_t);
bool xbps_dictionary_set_uint32(xbps_dictionary_t, const char *,
uint32_t);
bool xbps_dictionary_get_int64(xbps_dictionary_t, const char *,
int64_t *);
bool xbps_dictionary_get_uint64(xbps_dictionary_t, const char *,
uint64_t *);
bool xbps_dictionary_set_int64(xbps_dictionary_t, const char *,
int64_t);
bool xbps_dictionary_set_uint64(xbps_dictionary_t, const char *,
uint64_t);
bool xbps_dictionary_get_cstring(xbps_dictionary_t, const char *,
char **);
bool xbps_dictionary_set_cstring(xbps_dictionary_t, const char *,
const char *);
bool xbps_dictionary_get_cstring_nocopy(xbps_dictionary_t,
const char *,
const char **);
bool xbps_dictionary_set_cstring_nocopy(xbps_dictionary_t,
const char *,
const char *);
bool xbps_dictionary_set_and_rel(xbps_dictionary_t,
const char *,
xbps_object_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_DICTIONARY_H_ */

View File

@@ -0,0 +1,63 @@
/* $NetBSD: prop_number.h,v 1.6 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_NUMBER_H_
#define _XBPS_NUMBER_H_
#include <stdint.h>
#include <xbps/xbps_object.h>
typedef struct _prop_number *xbps_number_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_number_t xbps_number_create_integer(int64_t);
xbps_number_t xbps_number_create_unsigned_integer(uint64_t);
xbps_number_t xbps_number_copy(xbps_number_t);
int xbps_number_size(xbps_number_t);
bool xbps_number_unsigned(xbps_number_t);
int64_t xbps_number_integer_value(xbps_number_t);
uint64_t xbps_number_unsigned_integer_value(xbps_number_t);
bool xbps_number_equals(xbps_number_t, xbps_number_t);
bool xbps_number_equals_integer(xbps_number_t, int64_t);
bool xbps_number_equals_unsigned_integer(xbps_number_t, uint64_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_NUMBER_H_ */

View File

@@ -0,0 +1,73 @@
/* $NetBSD: prop_object.h,v 1.7 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_OBJECT_H_
#define _XBPS_OBJECT_H_
#include <stdint.h>
#include <stdbool.h>
typedef void *xbps_object_t;
typedef enum {
XBPS_TYPE_UNKNOWN = 0x00000000,
XBPS_TYPE_BOOL = 0x626f6f6c, /* 'bool' */
XBPS_TYPE_NUMBER = 0x6e6d6272, /* 'nmbr' */
XBPS_TYPE_STRING = 0x73746e67, /* 'stng' */
XBPS_TYPE_DATA = 0x64617461, /* 'data' */
XBPS_TYPE_ARRAY = 0x61726179, /* 'aray' */
XBPS_TYPE_DICTIONARY = 0x64696374, /* 'dict' */
XBPS_TYPE_DICT_KEYSYM = 0x646b6579 /* 'dkey' */
} xbps_type_t;
#ifdef __cplusplus
extern "C" {
#endif
void xbps_object_retain(xbps_object_t);
void xbps_object_release(xbps_object_t);
xbps_type_t xbps_object_type(xbps_object_t);
bool xbps_object_equals(xbps_object_t, xbps_object_t);
bool xbps_object_equals_with_error(xbps_object_t, xbps_object_t, bool *);
typedef struct _prop_object_iterator *xbps_object_iterator_t;
xbps_object_t xbps_object_iterator_next(xbps_object_iterator_t);
void xbps_object_iterator_reset(xbps_object_iterator_t);
void xbps_object_iterator_release(xbps_object_iterator_t);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_OBJECT_H_ */

View File

@@ -0,0 +1,68 @@
/* $NetBSD: prop_string.h,v 1.3 2008/04/28 20:22:51 martin Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe.
*
* 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``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 FOUNDATION OR CONTRIBUTORS
* 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_STRING_H_
#define _XBPS_STRING_H_
#include <stdint.h>
#include <sys/types.h>
#include <xbps/xbps_object.h>
typedef struct _prop_string *xbps_string_t;
#ifdef __cplusplus
extern "C" {
#endif
xbps_string_t xbps_string_create(void);
xbps_string_t xbps_string_create_cstring(const char *);
xbps_string_t xbps_string_create_cstring_nocopy(const char *);
xbps_string_t xbps_string_copy(xbps_string_t);
xbps_string_t xbps_string_copy_mutable(xbps_string_t);
size_t xbps_string_size(xbps_string_t);
bool xbps_string_mutable(xbps_string_t);
char * xbps_string_cstring(xbps_string_t);
const char * xbps_string_cstring_nocopy(xbps_string_t);
bool xbps_string_append(xbps_string_t, xbps_string_t);
bool xbps_string_append_cstring(xbps_string_t, const char *);
bool xbps_string_equals(xbps_string_t, xbps_string_t);
bool xbps_string_equals_cstring(xbps_string_t, const char *);
#ifdef __cplusplus
}
#endif
#endif /* _XBPS_STRING_H_ */

View File

@@ -30,9 +30,15 @@
#include <stdio.h>
#include <inttypes.h>
#include <xbps/xbps_array.h>
#include <xbps/xbps_bool.h>
#include <xbps/xbps_data.h>
#include <xbps/xbps_dictionary.h>
#include <xbps/xbps_number.h>
#include <xbps/xbps_string.h>
#include <archive.h>
#include <archive_entry.h>
#include <prop/proplib.h>
/**
* @file include/xbps_api.h
@@ -40,7 +46,7 @@
*
* This header documents the full API for the XBPS Library.
*/
#define XBPS_API_VERSION "20130614-1"
#define XBPS_API_VERSION "20130620"
#ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET"
@@ -452,22 +458,22 @@ struct xbps_handle {
* Internalized proplib dictionary with the master package database
* stored in XBPS_META_PATH/XBPS_PKGDB.
*/
prop_dictionary_t pkgdb;
xbps_dictionary_t pkgdb;
/**
* @private
*/
prop_dictionary_t pkg_metad;
xbps_dictionary_t pkg_metad;
/**
* @private
*/
prop_dictionary_t pkgdb_revdeps;
xbps_dictionary_t pkgdb_revdeps;
/**
* @var transd
*
* Proplib dictionary with transaction details, required by
* xbps_transaction_commit().
*/
prop_dictionary_t transd;
xbps_dictionary_t transd;
/**
* Pointer to the supplifed function callback to be used
* in the XBPS possible states.
@@ -670,7 +676,7 @@ const char *xbps_fetch_error_string(void);
* @return A proplib array of dictionaries with all orphans found,
* on error NULL is returned and errno is set appropiately.
*/
prop_array_t xbps_find_pkg_orphans(struct xbps_handle *xhp, prop_array_t orphans);
xbps_array_t xbps_find_pkg_orphans(struct xbps_handle *xhp, xbps_array_t orphans);
/**
* @ingroup pkg_obsoletes
@@ -684,9 +690,9 @@ prop_array_t xbps_find_pkg_orphans(struct xbps_handle *xhp, prop_array_t orphans
*
* @return A proplib array of strings with a sorted list of obsolete files.
*/
prop_array_t xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
prop_dictionary_t instd,
prop_dictionary_t newd);
xbps_array_t xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
xbps_dictionary_t instd,
xbps_dictionary_t newd);
/** @addtogroup pkgdb */
/*@{*/
@@ -703,7 +709,7 @@ prop_array_t xbps_find_pkg_obsoletes(struct xbps_handle *xhp,
* the value returned by the function callback.
*/
int xbps_pkgdb_foreach_cb(struct xbps_handle *xhp,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -719,7 +725,7 @@ int xbps_pkgdb_foreach_cb(struct xbps_handle *xhp,
*/
int xbps_pkgdb_foreach_reverse_cb(
struct xbps_handle *xhp,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -731,7 +737,7 @@ int xbps_pkgdb_foreach_reverse_cb(
*
* @return The matching proplib package dictionary, NULL otherwise.
*/
prop_dictionary_t xbps_pkgdb_get_pkg(struct xbps_handle *xhp,
xbps_dictionary_t xbps_pkgdb_get_pkg(struct xbps_handle *xhp,
const char *pkg);
/**
@@ -743,7 +749,7 @@ prop_dictionary_t xbps_pkgdb_get_pkg(struct xbps_handle *xhp,
*
* @return The matching proplib package dictionary, NULL otherwise.
*/
prop_dictionary_t xbps_pkgdb_get_virtualpkg(struct xbps_handle *xhp,
xbps_dictionary_t xbps_pkgdb_get_virtualpkg(struct xbps_handle *xhp,
const char *pkg);
/**
@@ -754,7 +760,7 @@ prop_dictionary_t xbps_pkgdb_get_virtualpkg(struct xbps_handle *xhp,
*
* @return The matching package metadata dictionary, NULL otherwise.
*/
prop_dictionary_t xbps_pkgdb_get_pkg_metadata(struct xbps_handle *xhp,
xbps_dictionary_t xbps_pkgdb_get_pkg_metadata(struct xbps_handle *xhp,
const char *pkg);
/**
@@ -767,7 +773,7 @@ prop_dictionary_t xbps_pkgdb_get_pkg_metadata(struct xbps_handle *xhp,
*
* @return A proplib array of strings with reverse dependencies for \a pkg.
*/
prop_array_t xbps_pkgdb_get_pkg_revdeps(struct xbps_handle *xhp,
xbps_array_t xbps_pkgdb_get_pkg_revdeps(struct xbps_handle *xhp,
const char *pkg);
/**
@@ -813,7 +819,7 @@ int xbps_pkg_exec_buffer(struct xbps_handle *xhp,
* @return 0 on success, or an errno value otherwise.
*/
int xbps_pkg_exec_script(struct xbps_handle *xhp,
prop_dictionary_t d,
xbps_dictionary_t d,
const char *script,
const char *action,
bool update);
@@ -838,8 +844,8 @@ int xbps_pkg_exec_script(struct xbps_handle *xhp,
* callback.
*/
int xbps_callback_array_iter(struct xbps_handle *xhp,
prop_array_t array,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
xbps_array_t array,
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -857,8 +863,8 @@ int xbps_callback_array_iter(struct xbps_handle *xhp,
* callback.
*/
int xbps_callback_array_iter_reverse(struct xbps_handle *xhp,
prop_array_t array,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
xbps_array_t array,
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -878,9 +884,9 @@ int xbps_callback_array_iter_reverse(struct xbps_handle *xhp,
* the value returned by the function callback.
*/
int xbps_callback_array_iter_in_dict(struct xbps_handle *xhp,
prop_dictionary_t dict,
xbps_dictionary_t dict,
const char *key,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -900,9 +906,9 @@ int xbps_callback_array_iter_in_dict(struct xbps_handle *xhp,
* the value returned by the function callback.
*/
int xbps_callback_array_iter_reverse_in_dict(struct xbps_handle *xhp,
prop_dictionary_t dict,
xbps_dictionary_t dict,
const char *key,
int (*fn)(struct xbps_handle *, prop_object_t, void *, bool *),
int (*fn)(struct xbps_handle *, xbps_object_t, void *, bool *),
void *arg);
/**
@@ -917,7 +923,7 @@ int xbps_callback_array_iter_reverse_in_dict(struct xbps_handle *xhp,
* @return True if \a str matches a virtual package in \a pkgd, false
* otherwise.
*/
bool xbps_match_virtual_pkg_in_dict(prop_dictionary_t pkgd,
bool xbps_match_virtual_pkg_in_dict(xbps_dictionary_t pkgd,
const char *str,
bool bypattern);
@@ -931,8 +937,8 @@ bool xbps_match_virtual_pkg_in_dict(prop_dictionary_t pkgd,
*
* @return True if \a any virtualpkg has been matched, false otherwise.
*/
bool xbps_match_any_virtualpkg_in_rundeps(prop_array_t rundeps,
prop_array_t provides);
bool xbps_match_any_virtualpkg_in_rundeps(xbps_array_t rundeps,
xbps_array_t provides);
/**
* Match a package name in the specified array of strings.
@@ -942,7 +948,7 @@ bool xbps_match_any_virtualpkg_in_rundeps(prop_array_t rundeps,
*
* @return true on success, false otherwise and errno is set appropiately.
*/
bool xbps_match_pkgname_in_array(prop_array_t array, const char *pkgname);
bool xbps_match_pkgname_in_array(xbps_array_t array, const char *pkgname);
/**
* Match a package pattern in the specified array of strings.
@@ -952,7 +958,7 @@ bool xbps_match_pkgname_in_array(prop_array_t array, const char *pkgname);
*
* @return true on success, false otherwise and errno is set appropiately.
*/
bool xbps_match_pkgpattern_in_array(prop_array_t array, const char *pattern);
bool xbps_match_pkgpattern_in_array(xbps_array_t array, const char *pattern);
/**
* Match a package dependency against any package pattern in the specified
@@ -963,7 +969,7 @@ bool xbps_match_pkgpattern_in_array(prop_array_t array, const char *pattern);
*
* @return true on success, false otherwise and errno is set appropiately.
*/
bool xbps_match_pkgdep_in_array(prop_array_t array, const char *pkgver);
bool xbps_match_pkgdep_in_array(xbps_array_t array, const char *pkgver);
/**
* Match a string (exact match) in the specified array of strings.
@@ -973,7 +979,7 @@ bool xbps_match_pkgdep_in_array(prop_array_t array, const char *pkgver);
*
* @return true on success, false otherwise and errno is set appropiately.
*/
bool xbps_match_string_in_array(prop_array_t array, const char *val);
bool xbps_match_string_in_array(xbps_array_t array, const char *val);
/**
* Returns a proplib object iterator associated with an array, contained
@@ -985,7 +991,7 @@ bool xbps_match_string_in_array(prop_array_t array, const char *val);
* @return A proplib object iterator on success, NULL otherwise and
* errno is set appropiately.
*/
prop_object_iterator_t xbps_array_iter_from_dict(prop_dictionary_t dict,
xbps_object_iterator_t xbps_array_iter_from_dict(xbps_dictionary_t dict,
const char *key);
/*@}*/
@@ -1115,7 +1121,7 @@ int xbps_transaction_commit(struct xbps_handle *xhp);
* @return An internalized proplib dictionary, otherwise NULL and
* errno is set appropiately.
*/
prop_dictionary_t xbps_get_pkg_plist_from_binpkg(const char *fname,
xbps_dictionary_t xbps_get_pkg_plist_from_binpkg(const char *fname,
const char *plistf);
/*@}*/
@@ -1140,13 +1146,13 @@ struct xbps_repo {
*
* Proplib dictionary associated with the repository index.
*/
prop_dictionary_t idx;
xbps_dictionary_t idx;
/**
* @var idxfiles
*
* Proplib dictionary associated with the repository index files.
*/
prop_dictionary_t idxfiles;
xbps_dictionary_t idxfiles;
/**
* @var uri
*
@@ -1204,9 +1210,9 @@ int xbps_rpool_foreach(struct xbps_handle *xhp,
*
* @return The package dictionary if found, NULL otherwise.
* @note When returned dictionary is no longer needed, you must release it
* with prop_object_release(3).
* with xbps_object_release(3).
*/
prop_dictionary_t xbps_rpool_get_pkg(struct xbps_handle *xhp, const char *pkg);
xbps_dictionary_t xbps_rpool_get_pkg(struct xbps_handle *xhp, const char *pkg);
/**
* Finds a package dictionary in repository pool by specifying a
@@ -1217,9 +1223,9 @@ prop_dictionary_t xbps_rpool_get_pkg(struct xbps_handle *xhp, const char *pkg);
*
* @return The package dictionary if found, NULL otherwise.
* @note When returned dictionary is no longer needed, you must release it
* with prop_object_release(3).
* with xbps_object_release(3).
*/
prop_dictionary_t xbps_rpool_get_virtualpkg(struct xbps_handle *xhp,
xbps_dictionary_t xbps_rpool_get_virtualpkg(struct xbps_handle *xhp,
const char *pkg);
/**
@@ -1232,7 +1238,7 @@ prop_dictionary_t xbps_rpool_get_virtualpkg(struct xbps_handle *xhp,
* @return The array of strings on success, NULL otherwise and errno is
* set appropiately.
*/
prop_array_t xbps_rpool_get_pkg_revdeps(struct xbps_handle *xhp, const char *pkg);
xbps_array_t xbps_rpool_get_pkg_revdeps(struct xbps_handle *xhp, const char *pkg);
/**
* Iterate over the the repository pool and search for a metadata plist
@@ -1253,7 +1259,7 @@ prop_array_t xbps_rpool_get_pkg_revdeps(struct xbps_handle *xhp, const char *pkg
* binary package file has been found but the plist file could not
* be found.
*/
prop_dictionary_t xbps_rpool_get_pkg_plist(struct xbps_handle *xhp,
xbps_dictionary_t xbps_rpool_get_pkg_plist(struct xbps_handle *xhp,
const char *pattern,
const char *plistf);
@@ -1281,7 +1287,7 @@ struct xbps_repo *xbps_repo_open(struct xbps_handle *xhp, const char *url);
*
* @return The matching proplib dictionary on success, NULL otherwise.
*/
prop_dictionary_t xbps_repo_get_plist(struct xbps_repo *repo, const char *file);
xbps_dictionary_t xbps_repo_get_plist(struct xbps_repo *repo, const char *file);
/**
* Closes a repository object and releases resources.
@@ -1310,7 +1316,7 @@ char *xbps_repo_path(struct xbps_handle *xhp, const char *url);
*
* @return The pkg dictionary on success, NULL otherwise.
*/
prop_dictionary_t xbps_repo_get_pkg(struct xbps_repo *repo, const char *pkg);
xbps_dictionary_t xbps_repo_get_pkg(struct xbps_repo *repo, const char *pkg);
/**
* Returns a pkg dictionary from a repository \a repo matching
@@ -1322,7 +1328,7 @@ prop_dictionary_t xbps_repo_get_pkg(struct xbps_repo *repo, const char *pkg);
*
* @return The pkg dictionary on success, NULL otherwise.
*/
prop_dictionary_t xbps_repo_get_virtualpkg(struct xbps_repo *repo,
xbps_dictionary_t xbps_repo_get_virtualpkg(struct xbps_repo *repo,
const char *pkg);
/**
@@ -1335,8 +1341,8 @@ prop_dictionary_t xbps_repo_get_virtualpkg(struct xbps_repo *repo,
*
* @return The pkg dictionary on success, NULL otherwise.
*/
prop_dictionary_t xbps_repo_get_pkg_plist(struct xbps_handle *xhp,
prop_dictionary_t pkgd,
xbps_dictionary_t xbps_repo_get_pkg_plist(struct xbps_handle *xhp,
xbps_dictionary_t pkgd,
const char *plist);
/**
@@ -1349,7 +1355,7 @@ prop_dictionary_t xbps_repo_get_pkg_plist(struct xbps_handle *xhp,
* @return The array of strings on success, NULL otherwise and errno is
* set appropiately.
*/
prop_array_t xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg);
xbps_array_t xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg);
/*@}*/
@@ -1364,7 +1370,7 @@ prop_array_t xbps_repo_get_pkg_revdeps(struct xbps_repo *repo, const char *pkg);
*
* @return The internalized proplib dictionary, NULL otherwise.
*/
prop_dictionary_t xbps_archive_get_dictionary(struct archive *ar,
xbps_dictionary_t xbps_archive_get_dictionary(struct archive *ar,
struct archive_entry *entry);
/**
@@ -1437,7 +1443,7 @@ int xbps_pkg_state_installed(struct xbps_handle *xhp,
*
* @return 0 on success, otherwise an errno value.
*/
int xbps_pkg_state_dictionary(prop_dictionary_t dict, pkg_state_t *state);
int xbps_pkg_state_dictionary(xbps_dictionary_t dict, pkg_state_t *state);
/**
* Sets package state \a state in package \a pkgname.
@@ -1460,7 +1466,7 @@ int xbps_set_pkg_state_installed(struct xbps_handle *xhp,
*
* @return 0 on success, otherwise an errno value.
*/
int xbps_set_pkg_state_dictionary(prop_dictionary_t dict, pkg_state_t state);
int xbps_set_pkg_state_dictionary(xbps_dictionary_t dict, pkg_state_t state);
/*@}*/
@@ -1612,7 +1618,7 @@ const char *xbps_pkg_revision(const char *pkg);
*
* @return True if package has run dependencies, false otherwise.
*/
bool xbps_pkg_has_rundeps(prop_dictionary_t dict);
bool xbps_pkg_has_rundeps(xbps_dictionary_t dict);
/**
* Returns true if provided string is valid for target architecture.

View File

@@ -35,6 +35,7 @@
#include <confuse.h>
#define LIBXBPS_PRIVATE
#include <xbps_api.h>
/*
* By default all public functions have default visibility, unless
* visibility has been detected by configure and the HIDDEN definition
@@ -103,32 +104,32 @@ void HIDDEN xbps_pkgdb_release(struct xbps_handle *);
* @private
* From lib/plist.c
*/
bool HIDDEN xbps_add_obj_to_dict(prop_dictionary_t,
prop_object_t, const char *);
bool HIDDEN xbps_add_obj_to_array(prop_array_t, prop_object_t);
bool HIDDEN xbps_add_obj_to_dict(xbps_dictionary_t,
xbps_object_t, const char *);
bool HIDDEN xbps_add_obj_to_array(xbps_array_t, xbps_object_t);
int HIDDEN xbps_array_replace_dict_by_name(prop_array_t,
prop_dictionary_t,
int HIDDEN xbps_array_replace_dict_by_name(xbps_array_t,
xbps_dictionary_t,
const char *);
int HIDDEN xbps_array_replace_dict_by_pattern(prop_array_t,
prop_dictionary_t,
int HIDDEN xbps_array_replace_dict_by_pattern(xbps_array_t,
xbps_dictionary_t,
const char *);
/**
* @private
* From lib/plist_remove.c
*/
bool HIDDEN xbps_remove_pkg_from_array_by_name(prop_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_pattern(prop_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_pkgver(prop_array_t, const char *);
bool HIDDEN xbps_remove_pkgname_from_array(prop_array_t, const char *);
bool HIDDEN xbps_remove_string_from_array(prop_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_name(xbps_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_pattern(xbps_array_t, const char *);
bool HIDDEN xbps_remove_pkg_from_array_by_pkgver(xbps_array_t, const char *);
bool HIDDEN xbps_remove_pkgname_from_array(xbps_array_t, const char *);
bool HIDDEN xbps_remove_string_from_array(xbps_array_t, const char *);
/**
* @private
* From lib/util.c
*/
char HIDDEN *xbps_repository_pkg_path(struct xbps_handle *, prop_dictionary_t);
char HIDDEN *xbps_repository_pkg_path(struct xbps_handle *, xbps_dictionary_t);
/**
* @private
@@ -148,9 +149,9 @@ void HIDDEN xbps_fetch_unset_cache_connection(void);
* @private
* From lib/package_config_files.c
*/
int HIDDEN xbps_entry_is_a_conf_file(prop_dictionary_t, const char *);
int HIDDEN xbps_entry_is_a_conf_file(xbps_dictionary_t, const char *);
int HIDDEN xbps_entry_install_conf_file(struct xbps_handle *,
prop_dictionary_t,
xbps_dictionary_t,
struct archive_entry *,
const char *,
const char *,
@@ -160,20 +161,20 @@ int HIDDEN xbps_entry_install_conf_file(struct xbps_handle *,
* From lib/repo_pkgdeps.c
*/
int HIDDEN xbps_repository_find_deps(struct xbps_handle *,
prop_array_t,
prop_dictionary_t);
xbps_array_t,
xbps_dictionary_t);
/**
* @private
* From lib/plist_find.c
*/
prop_dictionary_t HIDDEN xbps_find_pkg_in_array(prop_array_t, const char *);
prop_dictionary_t HIDDEN
xbps_find_virtualpkg_in_array(struct xbps_handle *, prop_array_t,
xbps_dictionary_t HIDDEN xbps_find_pkg_in_array(xbps_array_t, const char *);
xbps_dictionary_t HIDDEN
xbps_find_virtualpkg_in_array(struct xbps_handle *, xbps_array_t,
const char *);
prop_dictionary_t HIDDEN xbps_find_pkg_in_dict(prop_dictionary_t, const char *);
prop_dictionary_t HIDDEN xbps_find_virtualpkg_in_dict(struct xbps_handle *,
prop_dictionary_t,
xbps_dictionary_t HIDDEN xbps_find_pkg_in_dict(xbps_dictionary_t, const char *);
xbps_dictionary_t HIDDEN xbps_find_virtualpkg_in_dict(struct xbps_handle *,
xbps_dictionary_t,
const char *);
/**
* @private
@@ -199,7 +200,7 @@ int HIDDEN xbps_repo_sync(struct xbps_handle *, const char *);
* From lib/util_hash.c
*/
int HIDDEN xbps_file_hash_check_dictionary(struct xbps_handle *,
prop_dictionary_t d,
xbps_dictionary_t d,
const char *,
const char *);
@@ -222,7 +223,7 @@ void HIDDEN xbps_set_cb_state(struct xbps_handle *, xbps_state_t, int,
* @private
* From lib/package_unpack.c
*/
int HIDDEN xbps_unpack_binary_pkg(struct xbps_handle *, prop_dictionary_t);
int HIDDEN xbps_unpack_binary_pkg(struct xbps_handle *, xbps_dictionary_t);
int HIDDEN xbps_transaction_package_replace(struct xbps_handle *);
@@ -231,22 +232,22 @@ int HIDDEN xbps_transaction_package_replace(struct xbps_handle *);
* From lib/package_remove.c
*/
int HIDDEN xbps_remove_pkg(struct xbps_handle *, const char *, bool, bool);
int HIDDEN xbps_remove_pkg_files(struct xbps_handle *, prop_dictionary_t,
int HIDDEN xbps_remove_pkg_files(struct xbps_handle *, xbps_dictionary_t,
const char *, const char *);
/**
* @private
* From lib/package_register.c
*/
int HIDDEN xbps_register_pkg(struct xbps_handle *, prop_dictionary_t);
int HIDDEN xbps_register_pkg(struct xbps_handle *, xbps_dictionary_t);
/**
* @private
* From lib/package_conflicts.c
*/
void HIDDEN xbps_pkg_find_conflicts(struct xbps_handle *,
prop_array_t,
prop_dictionary_t);
xbps_array_t,
xbps_dictionary_t);
/**
* @private
* From lib/plist_find.c