rpm: rpmarchive.h Source File

rpm 4.12.0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmarchive.h
Go to the documentation of this file.
1 #ifndef H_ARCHIVE
2 #define H_ARCHIVE
3
8 #define RPMERR_CHECK_ERRNO -32768
9
13 enum rpmfilesErrorCodes {
14 RPMERR_ITER_END = -1,
15 RPMERR_BAD_MAGIC = -2,
16 RPMERR_BAD_HEADER = -3,
17 RPMERR_HDR_SIZE = -4,
18 RPMERR_UNKNOWN_FILETYPE= -5,
19 RPMERR_MISSING_FILE = -6,
20 RPMERR_DIGEST_MISMATCH = -7,
21 RPMERR_INTERNAL = -8,
22 RPMERR_UNMAPPED_FILE = -9,
23 RPMERR_ENOENT = -10,
24 RPMERR_ENOTEMPTY = -11,
25 RPMERR_FILE_SIZE = -12,
26
27 RPMERR_OPEN_FAILED = -32768,
28 RPMERR_CHMOD_FAILED = -32769,
29 RPMERR_CHOWN_FAILED = -32770,
30 RPMERR_WRITE_FAILED = -32771,
31 RPMERR_UTIME_FAILED = -32772,
32 RPMERR_UNLINK_FAILED = -32773,
33 RPMERR_RENAME_FAILED = -32774,
34 RPMERR_SYMLINK_FAILED = -32775,
35 RPMERR_STAT_FAILED = -32776,
36 RPMERR_LSTAT_FAILED = -32777,
37 RPMERR_MKDIR_FAILED = -32778,
38 RPMERR_RMDIR_FAILED = -32779,
39 RPMERR_MKNOD_FAILED = -32780,
40 RPMERR_MKFIFO_FAILED = -32781,
41 RPMERR_LINK_FAILED = -32782,
42 RPMERR_READLINK_FAILED = -32783,
43 RPMERR_READ_FAILED = -32784,
44 RPMERR_COPY_FAILED = -32785,
45 RPMERR_LSETFCON_FAILED = -32786,
46 RPMERR_SETCAP_FAILED = -32787,
47 };
48
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52
58 char * rpmfileStrerror(int rc);
59
71 rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files);
72
84 rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype);
85
91 int rpmfiArchiveClose(rpmfi fi);
92
98 rpm_loff_t rpmfiArchiveTell(rpmfi fi);
99
107 size_t rpmfiArchiveWrite(rpmfi fi, const void * buf, size_t size);
108
115 int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd);
116
124 size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
125
131 int rpmfiArchiveHasContent(rpmfi fi);
132
140 int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest);
141
142 #ifdef __cplusplus
143 }
144 #endif
145
146 #endif /* H_ARCHIVE */
rpmfileStrerror
char * rpmfileStrerror(int rc)
Return formatted error message on payload handling failure.
rpmfiArchiveClose
int rpmfiArchiveClose(rpmfi fi)
Close payload archive.
RPMERR_MKNOD_FAILED
Definition: rpmarchive.h:39
rpmfiArchiveRead
size_t rpmfiArchiveRead(rpmfi fi, void *buf, size_t size)
Read content from current file in archive.
RPMERR_SYMLINK_FAILED
Definition: rpmarchive.h:34
RPMERR_ENOENT
Definition: rpmarchive.h:23
RPMERR_MKDIR_FAILED
Definition: rpmarchive.h:37
RPMERR_UNKNOWN_FILETYPE
Definition: rpmarchive.h:18
RPMERR_READLINK_FAILED
Definition: rpmarchive.h:42
RPMERR_HDR_SIZE
Definition: rpmarchive.h:17
RPMERR_UTIME_FAILED
Definition: rpmarchive.h:31
RPMERR_COPY_FAILED
Definition: rpmarchive.h:44
RPMERR_INTERNAL
Definition: rpmarchive.h:21
RPMERR_READ_FAILED
Definition: rpmarchive.h:43
RPMERR_WRITE_FAILED
Definition: rpmarchive.h:30
RPMERR_SETCAP_FAILED
Definition: rpmarchive.h:46
RPMERR_RENAME_FAILED
Definition: rpmarchive.h:33
RPMERR_FILE_SIZE
Definition: rpmarchive.h:25
RPMERR_STAT_FAILED
Definition: rpmarchive.h:35
rpmfiArchiveTell
rpm_loff_t rpmfiArchiveTell(rpmfi fi)
Return current position in payload archive.
rpmfi
struct rpmfi_s * rpmfi
Definition: rpmtypes.h:66
RPMERR_LSETFCON_FAILED
Definition: rpmarchive.h:45
rpmfiArchiveWrite
size_t rpmfiArchiveWrite(rpmfi fi, const void *buf, size_t size)
Write content into current file in archive.
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:98
rpmfiArchiveHasContent
int rpmfiArchiveHasContent(rpmfi fi)
Has current file content stored in the archive.
RPMERR_UNMAPPED_FILE
Definition: rpmarchive.h:22
RPMERR_MISSING_FILE
Definition: rpmarchive.h:19
RPMERR_RMDIR_FAILED
Definition: rpmarchive.h:38
rpmfiArchiveReadToFile
int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest)
Write content from current file in archive to a file.
RPMERR_LSTAT_FAILED
Definition: rpmarchive.h:36
RPMERR_CHMOD_FAILED
Definition: rpmarchive.h:28
RPMERR_LINK_FAILED
Definition: rpmarchive.h:41
RPMERR_BAD_HEADER
Definition: rpmarchive.h:16
rpmfiNewArchiveReader
rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype)
Get new file iterator for looping over the archive content.
RPMERR_ITER_END
Definition: rpmarchive.h:14
rpmfiArchiveWriteFile
int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd)
Write content from given file into current file in archive.
rpmfilesErrorCodes
rpmfilesErrorCodes
Error codes for archive and file handling.
Definition: rpmarchive.h:13
RPMERR_CHOWN_FAILED
Definition: rpmarchive.h:29
RPMERR_MKFIFO_FAILED
Definition: rpmarchive.h:40
rpmfiNewArchiveWriter
rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files)
Get new file iterator for writing the archive content.
RPMERR_DIGEST_MISMATCH
Definition: rpmarchive.h:20
RPMERR_ENOTEMPTY
Definition: rpmarchive.h:24
RPMERR_UNLINK_FAILED
Definition: rpmarchive.h:32
RPMERR_OPEN_FAILED
Definition: rpmarchive.h:27
rpmfiles
struct rpmfiles_s * rpmfiles
Definition: rpmtypes.h:67
rpm_loff_t
uint64_t rpm_loff_t
Definition: rpmtypes.h:51
RPMERR_BAD_MAGIC
Definition: rpmarchive.h:15