rpm  5.4.10
rpmdav.h
Go to the documentation of this file.
1 #ifndef RPMDAV_H
2 #define RPMDAV_H
3 
7 #include <rpmio.h>
8 #include <rpmurl.h>
9 
12 /*@unchecked@*/
13 extern int _ftp_debug;
14 /*@unchecked@*/
15 extern int _dav_debug;
16 /*@unchecked@*/
17 extern int rpmioHttpReadTimeoutSecs;
18 /*@unchecked@*/
20 /*@unchecked@*/ /*@null@*/
21 extern const char * rpmioHttpAccept;
22 /*@unchecked@*/ /*@null@*/
23 extern const char * rpmioHttpUserAgent;
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
34 /*@null@*/
35 DIR * ftpOpendir(const char * path)
36  /*@globals h_errno, errno, fileSystem, internalState @*/
37  /*@modifies errno, fileSystem, internalState @*/;
38 
44 int davDisconnect(void * _u)
45  /*@globals internalState @*/
46  /*@modifies _u, internalState @*/;
47 
53 int davFree(urlinfo u)
54  /*@globals internalState @*/
55  /*@modifies u, internalState @*/;
56 
60 void davDestroy(void)
61  /*@globals internalState @*/
62  /*@modifies internalState @*/;
63 
71 int davReq(FD_t ctrl, const char * httpCmd, /*@null@*/ const char * httpArg)
72  /*@globals fileSystem, internalState @*/
73  /*@modifies ctrl, fileSystem, internalState @*/;
74 
82 /*@-exportlocal@*/
83 int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str)
84  /*@globals fileSystem, internalState @*/
85  /*@modifies ctrl, *str, fileSystem, internalState @*/;
86 /*@=exportlocal@*/
87 
96 /*@null@*/
97 FD_t davOpen(const char * url, /*@unused@*/ int flags,
98  /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
99  /*@globals internalState @*/
100  /*@modifies *uret, internalState @*/;
101 
102 /*@null@*/
103 FD_t httpOpen(const char * url, /*@unused@*/ int flags,
104  /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
105  /*@globals internalState @*/
106  /*@modifies *uret, internalState @*/;
107 
110 ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
111  /*@globals errno, fileSystem, internalState @*/
112  /*@modifies buf, errno, fileSystem, internalState @*/;
113 
116 ssize_t davWrite(void * cookie, const char * buf, size_t count)
117  /*@globals fileSystem, internalState @*/
118  /*@modifies fileSystem, internalState @*/;
119 
122 int davSeek(void * cookie, _libio_pos_t pos, int whence)
123  /*@globals fileSystem, internalState @*/
124  /*@modifies fileSystem, internalState @*/;
125 
128 int davClose(void * cookie)
129  /*@globals fileSystem, internalState @*/
130  /*@modifies cookie, fileSystem, internalState @*/;
131 
134 int davMkdir(const char * path, mode_t mode)
135  /*@globals fileSystem, internalState @*/
136  /*@modifies fileSystem, internalState @*/;
137 
140 int davRmdir(const char * path)
141  /*@globals fileSystem, internalState @*/
142  /*@modifies fileSystem, internalState @*/;
143 
146 int davRename(const char * oldpath, const char * newpath)
147  /*@globals fileSystem, internalState @*/
148  /*@modifies fileSystem, internalState @*/;
149 
152 int davUnlink(const char * path)
153  /*@globals fileSystem, internalState @*/
154  /*@modifies fileSystem, internalState @*/;
155 
161 int davClosedir(/*@only@*/ DIR * dir)
162  /*@globals fileSystem @*/
163  /*@modifies dir, fileSystem @*/;
164 
170 /*@dependent@*/ /*@null@*/
171 struct dirent * davReaddir(DIR * dir)
172  /*@globals fileSystem @*/
173  /*@modifies fileSystem @*/;
174 
180 /*@null@*/
181 DIR * davOpendir(const char * path)
182  /*@globals errno, fileSystem, internalState @*/
183  /*@modifies errno, fileSystem, internalState @*/;
184 
188 int davStat(const char * path, /*@out@*/ struct stat * st)
189  /*@globals errno, fileSystem, internalState @*/
190  /*@modifies *st, errno, fileSystem, internalState @*/;
191 
195 int davLstat(const char * path, /*@out@*/ struct stat * st)
196  /*@globals errno, fileSystem, internalState @*/
197  /*@modifies *st, errno, fileSystem, internalState @*/;
198 
202 char * davRealpath(const char * path, /*@out@*/ /*@null@*/ char * resolved_path)
203  /*@modifies *resolved_path @*/;
204 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 #endif /* RPMDAV_H */
int davDisconnect(void *_u)
Close active neon transfer(s) (if any).
int davMkdir(const char *path, mode_t mode)
URL control structure.
Definition: rpmurl.h:52
int davLstat(const char *path, struct stat *st)
lstat(2) clone.
const char * rpmioHttpUserAgent
Definition: rpmdav.c:116
DIR * davOpendir(const char *path)
Create an argv directory from DAV collection.
ssize_t davRead(void *cookie, char *buf, size_t count)
off_t _libio_pos_t
Definition: rpmio.h:32
int davFree(urlinfo u)
Free persistent neon session state.
FD_t httpOpen(const char *url, int flags, mode_t mode, urlinfo *uret)
Definition: rpmdav.c:2222
struct dirent * davReaddir(DIR *dir)
Return next entry from a DAV collection.
int rpmioHttpReadTimeoutSecs
Definition: rpmdav.c:104
The FD_t File Handle data structure.
int davSeek(void *cookie, _libio_pos_t pos, int whence)
int rpmioHttpConnectTimeoutSecs
Definition: rpmdav.c:106
#define dirent
Definition: system.h:230
const char * rpmioHttpAccept
Definition: rpmdav.c:114
int davClosedir(DIR *dir)
Close a DAV collection.
int davUnlink(const char *path)
int davRmdir(const char *path)
char * davRealpath(const char *path, char *resolved_path)
realpath(3) clone.
ssize_t davWrite(void *cookie, const char *buf, size_t count)
int davClose(void *cookie)
void davDestroy(void)
Free global neon+openSSL state memory.
int _dav_debug
Definition: rpmio.c:193
int davRename(const char *oldpath, const char *newpath)
FD_t davOpen(const char *url, int flags, mode_t mode, urlinfo *uret)
Open a URL.
int davReq(FD_t ctrl, const char *httpCmd, const char *httpArg)
Send a http request.
int _ftp_debug
Definition: rpmio.c:188
int davStat(const char *path, struct stat *st)
stat(2) clone.
int davResp(urlinfo u, FD_t ctrl, char *const *str)
Read a http response.
DIR * ftpOpendir(const char *path)
Create an argv directory from an ftp:// URI.
Definition: rpmrpc.c:1254