1*f491972cSAugustin Cavalier /* 2*f491972cSAugustin Cavalier * Copyright (c) 2007, Novell Inc. 3*f491972cSAugustin Cavalier * 4*f491972cSAugustin Cavalier * This program is licensed under the BSD license, read LICENSE.BSD 5*f491972cSAugustin Cavalier * for further information 6*f491972cSAugustin Cavalier */ 7*f491972cSAugustin Cavalier 8*f491972cSAugustin Cavalier /* 9*f491972cSAugustin Cavalier * poolid.h 10*f491972cSAugustin Cavalier * 11*f491972cSAugustin Cavalier */ 12*f491972cSAugustin Cavalier 13*f491972cSAugustin Cavalier #ifndef LIBSOLV_POOLID_H 14*f491972cSAugustin Cavalier #define LIBSOLV_POOLID_H 15*f491972cSAugustin Cavalier 16*f491972cSAugustin Cavalier #include "pooltypes.h" 17*f491972cSAugustin Cavalier #include "hash.h" 18*f491972cSAugustin Cavalier 19*f491972cSAugustin Cavalier #ifdef __cplusplus 20*f491972cSAugustin Cavalier extern "C" { 21*f491972cSAugustin Cavalier #endif 22*f491972cSAugustin Cavalier 23*f491972cSAugustin Cavalier /*----------------------------------------------- 24*f491972cSAugustin Cavalier * Ids with relation 25*f491972cSAugustin Cavalier */ 26*f491972cSAugustin Cavalier 27*f491972cSAugustin Cavalier typedef struct _Reldep { 28*f491972cSAugustin Cavalier Id name; /* "package" */ 29*f491972cSAugustin Cavalier Id evr; /* "0:42-3" */ 30*f491972cSAugustin Cavalier int flags; /* operation/relation, see REL_x in pool.h */ 31*f491972cSAugustin Cavalier } Reldep; 32*f491972cSAugustin Cavalier 33*f491972cSAugustin Cavalier extern Id pool_str2id(Pool *pool, const char *, int); 34*f491972cSAugustin Cavalier extern Id pool_strn2id(Pool *pool, const char *, unsigned int, int); 35*f491972cSAugustin Cavalier extern Id pool_rel2id(Pool *pool, Id, Id, int, int); 36*f491972cSAugustin Cavalier extern const char *pool_id2str(const Pool *pool, Id); 37*f491972cSAugustin Cavalier extern const char *pool_id2rel(const Pool *pool, Id); 38*f491972cSAugustin Cavalier extern const char *pool_id2evr(const Pool *pool, Id); 39*f491972cSAugustin Cavalier extern const char *pool_dep2str(Pool *pool, Id); /* might alloc tmpspace */ 40*f491972cSAugustin Cavalier 41*f491972cSAugustin Cavalier extern void pool_shrink_strings(Pool *pool); 42*f491972cSAugustin Cavalier extern void pool_shrink_rels(Pool *pool); 43*f491972cSAugustin Cavalier extern void pool_freeidhashes(Pool *pool); 44*f491972cSAugustin Cavalier 45*f491972cSAugustin Cavalier #ifdef __cplusplus 46*f491972cSAugustin Cavalier } 47*f491972cSAugustin Cavalier #endif 48*f491972cSAugustin Cavalier 49*f491972cSAugustin Cavalier #endif /* LIBSOLV_POOLID_H */ 50