diff options
author | Timo Teras <timo.teras@iki.fi> | 2008-04-17 14:09:13 +0000 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2008-04-17 14:09:13 +0000 |
commit | d6c74352427367a334d37469962bbcf1b9ae364c (patch) | |
tree | 81ebcf6fc8abf08baea3f0015bc2f7a08768fb1f /src/apk_archive.h | |
parent | 45d2c702fc8a47bc3f5ab4698de2bf1e377301c4 (diff) | |
download | apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.gz apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.bz2 apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.tar.xz apk-tools-d6c74352427367a334d37469962bbcf1b9ae364c.zip |
Initial commit of some stuff written so far. Still in state of flux. Expect
breakage and major changes.
Diffstat (limited to 'src/apk_archive.h')
-rw-r--r-- | src/apk_archive.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/apk_archive.h b/src/apk_archive.h new file mode 100644 index 0000000..2e8d274 --- /dev/null +++ b/src/apk_archive.h @@ -0,0 +1,42 @@ +/* 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. + * + * This program is free software; you can redistribute it and/or modify it + * 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 <pthread.h> +#include "apk_blob.h" + +struct apk_archive_entry { + char *name; + char *link_target; + char *uname; + char *gname; + off_t size; + uid_t uid; + gid_t gid; + mode_t mode; + time_t mtime; + dev_t device; + int read_fd; +}; + +typedef int (*apk_archive_entry_parser)(struct apk_archive_entry *entry, void *ctx); + +pid_t apk_open_gz(int *fd); +int apk_parse_tar(int fd, apk_archive_entry_parser parser, void *ctx); +int apk_parse_tar_gz(int fd, apk_archive_entry_parser parser, void *ctx); +apk_blob_t apk_archive_entry_read(struct apk_archive_entry *ae); +int apk_archive_entry_extract(struct apk_archive_entry *ae, const char *to); +pthread_t apk_checksum_and_tee(int *fd, void *ptr); + +#endif |