rpm  4.17.0
rpmarchive.h
Go to the documentation of this file.
1 #ifndef H_ARCHIVE
2 #define H_ARCHIVE
3 
9 #define RPMERR_CHECK_ERRNO -32768
10 
29 
51 };
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
62 char * rpmfileStrerror(int rc);
63 
76 
88  rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype);
89 
96 
103 
111 size_t rpmfiArchiveWrite(rpmfi fi, const void * buf, size_t size);
112 
120 
128 ssize_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
129 
136 
144 int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest);
145 
146 #ifdef __cplusplus
147 }
148 #endif
149 
150 #endif /* H_ARCHIVE */
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:99
struct rpmfi_s * rpmfi
Definition: rpmtypes.h:66
struct rpmfiles_s * rpmfiles
Definition: rpmtypes.h:67
uint64_t rpm_loff_t
Definition: rpmtypes.h:51
int rpmfiArchiveClose(rpmfi fi)
Close payload archive.
char * rpmfileStrerror(int rc)
Return formatted error message on payload handling failure.
int rpmfiArchiveHasContent(rpmfi fi)
Has current file content stored in the archive.
ssize_t rpmfiArchiveRead(rpmfi fi, void *buf, size_t size)
Read content from current file in archive.
rpmfilesErrorCodes
Error codes for archive and file handling.
Definition: rpmarchive.h:14
@ RPMERR_DIGEST_MISMATCH
Definition: rpmarchive.h:21
@ RPMERR_READ_FAILED
Definition: rpmarchive.h:46
@ RPMERR_ITER_SKIP
Definition: rpmarchive.h:27
@ RPMERR_INTERNAL
Definition: rpmarchive.h:22
@ RPMERR_UNLINK_FAILED
Definition: rpmarchive.h:35
@ RPMERR_LINK_FAILED
Definition: rpmarchive.h:44
@ RPMERR_COPY_FAILED
Definition: rpmarchive.h:47
@ RPMERR_STAT_FAILED
Definition: rpmarchive.h:38
@ RPMERR_READLINK_FAILED
Definition: rpmarchive.h:45
@ RPMERR_LSTAT_FAILED
Definition: rpmarchive.h:39
@ RPMERR_RMDIR_FAILED
Definition: rpmarchive.h:41
@ RPMERR_MISSING_FILE
Definition: rpmarchive.h:20
@ RPMERR_ITER_END
Definition: rpmarchive.h:15
@ RPMERR_MKFIFO_FAILED
Definition: rpmarchive.h:43
@ RPMERR_UTIME_FAILED
Definition: rpmarchive.h:34
@ RPMERR_WRITE_FAILED
Definition: rpmarchive.h:33
@ RPMERR_ENOENT
Definition: rpmarchive.h:24
@ RPMERR_UNMAPPED_FILE
Definition: rpmarchive.h:23
@ RPMERR_FILE_SIZE
Definition: rpmarchive.h:26
@ RPMERR_SYMLINK_FAILED
Definition: rpmarchive.h:37
@ RPMERR_HDR_SIZE
Definition: rpmarchive.h:18
@ RPMERR_MKDIR_FAILED
Definition: rpmarchive.h:40
@ RPMERR_BAD_HEADER
Definition: rpmarchive.h:17
@ RPMERR_CHOWN_FAILED
Definition: rpmarchive.h:32
@ RPMERR_MKNOD_FAILED
Definition: rpmarchive.h:42
@ RPMERR_RENAME_FAILED
Definition: rpmarchive.h:36
@ RPMERR_UNKNOWN_FILETYPE
Definition: rpmarchive.h:19
@ RPMERR_ENOTEMPTY
Definition: rpmarchive.h:25
@ RPMERR_LSETFCON_FAILED
Definition: rpmarchive.h:48
@ RPMERR_CHMOD_FAILED
Definition: rpmarchive.h:31
@ RPMERR_BAD_MAGIC
Definition: rpmarchive.h:16
@ RPMERR_OPEN_FAILED
Definition: rpmarchive.h:30
@ RPMERR_EXIST_AS_DIR
Definition: rpmarchive.h:28
@ RPMERR_SETCAP_FAILED
Definition: rpmarchive.h:49
@ RPMERR_CLOSE_FAILED
Definition: rpmarchive.h:50
rpm_loff_t rpmfiArchiveTell(rpmfi fi)
Return current position in payload archive.
int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest)
Write content from current file in archive to a file.
size_t rpmfiArchiveWrite(rpmfi fi, const void *buf, size_t size)
Write content into current file in archive.
int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd)
Write content from given file into current file in archive.
rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype)
Get new file iterator for looping over the archive content.
rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files)
Get new file iterator for writing the archive content.