rpm 5.2.1

rpmio/rpmmg.h

Go to the documentation of this file.
00001 #ifndef H_RPMMG
00002 #define H_RPMMG
00003 
00010 /*@unchecked@*/
00011 extern int _rpmmg_debug;
00012 
00015 typedef /*@refcounted@*/ struct rpmmg_s * rpmmg;
00016 
00017 #if defined(_RPMMG_INTERNAL)
00018 
00020 struct rpmmg_s {
00021     struct rpmioItem_s _item;   
00022     const char * fn;
00023     int flags;
00024 /*@relnull@*/
00025     void * ms;
00026 #if defined(__LCLINT__)
00027 /*@refs@*/
00028     int nrefs;                  
00029 #endif
00030 };
00031 #endif  /* _RPMMG_INTERNAL */
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00042 /*@unused@*/ /*@null@*/
00043 rpmmg rpmmgUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmmg mg)
00044         /*@modifies mg @*/;
00045 #define rpmmgUnlink(_ds)        \
00046     ((rpmmg)rpmioUnlinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
00047 
00053 /*@unused@*/ /*@newref@*/ /*@null@*/
00054 rpmmg rpmmgLink (/*@null@*/ rpmmg mg)
00055         /*@modifies mg @*/;
00056 #define rpmmgLink(_mg)  \
00057     ((rpmmg)rpmioLinkPoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
00058 
00064 /*@null@*/
00065 rpmmg rpmmgFree(/*@killref@*/ /*@null@*/rpmmg mg)
00066         /*@globals fileSystem @*/
00067         /*@modifies mg, fileSystem @*/;
00068 #define rpmmgFree(_mg)  \
00069     ((rpmmg)rpmioFreePoolItem((rpmioItem)(_mg), __FUNCTION__, __FILE__, __LINE__))
00070 
00077 /*@newref@*/ /*@null@*/
00078 rpmmg rpmmgNew(const char * fn, int flags)
00079         /*@globals fileSystem, internalState @*/
00080         /*@modifies fileSystem, internalState @*/;
00081 
00088 /*@only@*/
00089 const char * rpmmgFile(rpmmg mg, const char *fn)
00090         /*@globals fileSystem, internalState @*/
00091         /*@modifies mg, fileSystem, internalState @*/;
00092 
00100 /*@only@*/
00101 const char * rpmmgBuffer(rpmmg mg, const char * b, size_t nb)
00102         /*@globals fileSystem, internalState @*/
00103         /*@modifies mg, fileSystem, internalState @*/;
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif  /* H_RPMMG */