rpm 4.15.1

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
14 enum rpmfilesErrorCodes {
15 RPMERR_ITER_END = -1,
16 RPMERR_BAD_MAGIC = -2,
17 RPMERR_BAD_HEADER = -3,
18 RPMERR_HDR_SIZE = -4,
19 RPMERR_UNKNOWN_FILETYPE= -5,
20 RPMERR_MISSING_FILE = -6,
21 RPMERR_DIGEST_MISMATCH = -7,
22 RPMERR_INTERNAL = -8,
23 RPMERR_UNMAPPED_FILE = -9,
24 RPMERR_ENOENT = -10,
25 RPMERR_ENOTEMPTY = -11,
26 RPMERR_FILE_SIZE = -12,
27 RPMERR_ITER_SKIP = -13,
28 RPMERR_EXIST_AS_DIR = -14,
29
30 RPMERR_OPEN_FAILED = -32768,
31 RPMERR_CHMOD_FAILED = -32769,
32 RPMERR_CHOWN_FAILED = -32770,
33 RPMERR_WRITE_FAILED = -32771,
34 RPMERR_UTIME_FAILED = -32772,
35 RPMERR_UNLINK_FAILED = -32773,
36 RPMERR_RENAME_FAILED = -32774,
37 RPMERR_SYMLINK_FAILED = -32775,
38 RPMERR_STAT_FAILED = -32776,
39 RPMERR_LSTAT_FAILED = -32777,
40 RPMERR_MKDIR_FAILED = -32778,
41 RPMERR_RMDIR_FAILED = -32779,
42 RPMERR_MKNOD_FAILED = -32780,
43 RPMERR_MKFIFO_FAILED = -32781,
44 RPMERR_LINK_FAILED = -32782,
45 RPMERR_READLINK_FAILED = -32783,
46 RPMERR_READ_FAILED = -32784,
47 RPMERR_COPY_FAILED = -32785,
48 RPMERR_LSETFCON_FAILED = -32786,
49 RPMERR_SETCAP_FAILED = -32787,
50 };
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55
61 char * rpmfileStrerror(int rc);
62
74 rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files);
75
87 rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype);
88
94 int rpmfiArchiveClose(rpmfi fi);
95
101 rpm_loff_t rpmfiArchiveTell(rpmfi fi);
102
110 size_t rpmfiArchiveWrite(rpmfi fi, const void * buf, size_t size);
111
118 int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd);
119
127 size_t rpmfiArchiveRead(rpmfi fi, void * buf, size_t size);
128
134 int rpmfiArchiveHasContent(rpmfi fi);
135
143 int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest);
144
145 #ifdef __cplusplus
146 }
147 #endif
148
149 #endif /* H_ARCHIVE */
rpmfilesErrorCodes
rpmfilesErrorCodes
Definition: rpmarchive.h:14
RPMERR_CHOWN_FAILED
@ RPMERR_CHOWN_FAILED
Definition: rpmarchive.h:32
RPMERR_STAT_FAILED
@ RPMERR_STAT_FAILED
Definition: rpmarchive.h:38
RPMERR_FILE_SIZE
@ RPMERR_FILE_SIZE
Definition: rpmarchive.h:26
RPMERR_BAD_HEADER
@ RPMERR_BAD_HEADER
Definition: rpmarchive.h:17
rpmfiles
struct rpmfiles_s * rpmfiles
Definition: rpmtypes.h:67
rpmfiNewArchiveWriter
rpmfi rpmfiNewArchiveWriter(FD_t fd, rpmfiles files)
RPMERR_BAD_MAGIC
@ RPMERR_BAD_MAGIC
Definition: rpmarchive.h:16
RPMERR_RMDIR_FAILED
@ RPMERR_RMDIR_FAILED
Definition: rpmarchive.h:41
rpmfiArchiveHasContent
int rpmfiArchiveHasContent(rpmfi fi)
RPMERR_MKDIR_FAILED
@ RPMERR_MKDIR_FAILED
Definition: rpmarchive.h:40
RPMERR_ENOENT
@ RPMERR_ENOENT
Definition: rpmarchive.h:24
RPMERR_DIGEST_MISMATCH
@ RPMERR_DIGEST_MISMATCH
Definition: rpmarchive.h:21
RPMERR_UNKNOWN_FILETYPE
@ RPMERR_UNKNOWN_FILETYPE
Definition: rpmarchive.h:19
RPMERR_COPY_FAILED
@ RPMERR_COPY_FAILED
Definition: rpmarchive.h:47
RPMERR_READ_FAILED
@ RPMERR_READ_FAILED
Definition: rpmarchive.h:46
rpmfiArchiveWriteFile
int rpmfiArchiveWriteFile(rpmfi fi, FD_t fd)
RPMERR_LSETFCON_FAILED
@ RPMERR_LSETFCON_FAILED
Definition: rpmarchive.h:48
rpmfiArchiveRead
size_t rpmfiArchiveRead(rpmfi fi, void *buf, size_t size)
RPMERR_MKFIFO_FAILED
@ RPMERR_MKFIFO_FAILED
Definition: rpmarchive.h:43
RPMERR_RENAME_FAILED
@ RPMERR_RENAME_FAILED
Definition: rpmarchive.h:36
RPMERR_INTERNAL
@ RPMERR_INTERNAL
Definition: rpmarchive.h:22
RPMERR_UNLINK_FAILED
@ RPMERR_UNLINK_FAILED
Definition: rpmarchive.h:35
RPMERR_UNMAPPED_FILE
@ RPMERR_UNMAPPED_FILE
Definition: rpmarchive.h:23
rpm_loff_t
uint64_t rpm_loff_t
Definition: rpmtypes.h:51
RPMERR_SETCAP_FAILED
@ RPMERR_SETCAP_FAILED
Definition: rpmarchive.h:49
RPMERR_MKNOD_FAILED
@ RPMERR_MKNOD_FAILED
Definition: rpmarchive.h:42
rpmfiArchiveTell
rpm_loff_t rpmfiArchiveTell(rpmfi fi)
RPMERR_ENOTEMPTY
@ RPMERR_ENOTEMPTY
Definition: rpmarchive.h:25
rpmfiArchiveClose
int rpmfiArchiveClose(rpmfi fi)
RPMERR_UTIME_FAILED
@ RPMERR_UTIME_FAILED
Definition: rpmarchive.h:34
rpmfi
struct rpmfi_s * rpmfi
Definition: rpmtypes.h:66
FD_t
struct _FD_s * FD_t
Definition: rpmtypes.h:98
RPMERR_READLINK_FAILED
@ RPMERR_READLINK_FAILED
Definition: rpmarchive.h:45
rpmfileStrerror
char * rpmfileStrerror(int rc)
RPMERR_CHMOD_FAILED
@ RPMERR_CHMOD_FAILED
Definition: rpmarchive.h:31
RPMERR_WRITE_FAILED
@ RPMERR_WRITE_FAILED
Definition: rpmarchive.h:33
RPMERR_SYMLINK_FAILED
@ RPMERR_SYMLINK_FAILED
Definition: rpmarchive.h:37
RPMERR_OPEN_FAILED
@ RPMERR_OPEN_FAILED
Definition: rpmarchive.h:30
RPMERR_EXIST_AS_DIR
@ RPMERR_EXIST_AS_DIR
Definition: rpmarchive.h:28
RPMERR_ITER_SKIP
@ RPMERR_ITER_SKIP
Definition: rpmarchive.h:27
RPMERR_ITER_END
@ RPMERR_ITER_END
Definition: rpmarchive.h:15
RPMERR_HDR_SIZE
@ RPMERR_HDR_SIZE
Definition: rpmarchive.h:18
RPMERR_LINK_FAILED
@ RPMERR_LINK_FAILED
Definition: rpmarchive.h:44
RPMERR_MISSING_FILE
@ RPMERR_MISSING_FILE
Definition: rpmarchive.h:20
rpmfiNewArchiveReader
rpmfi rpmfiNewArchiveReader(FD_t fd, rpmfiles files, int itype)
rpmfiArchiveReadToFile
int rpmfiArchiveReadToFile(rpmfi fi, FD_t fd, int nodigest)
RPMERR_LSTAT_FAILED
@ RPMERR_LSTAT_FAILED
Definition: rpmarchive.h:39
rpmfiArchiveWrite
size_t rpmfiArchiveWrite(rpmfi fi, const void *buf, size_t size)