rpm  5.4.15
rpmsp.h
Go to the documentation of this file.
1 #ifndef H_RPMSP
2 #define H_RPMSP
3 
8 #include <rpmiotypes.h>
9 #include <rpmio.h>
10 
11 typedef /*@refcounted@*/ struct rpmsp_s * rpmsp;
12 
13 /*@unchecked@*/
14 extern int _rpmsp_debug;
15 
16 /*@unchecked@*/ /*@relnull@*/
17 extern rpmsp _rpmspI;
18 
19 #if defined(_RPMSP_INTERNAL)
20 
22 struct rpmsp_s {
23  struct rpmioItem_s _item;
24  const char * fn;
25  unsigned int flags;
26  struct sepol_handle * I;
27  struct sepol_policydb * DB;
28  struct sepol_policy_file * F;
29  struct sepol_context * C;
30  struct sepol_module_package * P;
31 #if defined(__LCLINT__)
32 /*@refs@*/
33  int nrefs;
34 #endif
35 };
36 #endif /* _RPMSP_INTERNAL */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
47 /*@unused@*/ /*@null@*/
48 rpmsp rpmspUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmsp sp)
49  /*@modifies sp @*/;
50 #define rpmspUnlink(_sp) \
51  ((rpmsp)rpmioUnlinkPoolItem((rpmioItem)(_sp), __FUNCTION__, __FILE__, __LINE__))
52 
58 /*@unused@*/ /*@newref@*/ /*@null@*/
59 rpmsp rpmspLink (/*@null@*/ rpmsp sp)
60  /*@modifies sp @*/;
61 #define rpmspLink(_sp) \
62  ((rpmsp)rpmioLinkPoolItem((rpmioItem)(_sp), __FUNCTION__, __FILE__, __LINE__))
63 
69 /*@null@*/
70 rpmsp rpmspFree(/*@killref@*/ /*@null@*/rpmsp sp)
71  /*@globals fileSystem @*/
72  /*@modifies sp, fileSystem @*/;
73 #define rpmspFree(_sp) \
74  ((rpmsp)rpmioFreePoolItem((rpmioItem)(_sp), __FUNCTION__, __FILE__, __LINE__))
75 
82 /*@newref@*/ /*@null@*/
83 rpmsp rpmspNew(/*@null@*/ const char * fn, unsigned int flags)
84  /*@globals fileSystem, internalState @*/
85  /*@modifies fileSystem, internalState @*/;
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif /* H_RPMSP */
#define rpmspUnlink(_sp)
Definition: rpmsp.h:50
rpmsp _rpmspI
Definition: rpmsp.c:28
int _rpmsp_debug
Definition: rpmsp.c:25
#define rpmspLink(_sp)
Definition: rpmsp.h:61
rpmsp rpmspNew(const char *fn, unsigned int flags)
Create and load a sepol wrapper.
Definition: rpmsp.c:74
const char const bson int mongo_write_concern int flags
Definition: mongo.h:485
struct __db DB
Definition: db_emu.h:9
#define rpmspFree(_sp)
Definition: rpmsp.h:73
struct rpmsp_s * rpmsp
Definition: rpmsp.h:11