diff options
author | Michael Schroeder <mls@suse.de> | 2012-10-25 16:55:11 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-10-25 16:55:11 +0200 |
commit | 264d9fbb06f811ebb3ca9a8de1732715697cfead (patch) | |
tree | bd27a36d3ff57f31514b195d6273b2f6e80f55d6 /src/selection.h | |
parent | 9db24cdc0b107e48f4bd9d66f2f0687fcf397480 (diff) | |
download | libsolv-264d9fbb06f811ebb3ca9a8de1732715697cfead.tar.gz libsolv-264d9fbb06f811ebb3ca9a8de1732715697cfead.tar.bz2 libsolv-264d9fbb06f811ebb3ca9a8de1732715697cfead.zip |
generalize matching code from examples/solv.c to src/selection.c
Adapt the examples to use the new mechanism. This is probably
not the final version of the interface, so handle with care.
Diffstat (limited to 'src/selection.h')
-rw-r--r-- | src/selection.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/selection.h b/src/selection.h new file mode 100644 index 0000000..62eb37d --- /dev/null +++ b/src/selection.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2007, Novell Inc. + * + * This program is licensed under the BSD license, read LICENSE.BSD + * for further information + */ + +/* + * selection.h + * + */ + +#ifndef LIBSOLV_SELECTION_H +#define LIBSOLV_SELECTION_H + +#include "pool.h" + +#define SELECTION_NAME (1 << 0) +#define SELECTION_PROVIDES (1 << 1) +#define SELECTION_FILELIST (1 << 2) + +#define SELECTION_INSTALLED_ONLY (1 << 8) +#define SELECTION_GLOB (1 << 9) +#define SELECTION_FLAT (1 << 10) +#define SELECTION_NOCASE (1 << 11) + +extern int selection_make(Pool *pool, Queue *selection, const char *name, int flags); +extern void selection_limit(Pool *pool, Queue *sel1, Queue *sel2); +extern void selection_add(Pool *pool, Queue *sel1, Queue *sel2); + +#endif |