Imported Upstream version 0.6.33
[platform/upstream/libsolv.git] / src / dataiterator.h
index cf10fd9..3133686 100644 (file)
@@ -7,7 +7,7 @@
 
 /*
  * dataiterator.h
- * 
+ *
  */
 
 #ifndef LIBSOLV_DATAITERATOR_H
 #include "pooltypes.h"
 #include "pool.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct _Repo;
 
 typedef struct _KeyValue {
@@ -74,16 +78,17 @@ typedef struct _Datamatcher {
 int  datamatcher_init(Datamatcher *ma, const char *match, int flags);
 void datamatcher_free(Datamatcher *ma);
 int  datamatcher_match(Datamatcher *ma, const char *str);
+int  datamatcher_checkbasename(Datamatcher *ma, const char *str);
 
 
 /*
  * Dataiterator
- * 
+ *
  * Iterator like interface to 'search' functionality
- * 
+ *
  * Dataiterator is per-pool, additional filters can be applied
  * to limit the search domain. See dataiterator_init below.
- * 
+ *
  * Use these like:
  *    Dataiterator di;
  *    dataiterator_init(&di, repo->pool, repo, 0, 0, "bla", SEARCH_SUBSTRING);
@@ -131,12 +136,22 @@ typedef struct _Dataiterator
   } parents[3];
   int nparents;
 
+  /* vertical data */
+  unsigned char *vert_ddp;
+  Id vert_off;
+  Id vert_len;
+  Id vert_storestate;
+
+  /* strdup data */
+  char *dupstr;
+  int dupstrn;
+
 } Dataiterator;
 
 
 /*
  * Initialize dataiterator
- * 
+ *
  * di:      Pointer to Dataiterator to be initialized
  * pool:    Search domain for the iterator
  * repo:    if non-null, limit search to this repo
@@ -164,10 +179,15 @@ void dataiterator_jump_to_repo(Dataiterator *di, struct _Repo *repo);
 void dataiterator_entersub(Dataiterator *di);
 void dataiterator_clonepos(Dataiterator *di, Dataiterator *from);
 void dataiterator_seek(Dataiterator *di, int whence);
+void dataiterator_strdup(Dataiterator *di);
 
 #define DI_SEEK_STAY    (1 << 16)
 #define DI_SEEK_CHILD   1
 #define DI_SEEK_PARENT  2
 #define DI_SEEK_REWIND  3
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* LIBSOLV_DATAITERATOR_H */