poolid.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. * poolid.h
  9. *
  10. */
  11. #ifndef LIBSOLV_POOLID_H
  12. #define LIBSOLV_POOLID_H
  13. #include "pooltypes.h"
  14. #include "hash.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /*-----------------------------------------------
  19. * Ids with relation
  20. */
  21. typedef struct s_Reldep {
  22. Id name; /* "package" */
  23. Id evr; /* "0:42-3" */
  24. int flags; /* operation/relation, see REL_x in pool.h */
  25. } Reldep;
  26. extern Id pool_str2id(Pool *pool, const char *, int);
  27. extern Id pool_strn2id(Pool *pool, const char *, unsigned int, int);
  28. extern Id pool_rel2id(Pool *pool, Id, Id, int, int);
  29. extern const char *pool_id2str(const Pool *pool, Id);
  30. extern const char *pool_id2rel(const Pool *pool, Id);
  31. extern const char *pool_id2evr(const Pool *pool, Id);
  32. extern const char *pool_dep2str(Pool *pool, Id); /* might alloc tmpspace */
  33. extern void pool_shrink_strings(Pool *pool);
  34. extern void pool_shrink_rels(Pool *pool);
  35. extern void pool_freeidhashes(Pool *pool);
  36. extern void pool_resize_rels_hash(Pool *pool, int numnew);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* LIBSOLV_POOLID_H */