rpm 5.2.1

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

- File List
- Globals

rpmxar.h
Go to the documentation of this file.
1 #ifndef H_RPMXAR
2 #define H_RPMXAR
3
9 #include <rpmiotypes.h>
10
11 /*@unchecked@*/
12 extern int _xar_debug;
13
14 typedef /*@abstract@*/ /*@refcounted@*/ struct rpmxar_s * rpmxar;
15
16 #ifdef _RPMXAR_INTERNAL
17 #include "yarn.h"
18 struct rpmxar_s {
19 struct rpmioItem_s _item;
20 /*@relnull@*/
21 const void * x;
22 /*@relnull@*/
23 const void * f;
24 /*@relnull@*/
25 const void * i;
26 /*@null@*/
27 const char * member;
28 /*@null@*/
29 unsigned char * b;
30 size_t bsize;
31 size_t bx;
32 int first;
33 #if defined(__LCLINT__)
34 /*@refs@*/
35 int nrefs;
36 #endif
37 };
38 #endif
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
50 /*@unused@*/ /*@null@*/
51 rpmxar rpmxarUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmxar xar,
52 /*@null@*/ const char * msg)
53 /*@modifies xar @*/;
54 #define rpmxarUnlink(_xar, _msg) \
55 ((rpmxar)rpmioUnlinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
56
63 /*@unused@*/ /*@newref@*/ /*@null@*/
64 rpmxar rpmxarLink (/*@null@*/ rpmxar xar, /*@null@*/ const char * msg)
65 /*@modifies xar @*/;
66 #define rpmxarLink(_xar, _msg) \
67 ((rpmxar)rpmioLinkPoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
68
69 /*@unused@*/ /*@null@*/
70 rpmxar rpmxarFree(/*@killref@*/ /*@only@*/ rpmxar xar,
71 /*@null@*/ const char * msg)
72 /*@modifies xar @*/;
73 #define rpmxarFree(_xar, _msg) \
74 ((rpmxar)rpmioFreePoolItem((rpmioItem)(_xar), _msg, __FILE__, __LINE__))
75
76 /*@-globuse@*/
77 /*@relnull@*/
78 rpmxar rpmxarNew(const char * fn, const char * fmode)
79 /*@globals fileSystem @*/
80 /*@modifies fileSystem @*/;
81 /*@=globuse@*/
82
83 int rpmxarNext(rpmxar xar)
84 /*@globals fileSystem @*/
85 /*@modifies xar, fileSystem @*/;
86
87 int rpmxarPush(rpmxar xar, const char * fn, unsigned char * b, size_t bsize)
88 /*@globals fileSystem @*/
89 /*@modifies xar, fileSystem @*/;
90
91 int rpmxarPull(rpmxar xar, /*@null@*/ const char * fn)
92 /*@globals fileSystem @*/
93 /*@modifies xar, fileSystem @*/;
94
95 int rpmxarSwapBuf(rpmxar xar, /*@null@*/ unsigned char * b, size_t bsize,
96 /*@null@*/ unsigned char ** obp, /*@null@*/ size_t * obsizep)
97 /*@globals fileSystem @*/
98 /*@modifies xar, *obp, *obsizep, fileSystem @*/;
99
100 /*@-incondefs@*/
101 ssize_t xarRead(void * cookie, /*@out@*/ char * buf, size_t count)
102 /*@globals fileSystem, internalState @*/
103 /*@modifies buf, fileSystem, internalState @*/
104 /*@requires maxSet(buf) >= (count - 1) @*/;
105 /*@=incondefs@*/
106
107 #ifdef __cplusplus
108 }
109 #endif
110
111 #endif /* H_RPMXAR */