rpm 5.2.1

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

- File List
- Globals

Macros | Typedefs | Functions | Variables
rpmdav.h File Reference
RPMIO.
`#include <argv.h>`
Include dependency graph for rpmdav.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | DT_UNKNOWN 0
#define | DT_FIFO 1
#define | DT_CHR 2
#define | DT_DIR 4
#define | DT_BLK 6
#define | DT_REG 8
#define | DT_LNK 10
#define | DT_SOCK 12
#define | DT_WHT 14

## Typedefs
typedef struct __dirstream * | AVDIR
typedef struct __dirstream * | DAVDIR

## Functions
int | davDisconnect (void *_u)
| Close active neon transfer(s) (if any). More...
int | davFree (urlinfo u)
| Free persistent neon session state. More...
void | davDestroy (void)
| Free global neon+openSSL state memory. More...
int | davReq (FD_t ctrl, const char *httpCmd, const char *httpArg)
| Send a http request. More...
int | davResp (urlinfo u, FD_t ctrl, char *const *str)
| Read a http response. More...
FD_t | davOpen (const char *url, int flags, mode_t mode, urlinfo *uret)
| Open a URL. More...
FD_t | httpOpen (const char *url, int flags, mode_t mode, urlinfo *uret)
ssize_t | davRead (void *cookie, char *buf, size_t count)
ssize_t | davWrite (void *cookie, const char *buf, size_t count)
int | davSeek (void *cookie, _libio_pos_t pos, int whence)
int | davClose (void *cookie)
int | davMkdir (const char *path, mode_t mode)
int | davRmdir (const char *path)
int | davRename (const char *oldpath, const char *newpath)
int | davUnlink (const char *path)
int | davClosedir (DIR *dir)
| Close a DAV collection. More...
struct dirent * | davReaddir (DIR *dir)
| Return next entry from a DAV collection. More...
DIR * | davOpendir (const char *path)
| Create an argv directory from DAV collection. More...
int | davStat (const char *path, struct stat *st)
| stat(2) clone. More...
int | davLstat (const char *path, struct stat *st)
| lstat(2) clone. More...
char * | davRealpath (const char *path, char *resolved_path)
| realpath(3) clone. More...

## Variables
int | rpmioHttpReadTimeoutSecs
int | rpmioHttpConnectTimeoutSecs
const char * | rpmioHttpAccept
const char * | rpmioHttpUserAgent

## Macro Definition Documentation

#define DT_BLK 6

Definition at line 40 of file rpmdav.h.

Referenced by avOpendir().

#define DT_CHR 2

Definition at line 38 of file rpmdav.h.

Referenced by avOpendir().

#define DT_DIR 4

Definition at line 39 of file rpmdav.h.

Referenced by avOpendir(), fts_build(), and glob_in_dir().

#define DT_FIFO 1

Definition at line 37 of file rpmdav.h.

Referenced by avOpendir().

#define DT_LNK 10

Definition at line 42 of file rpmdav.h.

Referenced by avOpendir().

#define DT_REG 8

Definition at line 41 of file rpmdav.h.

Referenced by avOpendir().

#define DT_SOCK 12

Definition at line 43 of file rpmdav.h.

Referenced by avOpendir().

#define DT_UNKNOWN 0

Definition at line 36 of file rpmdav.h.

Referenced by avOpendir(), fts_build(), and glob_in_dir().

#define DT_WHT 14

Definition at line 44 of file rpmdav.h.

Referenced by fts_build().

## Typedef Documentation

typedef struct __dirstream* AVDIR

Definition at line 45 of file rpmdav.h.

typedef struct __dirstream* DAVDIR

Definition at line 46 of file rpmdav.h.

## Function Documentation

int davClose | ( | void * | cookie | ) |

Referenced by __fdClose().

int davClosedir | ( | DIR * | dir | ) |

Close a DAV collection.

Parameters

  dir | argv DIR

Returns
  0 always

void davDestroy | ( | void |  | ) |

Free global neon+openSSL state memory.

Referenced by rpmioClean().

int davDisconnect | ( | void * | _u | ) |

Close active neon transfer(s) (if any).

Parameters

  _u | URL container

Returns
  0 on sucess

Referenced by Fclose().

int davFree | ( | urlinfo | u | ) |

Free persistent neon session state.

Parameters

  u | URL container

Returns
  0 on success

Referenced by urlFini().

int davLstat | ( | const char * | path,
|  | struct stat * | st
| ) |  |

lstat(2) clone.

Referenced by Lstat().

int davMkdir | ( | const char * | path,
|  | mode_t | mode
| ) |  |

Referenced by Mkdir().

FD_t davOpen | ( | const char * | url,
|  | int | flags,
|  | mode_t | mode,
|  | urlinfo * | uret
| ) |  |

Open a URL.

Parameters

  url |
  flags |
  mode |

Return values

  *uret |

Returns

Referenced by ufdOpen().

DIR* davOpendir | ( | const char * | path | ) |

Create an argv directory from DAV collection.

Parameters

  path | URL for DAV collection path

Returns
  argv DIR

Referenced by Opendir().

ssize_t davRead | ( | void * | cookie,
|  | char * | buf,
|  | size_t | count
| ) |  |

Referenced by __fdRead().

struct dirent* davReaddir | ( | DIR * | dir | ) |
| read

Return next entry from a DAV collection.

Parameters

  dir | argv DIR

Returns
  next entry

char* davRealpath | ( | const char * | path,
|  | char * | resolved_path
| ) |  |

realpath(3) clone.

Referenced by Realpath().

int davRename | ( | const char * | oldpath,
|  | const char * | newpath
| ) |  |

Referenced by Rename().

int davReq | ( | FD_t | ctrl,
|  | const char * | httpCmd,
|  | const char * | httpArg
| ) |  |

Send a http request.

Parameters

  ctrl | connection stream
  httpCmd | http command
  httpArg | http command argument (NULL if none)

Returns
  0 on success

Referenced by ufdOpen().

int davResp | ( | urlinfo | u,
|  | FD_t | ctrl,
|  | char *const * | str
| ) |  |

Read a http response.

Parameters

  u | URL container
  ctrl | connection stream

Return values

  *str | error msg

Returns
  0 on success

int davRmdir | ( | const char * | path | ) |

Referenced by Rmdir().

int davSeek | ( | void * | cookie,
|  | _libio_pos_t | pos,
|  | int | whence
| ) |  |

int davStat | ( | const char * | path,
|  | struct stat * | st
| ) |  |

stat(2) clone.

Referenced by Stat().

int davUnlink | ( | const char * | path | ) |

Referenced by Unlink().

ssize_t davWrite | ( | void * | cookie,
|  | const char * | buf,
|  | size_t | count
| ) |  |

Referenced by __fdWrite().

FD_t httpOpen | ( | const char * | url,
|  | int | flags,
|  | mode_t | mode,
|  | urlinfo * | uret
| ) |  |

Definition at line 2305 of file rpmdav.c.

References _FD_s::_item, _FD_s::bytesRemain, _FD_s::contentLength, urlinfo_s::ctrl, urlinfo_s::data, fdLink(), fdNew(), fdSetIo(), _FD_s::ftpFileDoneNeeded, L, _FD_s::rd_timeoutsecs, rpmioHttpReadTimeoutSecs, ufdio, _FD_s::url, URL_IS_HTTP, urlLink(), urlSplit(), _FD_s::urlType, and rpmioItem_s::use.

Referenced by ufdOpen().

## Variable Documentation

const char* rpmioHttpAccept

Definition at line 101 of file rpmdav.c.

int rpmioHttpConnectTimeoutSecs

Definition at line 93 of file rpmdav.c.

int rpmioHttpReadTimeoutSecs

Definition at line 91 of file rpmdav.c.

Referenced by httpOpen().

const char* rpmioHttpUserAgent

Definition at line 103 of file rpmdav.c.