summaryrefslogtreecommitdiff
path: root/src/repodata.h
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2009-09-22 18:49:30 +0200
committerMichael Schroeder <mls@suse.de>2009-09-22 18:49:30 +0200
commit2809498f0ceebc98709443afcbfdd799d5bb35b1 (patch)
tree40455aefe0d90f640456fed149545a9099e349e9 /src/repodata.h
parenta415136ab9806fd4bb83743ba974c6288b3a1a1a (diff)
downloadlibsolv-2809498f0ceebc98709443afcbfdd799d5bb35b1.tar.gz
libsolv-2809498f0ceebc98709443afcbfdd799d5bb35b1.tar.bz2
libsolv-2809498f0ceebc98709443afcbfdd799d5bb35b1.zip
- get missing translations from other solvables
- fix solvable_lookup_str_poollang bug - add support for REPOKEY_TYPE_BINARY - do not add provides when extending susetags solvables - fix susetags language handling in demo application
Diffstat (limited to 'src/repodata.h')
-rw-r--r--src/repodata.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/repodata.h b/src/repodata.h
index a7c5920..1f9fa6e 100644
--- a/src/repodata.h
+++ b/src/repodata.h
@@ -155,6 +155,19 @@ repodata_precheck_keyname(Repodata *data, Id keyname)
return x && (x & (1 << (keyname & 7))) ? 1 : 0;
}
+/* check if the repodata contains data for the specified keyname */
+static inline int
+repodata_has_keyname(Repodata *data, Id keyname)
+{
+ int i;
+ if (!repodata_precheck_keyname(data, keyname))
+ return 0;
+ for (i = 1; i < data->nkeys; i++)
+ if (data->keys[i].name == keyname)
+ return 1;
+ return 0;
+}
+
/* search key <keyname> (all keys, if keyname == 0) for Id <solvid>
* Call <callback> for each match */
void repodata_search(Repodata *data, Id solvid, Id keyname, int flags, int (*callback)(void *cbdata, Solvable *s, Repodata *data, Repokey *key, struct _KeyValue *kv), void *cbdata);
@@ -200,6 +213,7 @@ void repodata_set_void(Repodata *data, Id solvid, Id keyname);
void repodata_set_num(Repodata *data, Id solvid, Id keyname, unsigned int num);
void repodata_set_id(Repodata *data, Id solvid, Id keyname, Id id);
void repodata_set_str(Repodata *data, Id solvid, Id keyname, const char *str);
+void repodata_set_binary(Repodata *data, Id solvid, Id keyname, void *buf, int len);
/* create id from string, then set_id */
void repodata_set_poolstr(Repodata *data, Id solvid, Id keyname, const char *str);