rpm  5.4.15
rpmasn.h
Go to the documentation of this file.
1 #ifndef H_RPMASN
2 #define H_RPMASN
3 
10 /*@unchecked@*/
11 extern int _rpmasn_debug;
12 
15 typedef /*@refcounted@*/ struct rpmasn_s * rpmasn;
16 
17 #if defined(_RPMASN_INTERNAL)
18 #if defined(HAVE_LIBTASN1_H) /* XXX lose the AutoFu */
19 #include <libtasn1.h>
20 #else
21 typedef void * ASN1_TYPE;
22 #endif
23 #if !defined(ASN1_MAX_NAME_SIZE)
24 #define ASN1_MAX_NAME_SIZE 128
25 #endif
26 #if !defined(ASN1_MAX_ERROR_DESCRIPTION_SIZE)
27 #define ASN1_MAX_ERROR_DESCRIPTION_SIZE 128
28 #endif
29 
32 struct rpmasn_s {
33  struct rpmioItem_s _item;
34  const char * fn;
35  int flags;
36 /*@relnull@*/
37  ASN1_TYPE tree;
38  char error[ASN1_MAX_ERROR_DESCRIPTION_SIZE];
39 #if defined(__LCLINT__)
40 /*@refs@*/
41  int nrefs;
42 #endif
43 };
44 #endif /* _RPMASN_INTERNAL */
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
55 /*@unused@*/ /*@null@*/
56 rpmasn rpmasnUnlink (/*@killref@*/ /*@only@*/ /*@null@*/ rpmasn asn)
57  /*@modifies asn @*/;
58 #define rpmasnUnlink(_asn) \
59  ((rpmasn)rpmioUnlinkPoolItem((rpmioItem)(_asn), __FUNCTION__, __FILE__, __LINE__))
60 
66 /*@unused@*/ /*@newref@*/ /*@null@*/
67 rpmasn rpmasnLink (/*@null@*/ rpmasn asn)
68  /*@modifies asn @*/;
69 #define rpmasnLink(_asn) \
70  ((rpmasn)rpmioLinkPoolItem((rpmioItem)(_asn), __FUNCTION__, __FILE__, __LINE__))
71 
77 /*@null@*/
78 rpmasn rpmasnFree(/*@killref@*/ /*@null@*/rpmasn asn)
79  /*@globals fileSystem @*/
80  /*@modifies asn, fileSystem @*/;
81 #define rpmasnFree(_asn) \
82  ((rpmasn)rpmioFreePoolItem((rpmioItem)(_asn), __FUNCTION__, __FILE__, __LINE__))
83 
90 /*@newref@*/ /*@null@*/
91 rpmasn rpmasnNew(const char * fn, int flags)
92  /*@globals fileSystem, internalState @*/
93  /*@modifies fileSystem, internalState @*/;
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif /* H_RPMASN */
rpmasn rpmasnNew(const char *fn, int flags)
Create and load a ASN.1 wrapper.
Definition: rpmasn.c:56
#define rpmasnFree(_asn)
Definition: rpmasn.h:81
#define rpmasnLink(_asn)
Definition: rpmasn.h:69
#define rpmasnUnlink(_asn)
Definition: rpmasn.h:58
const char const bson int mongo_write_concern int flags
Definition: mongo.h:485
int _rpmasn_debug
Definition: rpmasn.c:21
struct rpmasn_s * rpmasn
Definition: rpmasn.h:15