2 * Copyright (c) 2007-2009, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
13 #ifndef LIBSOLV_PROBLEMS_H
14 #define LIBSOLV_PROBLEMS_H
25 #define SOLVER_SOLUTION_JOB (0)
26 #define SOLVER_SOLUTION_DISTUPGRADE (-1)
27 #define SOLVER_SOLUTION_INFARCH (-2)
28 #define SOLVER_SOLUTION_BEST (-3)
29 #define SOLVER_SOLUTION_POOLJOB (-4)
30 #define SOLVER_SOLUTION_BLACK (-5)
31 #define SOLVER_SOLUTION_STRICTREPOPRIORITY (-6)
33 void solver_recordproblem(struct s_Solver *solv, Id rid);
34 void solver_fixproblem(struct s_Solver *solv, Id rid);
35 Id solver_autouninstall(struct s_Solver *solv, int start);
36 void solver_disableproblemset(struct s_Solver *solv, int start);
38 int solver_prepare_solutions(struct s_Solver *solv);
40 unsigned int solver_problem_count(struct s_Solver *solv);
41 Id solver_next_problem(struct s_Solver *solv, Id problem);
42 unsigned int solver_solution_count(struct s_Solver *solv, Id problem);
43 Id solver_next_solution(struct s_Solver *solv, Id problem, Id solution);
44 unsigned int solver_solutionelement_count(struct s_Solver *solv, Id problem, Id solution);
45 Id solver_solutionelement_internalid(struct s_Solver *solv, Id problem, Id solution);
46 Id solver_solutionelement_extrajobflags(struct s_Solver *solv, Id problem, Id solution);
47 Id solver_next_solutionelement(struct s_Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp);
49 void solver_take_solutionelement(struct s_Solver *solv, Id p, Id rp, Id extrajobflags, Queue *job);
50 void solver_take_solution(struct s_Solver *solv, Id problem, Id solution, Queue *job);
52 Id solver_findproblemrule(struct s_Solver *solv, Id problem);
53 void solver_findallproblemrules(struct s_Solver *solv, Id problem, Queue *rules);
55 extern const char *solver_problemruleinfo2str(struct s_Solver *solv, SolverRuleinfo type, Id source, Id target, Id dep);
56 extern const char *solver_problem2str(struct s_Solver *solv, Id problem);
57 extern const char *solver_solutionelement2str(struct s_Solver *solv, Id p, Id rp);