diff options
author | Michael Schroeder <mls@suse.de> | 2012-01-17 12:04:27 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-01-17 12:04:27 +0100 |
commit | 2b3c874e5f79881a8c5e97be38d67d18e998d0c9 (patch) | |
tree | 3890fe15b547f9caf71e35d05d58a7bcf0173ebc /src/solvable.h | |
parent | 370badc5cfbd583854222639170b5d0a743b172d (diff) | |
download | libsolv-2b3c874e5f79881a8c5e97be38d67d18e998d0c9.tar.gz libsolv-2b3c874e5f79881a8c5e97be38d67d18e998d0c9.tar.bz2 libsolv-2b3c874e5f79881a8c5e97be38d67d18e998d0c9.zip |
- add solvable_ setter functions, add solvable_lookup_type/solvable_lookup_deparray
Diffstat (limited to 'src/solvable.h')
-rw-r--r-- | src/solvable.h | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/src/solvable.h b/src/solvable.h index 583f345..7ecc6cf 100644 --- a/src/solvable.h +++ b/src/solvable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Novell Inc. + * Copyright (c) 2007-2012, Novell Inc. * * This program is licensed under the BSD license, read LICENSE.BSD * for further information @@ -8,13 +8,15 @@ /* * solvable.h * - * A solvable represents an object with name-epoch:version-release.arch and dependencies + * A solvable represents an object with name-epoch:version-release.arch + * and dependencies */ #ifndef LIBSOLV_SOLVABLE_H #define LIBSOLV_SOLVABLE_H #include "pooltypes.h" +#include "queue.h" struct _Repo; @@ -26,8 +28,8 @@ typedef struct _Solvable { struct _Repo *repo; /* repo we belong to */ - /* dependencies are offsets into idarray of repo */ - Offset provides; /* terminated with Id 0 */ + /* dependencies are offsets into repo->idarraydata */ + Offset provides; /* terminated with Id 0 */ Offset obsoletes; Offset conflicts; @@ -40,4 +42,33 @@ typedef struct _Solvable { } Solvable; +/* lookup functions */ +Id solvable_lookup_type(Solvable *s, Id keyname); +Id solvable_lookup_id(Solvable *s, Id keyname); +unsigned int solvable_lookup_num(Solvable *s, Id keyname, unsigned int notfound); +const char *solvable_lookup_str(Solvable *s, Id keyname); +const char *solvable_lookup_str_poollang(Solvable *s, Id keyname); +const char *solvable_lookup_str_lang(Solvable *s, Id keyname, const char *lang, int usebase); +int solvable_lookup_bool(Solvable *s, Id keyname); +int solvable_lookup_void(Solvable *s, Id keyname); +char *solvable_get_location(Solvable *s, unsigned int *medianrp); +const unsigned char *solvable_lookup_bin_checksum(Solvable *s, Id keyname, Id *typep); +const char *solvable_lookup_checksum(Solvable *s, Id keyname, Id *typep); +int solvable_lookup_idarray(Solvable *s, Id keyname, Queue *q); +int solvable_lookup_deparray(Solvable *s, Id keyname, Queue *q, Id marker); + +/* setter functions */ +void solvable_set_id(Solvable *s, Id keyname, Id id); +void solvable_set_num(Solvable *s, Id keyname, unsigned int num); +void solvable_set_str(Solvable *s, Id keyname, const char *str); +void solvable_set_poolstr(Solvable *s, Id keyname, const char *str); +void solvable_add_poolstr_array(Solvable *s, Id keyname, const char *str); +void solvable_add_idarray(Solvable *s, Id keyname, Id id); +void solvable_add_deparray(Solvable *s, Id keyname, Id dep, Id marker); +void solvable_set_idarray(Solvable *s, Id keyname, Queue *q); +void solvable_set_deparray(Solvable *s, Id keyname, Queue *q, Id marker); + +int solvable_identical(Solvable *s1, Solvable *s2); +Id solvable_selfprovidedep(Solvable *s); + #endif /* LIBSOLV_SOLVABLE_H */ |