rpm: rpmio.h Source File

rpm 4.16.1.3

rpmio.h
Go to the documentation of this file.
1 #ifndef H_RPMIO
2 #define H_RPMIO
3
10 #include <sys/types.h>
11 #include <sys/stat.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <unistd.h>
15
16 #include <rpm/rpmtypes.h>
17 #include <rpm/rpmsw.h>
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
25 typedef const struct FDIO_s * FDIO_t;
26
27
35 const char * Fstrerror(FD_t fd);
36
40 ssize_t Fread(void * buf, size_t size, size_t nmemb, FD_t fd);
41
45 ssize_t Fwrite(const void * buf, size_t size, size_t nmemb, FD_t fd);
46
50 int Fseek(FD_t fd, off_t offset, int whence);
51
55 off_t Ftell(FD_t fd);
56
60 int Fclose( FD_t fd);
61
64 FD_t Fdopen(FD_t ofd, const char * fmode);
65
69 FD_t Fopen(const char * path,
70 const char * fmode);
71
72
76 int Fflush(FD_t fd);
77
81 int Ferror(FD_t fd);
82
86 int Fileno(FD_t fd);
87
91 int Fcntl(FD_t fd, int op, void *lip);
92
96 const char * Fdescr(FD_t fd);
97
104 off_t fdSize(FD_t fd);
105
108 FD_t fdDup(int fdno);
109
112 FD_t fdLink(FD_t fd);
113
116 FD_t fdFree(FD_t fd);
117
120 off_t ufdCopy(FD_t sfd, FD_t tfd);
121
125 typedef enum fdOpX_e {
126 FDSTAT_READ = 0,
127 FDSTAT_WRITE = 1,
128 FDSTAT_SEEK = 2,
129 FDSTAT_CLOSE = 3,
130 FDSTAT_DIGEST = 4,
131 FDSTAT_MAX = 5
132 } fdOpX;
133
137 rpmop fdOp(FD_t fd, fdOpX opx);
138
139 #ifdef __cplusplus
140 }
141 #endif
142
143 #endif /* H_RPMIO */
Fflush
int Fflush(FD_t fd)
fflush(3) clone.
FDSTAT_WRITE
@ FDSTAT_WRITE
Definition: rpmio.h:127
Fdopen
FD_t Fdopen(FD_t ofd, const char *fmode)
FDSTAT_MAX
@ FDSTAT_MAX
Definition: rpmio.h:131
Fseek
int Fseek(FD_t fd, off_t offset, int whence)
fseek(3) clone.
ufdCopy
off_t ufdCopy(FD_t sfd, FD_t tfd)
fdLink
FD_t fdLink(FD_t fd)
Fwrite
ssize_t Fwrite(const void *buf, size_t size, size_t nmemb, FD_t fd)
Like fwrite(3) but with write(3)-style return values.
fdOpX_e
fdOpX_e
Identify per-desciptor I/O operation statistics.
Definition: rpmio.h:125
Ftell
off_t Ftell(FD_t fd)
ftell(3) clone.
Fopen
FD_t Fopen(const char *path, const char *fmode)
fopen(3) clone.
fdDup
FD_t fdDup(int fdno)
FDSTAT_READ
@ FDSTAT_READ
Definition: rpmio.h:126
Ferror
int Ferror(FD_t fd)
ferror(3) clone.
Fdescr
const char * Fdescr(FD_t fd)
Get informative description (eg file name) from fd for diagnostic output.
Fcntl
int Fcntl(FD_t fd, int op, void *lip)
fcntl(2) clone.
FDSTAT_SEEK
@ FDSTAT_SEEK
Definition: rpmio.h:128
Fileno
int Fileno(FD_t fd)
fileno(3) clone.
fdSize
off_t fdSize(FD_t fd)
fdOpX
enum fdOpX_e fdOpX
Identify per-desciptor I/O operation statistics.
FD_t
struct _FD_s * FD_t
RPM IO file descriptor type.
Definition: rpmtypes.h:99
Fclose
int Fclose(FD_t fd)
fclose(3) clone.
Fread
ssize_t Fread(void *buf, size_t size, size_t nmemb, FD_t fd)
Like fread(3) but with read(3)-style return values.
rpmop_s
Cumulative statistics for an operation.
Definition: rpmsw.h:42
FDSTAT_CLOSE
@ FDSTAT_CLOSE
Definition: rpmio.h:129
FDSTAT_DIGEST
@ FDSTAT_DIGEST
Definition: rpmio.h:130
FDIO_t
const struct FDIO_s * FDIO_t
Definition: rpmio.h:25
fdFree
FD_t fdFree(FD_t fd)
fdOp
rpmop fdOp(FD_t fd, fdOpX opx)
Fstrerror
const char * Fstrerror(FD_t fd)
strerror(3) clone.