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