improve appdata.xml parsing
[platform/upstream/libsolv.git] / src / repodata.h
index 54fb3df..f38ed4a 100644 (file)
@@ -7,13 +7,13 @@
 
 /*
  * repodata.h
- * 
+ *
  */
 
 #ifndef LIBSOLV_REPODATA_H
 #define LIBSOLV_REPODATA_H
 
-#include <stdio.h> 
+#include <stdio.h>
 
 #include "pooltypes.h"
 #include "pool.h"
 #include "repopage.h"
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define SIZEOF_MD5     16
 #define SIZEOF_SHA1    20
 #define SIZEOF_SHA256  32
@@ -206,6 +210,7 @@ int repodata_lookup_num(Repodata *data, Id solvid, Id keyname, unsigned long lon
 int repodata_lookup_void(Repodata *data, Id solvid, Id keyname);
 const unsigned char *repodata_lookup_bin_checksum(Repodata *data, Id solvid, Id keyname, Id *typep);
 int repodata_lookup_idarray(Repodata *data, Id solvid, Id keyname, Queue *q);
+const void *repodata_lookup_binary(Repodata *data, Id solvid, Id keyname, int *lenp);
 
 
 /*-----
@@ -266,7 +271,7 @@ void repodata_add_flexarray(Repodata *data, Id solvid, Id keyname, Id ghandle);
 void repodata_unset(Repodata *data, Id solvid, Id keyname);
 void repodata_unset_uninternalized(Repodata *data, Id solvid, Id keyname);
 
-/* 
+/*
  merge/swap attributes from one solvable to another
  works only if the data is not yet internalized
 */
@@ -274,8 +279,7 @@ void repodata_merge_attrs(Repodata *data, Id dest, Id src);
 void repodata_merge_some_attrs(Repodata *data, Id dest, Id src, Map *keyidmap, int overwrite);
 void repodata_swap_attrs(Repodata *data, Id dest, Id src);
 
-void repodata_create_stubs(Repodata *data);
-void repodata_join(Repodata *data, Id joinkey);
+Repodata *repodata_create_stubs(Repodata *data);
 
 /*
  * load all paged data, used to speed up copying in repo_rpmdb
@@ -285,6 +289,8 @@ void repodata_disable_paging(Repodata *data);
 /* helper functions */
 Id repodata_globalize_id(Repodata *data, Id id, int create);
 Id repodata_localize_id(Repodata *data, Id id, int create);
+Id repodata_translate_id(Repodata *data, Repodata *fromdata, Id id, int create);
+
 Id repodata_str2dir(Repodata *data, const char *dir, int create);
 const char *repodata_dir2str(Repodata *data, Id did, const char *suf);
 const char *repodata_chk2str(Repodata *data, Id type, const unsigned char *buf);
@@ -296,4 +302,8 @@ Id repodata_lookup_id_uninternalized(Repodata *data, Id solvid, Id keyname, Id v
 /* stats */
 unsigned int repodata_memused(Repodata *data);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBSOLV_REPODATA_H */