problems.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2007-2009, Novell Inc.
  3. *
  4. * This program is licensed under the BSD license, read LICENSE.BSD
  5. * for further information
  6. */
  7. /*
  8. * problems.h
  9. *
  10. */
  11. #ifndef LIBSOLV_PROBLEMS_H
  12. #define LIBSOLV_PROBLEMS_H
  13. #include "rules.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. struct s_Solver;
  18. #define SOLVER_SOLUTION_JOB (0)
  19. #define SOLVER_SOLUTION_DISTUPGRADE (-1)
  20. #define SOLVER_SOLUTION_INFARCH (-2)
  21. #define SOLVER_SOLUTION_BEST (-3)
  22. #define SOLVER_SOLUTION_POOLJOB (-4)
  23. #define SOLVER_SOLUTION_BLACK (-5)
  24. #define SOLVER_SOLUTION_STRICTREPOPRIORITY (-6)
  25. void solver_recordproblem(struct s_Solver *solv, Id rid);
  26. void solver_fixproblem(struct s_Solver *solv, Id rid);
  27. Id solver_autouninstall(struct s_Solver *solv, int start);
  28. void solver_disableproblemset(struct s_Solver *solv, int start);
  29. int solver_prepare_solutions(struct s_Solver *solv);
  30. unsigned int solver_problem_count(struct s_Solver *solv);
  31. Id solver_next_problem(struct s_Solver *solv, Id problem);
  32. unsigned int solver_solution_count(struct s_Solver *solv, Id problem);
  33. Id solver_next_solution(struct s_Solver *solv, Id problem, Id solution);
  34. unsigned int solver_solutionelement_count(struct s_Solver *solv, Id problem, Id solution);
  35. Id solver_solutionelement_internalid(struct s_Solver *solv, Id problem, Id solution);
  36. Id solver_solutionelement_extrajobflags(struct s_Solver *solv, Id problem, Id solution);
  37. Id solver_next_solutionelement(struct s_Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp);
  38. void solver_take_solutionelement(struct s_Solver *solv, Id p, Id rp, Id extrajobflags, Queue *job);
  39. void solver_take_solution(struct s_Solver *solv, Id problem, Id solution, Queue *job);
  40. Id solver_findproblemrule(struct s_Solver *solv, Id problem);
  41. void solver_findallproblemrules(struct s_Solver *solv, Id problem, Queue *rules);
  42. extern const char *solver_problemruleinfo2str(struct s_Solver *solv, SolverRuleinfo type, Id source, Id target, Id dep);
  43. extern const char *solver_problem2str(struct s_Solver *solv, Id problem);
  44. extern const char *solver_solutionelement2str(struct s_Solver *solv, Id p, Id rp);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif