summaryrefslogtreecommitdiff
path: root/src/poolid.h
blob: f832ff4b3002a17b37e01acc8c6346b299799257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (c) 2007, Novell Inc.
 *
 * This program is licensed under the BSD license, read LICENSE.BSD
 * for further information
 */

/*
 * poolid.h
 *
 */

#ifndef LIBSOLV_POOLID_H
#define LIBSOLV_POOLID_H

#include "pooltypes.h"
#include "hash.h"

#ifdef __cplusplus
extern "C" {
#endif

/*-----------------------------------------------
 * Ids with relation
 */

typedef struct s_Reldep {
  Id name;		/* "package" */
  Id evr;		/* "0:42-3" */
  int flags;		/* operation/relation, see REL_x in pool.h */
} Reldep;

extern Id pool_str2id(Pool *pool, const char *, int);
extern Id pool_strn2id(Pool *pool, const char *, unsigned int, int);
extern Id pool_rel2id(Pool *pool, Id, Id, int, int);
extern const char *pool_id2str(const Pool *pool, Id);
extern const char *pool_id2rel(const Pool *pool, Id);
extern const char *pool_id2evr(const Pool *pool, Id);
extern const char *pool_dep2str(Pool *pool, Id); /* might alloc tmpspace */

extern void pool_shrink_strings(Pool *pool);
extern void pool_shrink_rels(Pool *pool);
extern void pool_freeidhashes(Pool *pool);
extern void pool_resize_rels_hash(Pool *pool, int numnew);

#ifdef __cplusplus
}
#endif

#endif /* LIBSOLV_POOLID_H */