summaryrefslogtreecommitdiff
path: root/razor.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-01-03 19:50:20 -0500
committerKristian Høgsberg <krh@redhat.com>2008-01-03 19:50:20 -0500
commit9041a68272ff0dcac56aad8e44df8e6d1362da15 (patch)
tree557f5bc3fc2796f2c8857a4361e332d17bb50fba /razor.h
parent7c3e2d5eebcb584efe1b7cb22daf8c7b8c57e8d4 (diff)
Add iterator API, boot-strap test suite.
Diffstat (limited to 'razor.h')
-rw-r--r--razor.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/razor.h b/razor.h
index 0f7083d..b400711 100644
--- a/razor.h
+++ b/razor.h
@@ -4,6 +4,8 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
struct razor_set;
+struct razor_package;
+struct razor_property;
enum razor_property_type {
RAZOR_PROPERTY_REQUIRES,
@@ -17,7 +19,33 @@ struct razor_set *razor_set_open(const char *filename);
void razor_set_destroy(struct razor_set *set);
int razor_set_write(struct razor_set *set, const char *filename);
-void razor_set_list(struct razor_set *set, const char *pattern);
+struct razor_package *
+razor_set_get_package(struct razor_set *set, const char *package);
+
+struct razor_property *
+razor_set_get_property(struct razor_set *set, const char *property);
+
+struct razor_package_iterator;
+struct razor_package_iterator *
+razor_package_iterator_create(struct razor_set *set);
+
+int razor_package_iterator_next(struct razor_package_iterator *pi,
+ struct razor_package **package,
+ const char **name, const char **version);
+void razor_package_iterator_destroy(struct razor_package_iterator *pi);
+
+struct razor_property_iterator;
+struct razor_property_iterator *
+razor_property_iterator_create(struct razor_set *set,
+ struct razor_package *package);
+int razor_property_iterator_next(struct razor_property_iterator *pi,
+ struct razor_property **property,
+ const char **name, const char **version,
+ enum razor_property_type *type);
+void
+razor_property_iterator_destroy(struct razor_property_iterator *pi);
+
+
void razor_set_list_properties(struct razor_set *set, const char *name,
enum razor_property_type type);
void razor_set_list_property_packages(struct razor_set *set,