rpm 5.2.1

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

- File List
- Globals

rpmio/rpmxar.h
Go to the documentation of this file.

    00001 #ifndef H_RPMXAR
    00002 #define H_RPMXAR
    00003
    00009 #include <rpmiotypes.h>
    00010
    00011 /*@unchecked@*/
    00012 extern int _xar_debug;
    00013
    00014 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmxar_s * rpmxar;
    00015
    00016 #ifdef  _RPMXAR_INTERNAL
    00017 #include "yarn.h"
    00018 struct rpmxar_s {
    00019     struct rpmioItem_s _item;
    00020 /*@relnull@*/
    00021     const void * x;
    00022 /*@relnull@*/
    00023     const void * f;
    00024 /*@relnull@*/
    00025     const void * i;
    00026 /*@null@*/
    00027     const char * member;
    00028 /*@null@*/
    00029     unsigned char * b;
    00030     size_t bsize;
    00031     size_t bx;
    00032     int first;
    00033 #if defined(__LCLINT__)
    00034 /*@refs@*/
    00035     int nrefs;
    00036 #endif
    00037 };
    00038 #endif
    00039
    00040 #ifdef __cplusplus
    00041 extern "C" {
    00042 #endif
    00043
    00050 /*@unused@*/ /*@null@*/
    00051 rpmxar rpmxarUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmxar xar,
    00052                 /*@null@*/ const char * msg)
    00053         /*@modifies xar @*/;
    00054 #define rpmxarUnlink(_xar, _msg)        \
    00055     ((rpmxar)rpmioUnlinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
    00056
    00063 /*@unused@*/ /*@newref@*/ /*@null@*/
    00064 rpmxar rpmxarLink (/*@null@*/ rpmxar xar, /*@null@*/ const char * msg)
    00065         /*@modifies xar @*/;
    00066 #define rpmxarLink(_xar, _msg)  \
    00067     ((rpmxar)rpmioLinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
    00068
    00069 /*@unused@*/ /*@null@*/
    00070 rpmxar rpmxarFree(/*@killref@*/ /*@only@*/ rpmxar xar,
    00071                 /*@null@*/ const char * msg)
    00072         /*@modifies xar @*/;
    00073 #define rpmxarFree(_xar, _msg)  \
    00074     ((rpmxar)rpmioFreePoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
    00075
    00076 /*@-globuse@*/
    00077 /*@relnull@*/
    00078 rpmxar rpmxarNew(const char * fn, const char * fmode)
    00079         /*@globals fileSystem @*/
    00080         /*@modifies fileSystem @*/;
    00081 /*@=globuse@*/
    00082
    00083 int rpmxarNext(rpmxar xar)
    00084         /*@globals fileSystem @*/
    00085         /*@modifies xar, fileSystem @*/;
    00086
    00087 int rpmxarPush(rpmxar xar, const char * fn, unsigned char * b, size_t bsize)
    00088         /*@globals fileSystem @*/
    00089         /*@modifies xar, fileSystem @*/;
    00090
    00091 int rpmxarPull(rpmxar xar, /*@null@*/ const char * fn)
    00092         /*@globals fileSystem @*/
    00093         /*@modifies xar, fileSystem @*/;
    00094
    00095 int rpmxarSwapBuf(rpmxar xar, /*@null@*/ unsigned char * b, size_t bsize,
    00096                 /*@null@*/ unsigned char ** obp, /*@null@*/ size_t * obsizep)
    00097         /*@globals fileSystem @*/
    00098         /*@modifies xar, *obp, *obsizep, fileSystem @*/;
    00099
    00100 /*@-incondefs@*/
    00101 ssize_t xarRead(void * cookie, /*@out@*/ char * buf, size_t count)
    00102         /*@globals fileSystem, internalState @*/
    00103         /*@modifies buf, fileSystem, internalState @*/
    00104         /*@requires maxSet(buf) >= (count - 1) @*/;
    00105 /*@=incondefs@*/
    00106
    00107 #ifdef __cplusplus
    00108 }
    00109 #endif
    00110
    00111 #endif  /* H_RPMXAR */