Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 76 lines (61 sloc) 2.528 kB
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
1 /*
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
2 * Copyright (c) 2007-2012, Novell Inc.
1312779 @mlschroe - add a license
mlschroe authored
3 *
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
6 */
7
8 /*
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
9 * solvable.h
10 *
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
11 * A solvable represents an object with name-epoch:version-release.arch
12 * and dependencies
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
13 */
14
4cd5d62 @mlschroe rename satsolver -> libsolv
mlschroe authored
15 #ifndef LIBSOLV_SOLVABLE_H
16 #define LIBSOLV_SOLVABLE_H
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
17
18 #include "pooltypes.h"
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
19 #include "queue.h"
cdd0e99 @mlschroe - changed repo interface a bit, now alloc/free handle repo pointer and
mlschroe authored
20
21 struct _Repo;
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
22
23 typedef struct _Solvable {
24 Id name;
25 Id arch;
128a5e3 @mlschroe - first step in getting rid of dependency pointers:
mlschroe authored
26 Id evr; /* epoch:version-release */
555a08b @mlschroe - add vendor id to solvables
mlschroe authored
27 Id vendor;
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
28
cdd0e99 @mlschroe - changed repo interface a bit, now alloc/free handle repo pointer and
mlschroe authored
29 struct _Repo *repo; /* repo we belong to */
128a5e3 @mlschroe - first step in getting rid of dependency pointers:
mlschroe authored
30
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
31 /* dependencies are offsets into repo->idarraydata */
32 Offset provides; /* terminated with Id 0 */
cb48480 @mlschroe - switch dependencies from Id pointers to Offsets
mlschroe authored
33 Offset obsoletes;
34 Offset conflicts;
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
35
cb48480 @mlschroe - switch dependencies from Id pointers to Offsets
mlschroe authored
36 Offset requires;
37 Offset recommends;
38 Offset suggests;
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
39
cb48480 @mlschroe - switch dependencies from Id pointers to Offsets
mlschroe authored
40 Offset supplements;
41 Offset enhances;
8f8a9ed @kkaempf current state of 'sat-solver'
kkaempf authored
42
43 } Solvable;
44
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
45 /* lookup functions */
46 Id solvable_lookup_type(Solvable *s, Id keyname);
47 Id solvable_lookup_id(Solvable *s, Id keyname);
c36ef29 @mlschroe - incompatible ABI change: switch num over to unsigned long long and …
mlschroe authored
48 unsigned long long solvable_lookup_num(Solvable *s, Id keyname, unsigned long long notfound);
49 unsigned int solvable_lookup_sizek(Solvable *s, Id keyname, unsigned int notfound);
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
50 const char *solvable_lookup_str(Solvable *s, Id keyname);
51 const char *solvable_lookup_str_poollang(Solvable *s, Id keyname);
52 const char *solvable_lookup_str_lang(Solvable *s, Id keyname, const char *lang, int usebase);
53 int solvable_lookup_bool(Solvable *s, Id keyname);
54 int solvable_lookup_void(Solvable *s, Id keyname);
55 char *solvable_get_location(Solvable *s, unsigned int *medianrp);
56 const unsigned char *solvable_lookup_bin_checksum(Solvable *s, Id keyname, Id *typep);
57 const char *solvable_lookup_checksum(Solvable *s, Id keyname, Id *typep);
58 int solvable_lookup_idarray(Solvable *s, Id keyname, Queue *q);
59 int solvable_lookup_deparray(Solvable *s, Id keyname, Queue *q, Id marker);
60
61 /* setter functions */
62 void solvable_set_id(Solvable *s, Id keyname, Id id);
c36ef29 @mlschroe - incompatible ABI change: switch num over to unsigned long long and …
mlschroe authored
63 void solvable_set_num(Solvable *s, Id keyname, unsigned long long num);
2b3c874 @mlschroe - add solvable_ setter functions, add solvable_lookup_type/solvable_l…
mlschroe authored
64 void solvable_set_str(Solvable *s, Id keyname, const char *str);
65 void solvable_set_poolstr(Solvable *s, Id keyname, const char *str);
66 void solvable_add_poolstr_array(Solvable *s, Id keyname, const char *str);
67 void solvable_add_idarray(Solvable *s, Id keyname, Id id);
68 void solvable_add_deparray(Solvable *s, Id keyname, Id dep, Id marker);
69 void solvable_set_idarray(Solvable *s, Id keyname, Queue *q);
70 void solvable_set_deparray(Solvable *s, Id keyname, Queue *q, Id marker);
71
72 int solvable_identical(Solvable *s1, Solvable *s2);
73 Id solvable_selfprovidedep(Solvable *s);
74
4cd5d62 @mlschroe rename satsolver -> libsolv
mlschroe authored
75 #endif /* LIBSOLV_SOLVABLE_H */
Something went wrong with that request. Please try again.