rpm  5.4.10
rpmmg.h
Go to the documentation of this file.
1 #ifndef H_RPMMG
2 #define H_RPMMG
3 
10 /*@unchecked@*/
11 extern int _rpmmg_debug;
12 
15 typedef /*@refcounted@*/ struct rpmmg_s * rpmmg;
16 
17 #if defined(_RPMMG_INTERNAL)
18 
20 struct rpmmg_s {
21  struct rpmioItem_s _item;
22  const char * fn;
23  int flags;
24 /*@relnull@*/
25  struct magic_set * ms;
26 #if defined(__LCLINT__)
27 /*@refs@*/
28  int nrefs;
29 #endif
30 };
31 #endif /* _RPMMG_INTERNAL */
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
42 /*@unused@*/ /*@null@*/
43 rpmmg rpmmgUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmmg mg)
44  /*@modifies mg @*/;
45 #define rpmmgUnlink(_mg) \
46  ((rpmmg)rpmioUnlinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
47 
53 /*@unused@*/ /*@newref@*/ /*@null@*/
54 rpmmg rpmmgLink (/*@null@*/ rpmmg mg)
55  /*@modifies mg @*/;
56 #define rpmmgLink(_mg) \
57  ((rpmmg)rpmioLinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
58 
64 /*@null@*/
65 rpmmg rpmmgFree(/*@killref@*/ /*@null@*/rpmmg mg)
66  /*@globals fileSystem @*/
67  /*@modifies mg, fileSystem @*/;
68 #define rpmmgFree(_mg) \
69  ((rpmmg)rpmioFreePoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
70 
77 /*@newref@*/ /*@null@*/
78 rpmmg rpmmgNew(const char * fn, int flags)
79  /*@globals fileSystem, internalState @*/
80  /*@modifies fileSystem, internalState @*/;
81 
88 /*@only@*/
89 const char * rpmmgFile(rpmmg mg, const char *fn)
90  /*@globals fileSystem, internalState @*/
91  /*@modifies mg, fileSystem, internalState @*/;
92 
100 /*@only@*/
101 const char * rpmmgBuffer(rpmmg mg, const char * b, size_t nb)
102  /*@globals fileSystem, internalState @*/
103  /*@modifies mg, fileSystem, internalState @*/;
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif /* H_RPMMG */