2008-04-17 14:09:13 +00:00
|
|
|
/* 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.
|
|
|
|
*
|
2009-07-14 16:14:05 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
2008-04-17 14:09:13 +00:00
|
|
|
* 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"
|
2008-11-07 15:11:08 +00:00
|
|
|
#include "apk_io.h"
|
2008-04-17 14:09:13 +00:00
|
|
|
|
2008-11-07 15:11:08 +00:00
|
|
|
typedef int (*apk_archive_entry_parser)(void *ctx,
|
2008-11-14 12:26:59 +00:00
|
|
|
const struct apk_file_info *ae,
|
2008-11-07 15:11:08 +00:00
|
|
|
struct apk_istream *istream);
|
2008-04-17 14:09:13 +00:00
|
|
|
|
2009-07-29 16:16:04 +00:00
|
|
|
int apk_tar_parse(struct apk_istream *,
|
|
|
|
apk_archive_entry_parser parser, void *ctx,
|
|
|
|
int soft_checksums);
|
|
|
|
int apk_tar_write_entry(struct apk_ostream *, const struct apk_file_info *ae,
|
2009-09-03 10:56:24 +00:00
|
|
|
const char *data);
|
2009-07-16 12:16:05 +00:00
|
|
|
int apk_tar_write_padding(struct apk_ostream *, const struct apk_file_info *ae);
|
2008-11-07 15:11:08 +00:00
|
|
|
|
2009-07-31 13:08:09 +00:00
|
|
|
int apk_archive_entry_extract(int atfd, const struct apk_file_info *ae,
|
|
|
|
const char *suffix, struct apk_istream *is,
|
2009-01-07 19:45:11 +00:00
|
|
|
apk_progress_cb cb, void *cb_ctx);
|
2008-04-17 14:09:13 +00:00
|
|
|
|
|
|
|
#endif
|