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)
31 void solver_disableproblem(struct _Solver *solv, Id v);
32 void solver_enableproblem(struct _Solver *solv, Id v);
33 int solver_prepare_solutions(struct _Solver *solv);
35 unsigned int solver_problem_count(struct _Solver *solv);
36 Id solver_next_problem(struct _Solver *solv, Id problem);
37 unsigned int solver_solution_count(struct _Solver *solv, Id problem);
38 Id solver_next_solution(struct _Solver *solv, Id problem, Id solution);
39 unsigned int solver_solutionelement_count(struct _Solver *solv, Id problem, Id solution);
40 Id solver_solutionelement_internalid(struct _Solver *solv, Id problem, Id solution);
41 Id solver_solutionelement_extrajobflags(struct _Solver *solv, Id problem, Id solution);
42 Id solver_next_solutionelement(struct _Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp);
44 void solver_take_solutionelement(struct _Solver *solv, Id p, Id rp, Id extrajobflags, Queue *job);
45 void solver_take_solution(struct _Solver *solv, Id problem, Id solution, Queue *job);
47 Id solver_findproblemrule(struct _Solver *solv, Id problem);
48 void solver_findallproblemrules(struct _Solver *solv, Id problem, Queue *rules);
50 extern const char *solver_problemruleinfo2str(struct _Solver *solv, SolverRuleinfo type, Id source, Id target, Id dep);
51 extern const char *solver_problem2str(struct _Solver *solv, Id problem);
52 extern const char *solver_solutionelement2str(struct _Solver *solv, Id p, Id rp);