rpmxar.h
Go to the documentation of this file.
#ifndef H_RPMXAR
#define H_RPMXAR
#include <rpmiotypes.h>
/*@unchecked@*/
extern int _xar_debug;
typedef /*@abstract@*/ /*@refcounted@*/ struct rpmxar_s * rpmxar;
#ifdef _RPMXAR_INTERNAL
#include "yarn.h"
struct rpmxar_s {
struct rpmioItem_s _item;
/*@relnull@*/
const void * x;
/*@relnull@*/
const void * f;
/*@relnull@*/
const void * i;
/*@null@*/
const char * member;
/*@null@*/
unsigned char * b;
size_t bsize;
size_t bx;
int first;
#if defined(__LCLINT__)
/*@refs@*/
int nrefs;
#endif
};
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*@unused@*/ /*@null@*/
rpmxar rpmxarUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmxar xar,
/*@null@*/ const char * msg)
/*@modifies xar @*/;
#define rpmxarUnlink(_xar, _msg) \
((rpmxar)rpmioUnlinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
/*@unused@*/ /*@newref@*/ /*@null@*/
rpmxar rpmxarLink (/*@null@*/ rpmxar xar, /*@null@*/ const char * msg)
/*@modifies xar @*/;
#define rpmxarLink(_xar, _msg) \
((rpmxar)rpmioLinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
/*@unused@*/ /*@null@*/
rpmxar rpmxarFree(/*@killref@*/ /*@only@*/ rpmxar xar,
/*@null@*/ const char * msg)
/*@modifies xar @*/;
#define rpmxarFree(_xar, _msg) \
((rpmxar)rpmioFreePoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
/*@-globuse@*/
/*@relnull@*/
rpmxar rpmxarNew(const char * fn, const char * fmode)
/*@globals fileSystem @*/
/*@modifies fileSystem @*/;
/*@=globuse@*/
int rpmxarNext(rpmxar xar)
/*@globals fileSystem @*/
/*@modifies xar, fileSystem @*/;
int rpmxarPush(rpmxar xar, const char * fn, unsigned char * b, size_t bsize)
/*@globals fileSystem @*/
/*@modifies xar, fileSystem @*/;
int rpmxarPull(rpmxar xar, /*@null@*/ const char * fn)
/*@globals fileSystem @*/
/*@modifies xar, fileSystem @*/;
int rpmxarSwapBuf(rpmxar xar, /*@null@*/ unsigned char * b, size_t bsize,
/*@null@*/ unsigned char ** obp, /*@null@*/ size_t * obsizep)
/*@globals fileSystem @*/
/*@modifies xar, *obp, *obsizep, fileSystem @*/;
/*@-incondefs@*/
ssize_t xarRead(void * cookie, /*@out@*/ char * buf, size_t count)
/*@globals fileSystem, internalState @*/
/*@modifies buf, fileSystem, internalState @*/
/*@requires maxSet(buf) >= (count - 1) @*/;
/*@=incondefs@*/
#ifdef __cplusplus
}
#endif
#endif /* H_RPMXAR */