apk_archive.h 1.12 KB
Newer Older
1 2 3 4 5 6
/* apk_archive.c - Alpine Package Keeper (APK)
 *
 * Copyright (C) 2005-2008 Natanael Copa <n@tanael.org>
 * Copyright (C) 2008 Timo Teräs <timo.teras@iki.fi>
 * All rights reserved.
 *
Timo Teräs's avatar
Timo Teräs committed
7
 * This program is free software; you can redistribute it and/or modify it
8 9 10 11 12 13 14 15 16
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation. See http://www.gnu.org/ for details.
 */

#ifndef APK_ARCHIVE
#define APK_ARCHIVE

#include <sys/types.h>
#include "apk_blob.h"
17
#include "apk_io.h"
18

19
typedef int (*apk_archive_entry_parser)(void *ctx,
20
					const struct apk_file_info *ae,
21
					struct apk_istream *istream);
22

23 24
int apk_tar_parse(struct apk_istream *,
		  apk_archive_entry_parser parser, void *ctx,
25
		  int soft_checksums, struct apk_id_cache *);
26
int apk_tar_write_entry(struct apk_ostream *, const struct apk_file_info *ae,
27
			const char *data);
28
int apk_tar_write_padding(struct apk_ostream *, const struct apk_file_info *ae);
29

30 31
int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
			      const char *suffix, struct apk_istream *is,
32
			      apk_progress_cb cb, void *cb_ctx);
33 34

#endif