rpm  5.2.1
rpmdb/rpmns.h
Go to the documentation of this file.
00001 #ifndef H_RPMNS
00002 #define H_RPMNS
00003 
00011 /*@-exportlocal@*/
00012 /*@unchecked@*/
00013 extern int _rpmns_debug;
00014 /*@=exportlocal@*/
00015 
00016 /*@unchecked@*/ /*@observer@*/ /*@relnull@*/
00017 extern const char *_rpmns_N_at_A;
00018 
00019 typedef /*@abstract@*/ struct rpmns_s * rpmns;
00020 
00024 typedef enum nsType_e {
00025     RPMNS_TYPE_UNKNOWN  =  0,
00026     RPMNS_TYPE_STRING   =  (1 <<  0),   
00027     RPMNS_TYPE_PATH     =  (1 <<  1),   
00028     RPMNS_TYPE_DSO      =  (1 <<  2),   
00029     RPMNS_TYPE_FUNCTION =  (1 <<  3),   
00030     RPMNS_TYPE_ARCH     =  (1 <<  4),   
00031     RPMNS_TYPE_VERSION  =  (1 <<  5),   
00032     RPMNS_TYPE_COMPOUND =  (1 <<  6),   
00033         /* 7 unused */
00034     RPMNS_TYPE_NAMESPACE=  (1 <<  8),   
00035     RPMNS_TYPE_RPMLIB   =  (1 <<  9),   
00036     RPMNS_TYPE_CPUINFO  =  (1 << 10),   
00037     RPMNS_TYPE_GETCONF  =  (1 << 11),   
00038     RPMNS_TYPE_UNAME    =  (1 << 12),   
00039     RPMNS_TYPE_SONAME   =  (1 << 13),   
00040     RPMNS_TYPE_ACCESS   =  (1 << 14),   
00041     RPMNS_TYPE_TAG      =  (1 << 15),   
00042     RPMNS_TYPE_USER     =  (1 << 16),   
00043     RPMNS_TYPE_GROUP    =  (1 << 17),   
00044     RPMNS_TYPE_MOUNTED  =  (1 << 18),   
00045     RPMNS_TYPE_DISKSPACE=  (1 << 19),   
00046     RPMNS_TYPE_DIGEST   =  (1 << 20),   
00047     RPMNS_TYPE_GNUPG    =  (1 << 21),   
00048     RPMNS_TYPE_MACRO    =  (1 << 22),   
00049     RPMNS_TYPE_ENVVAR   =  (1 << 23),   
00050     RPMNS_TYPE_RUNNING  =  (1 << 24),   
00051     RPMNS_TYPE_SANITY   =  (1 << 25),   
00052     RPMNS_TYPE_VCHECK   =  (1 << 26),   
00053     RPMNS_TYPE_SIGNATURE=  (1 << 27),   
00054     RPMNS_TYPE_VERIFY   =  (1 << 28),   
00055     RPMNS_TYPE_CONFIG   =  (1 << 29),   
00056 } nsType;
00057 
00058 #if defined(_RPMNS_INTERNAL)
00059 
00062 struct rpmns_s {
00063 /*@owned@*/
00064     const char * str;           
00065     nsType Type;                
00066 /*@dependent@*/ /*@null@*/
00067     const char * NS;            
00068 /*@dependent@*/ /*@relnull@*/
00069     const char * N;             
00070 /*@dependent@*/ /*@null@*/
00071     const char * A;             
00072     evrFlags Flags;             
00073 };
00074 #endif  /* _RPMNS_INTERNAL */
00075 
00076 #ifdef __cplusplus
00077 extern "C" {
00078 #endif
00079 
00085 nsType rpmnsArch(const char * str)
00086         /*@*/;
00087 
00093 nsType rpmnsProbe(const char * str)
00094         /*@*/;
00095 
00101 nsType rpmnsClassify(const char * str)
00102         /*@*/;
00103 
00110 int rpmnsParse(const char * str, rpmns ns)
00111         /*@globals rpmGlobalMacroContext, h_errno, internalState @*/
00112         /*@modifies ns, rpmGlobalMacroContext, internalState @*/;
00113 
00117 void rpmnsClean(void)
00118         /*@globals internalState @*/
00119         /*@modifies internalState @*/;
00120 
00131 rpmRC rpmnsProbeSignature(void * _ts, const char * fn,
00132                 /*@null@*/ const char * sigfn,
00133                 /*@null@*/ const char * pubfn,
00134                 /*@null@*/ const char * pubid,
00135                 int flags)
00136         /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
00137         /*@modifies _ts, rpmGlobalMacroContext, fileSystem, internalState @*/;
00138 
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142 
00143 #endif  /* H_RPMNS */