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
51
52
53
54
55
56
57
58
|
/*
* Copyright (c) 2007-2009, Novell Inc.
*
* This program is licensed under the BSD license, read LICENSE.BSD
* for further information
*/
/*
* problems.h
*
*/
#ifndef LIBSOLV_PROBLEMS_H
#define LIBSOLV_PROBLEMS_H
#include "rules.h"
#ifdef __cplusplus
extern "C" {
#endif
struct _Solver;
#define SOLVER_SOLUTION_JOB (0)
#define SOLVER_SOLUTION_DISTUPGRADE (-1)
#define SOLVER_SOLUTION_INFARCH (-2)
#define SOLVER_SOLUTION_BEST (-3)
#define SOLVER_SOLUTION_POOLJOB (-4)
void solver_disableproblem(struct _Solver *solv, Id v);
void solver_enableproblem(struct _Solver *solv, Id v);
int solver_prepare_solutions(struct _Solver *solv);
unsigned int solver_problem_count(struct _Solver *solv);
Id solver_next_problem(struct _Solver *solv, Id problem);
unsigned int solver_solution_count(struct _Solver *solv, Id problem);
Id solver_next_solution(struct _Solver *solv, Id problem, Id solution);
unsigned int solver_solutionelement_count(struct _Solver *solv, Id problem, Id solution);
Id solver_solutionelement_internalid(struct _Solver *solv, Id problem, Id solution);
Id solver_solutionelement_extrajobflags(struct _Solver *solv, Id problem, Id solution);
Id solver_next_solutionelement(struct _Solver *solv, Id problem, Id solution, Id element, Id *p, Id *rp);
void solver_take_solutionelement(struct _Solver *solv, Id p, Id rp, Id extrajobflags, Queue *job);
void solver_take_solution(struct _Solver *solv, Id problem, Id solution, Queue *job);
Id solver_findproblemrule(struct _Solver *solv, Id problem);
void solver_findallproblemrules(struct _Solver *solv, Id problem, Queue *rules);
extern const char *solver_problemruleinfo2str(struct _Solver *solv, SolverRuleinfo type, Id source, Id target, Id dep);
extern const char *solver_problem2str(struct _Solver *solv, Id problem);
extern const char *solver_solutionelement2str(struct _Solver *solv, Id p, Id rp);
#ifdef __cplusplus
}
#endif
#endif
|