0dd61500877504f29cc50b0974801d37a30fa0ed
[platform/upstream/libsolv.git] / src / selection.h
1 /*
2  * Copyright (c) 2012, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 /*
9  * selection.h
10  *
11  */
12
13 #ifndef LIBSOLV_SELECTION_H
14 #define LIBSOLV_SELECTION_H
15
16 #include "pool.h"
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 #define SELECTION_NAME                  (1 << 0)
23 #define SELECTION_PROVIDES              (1 << 1)
24 #define SELECTION_FILELIST              (1 << 2)
25 #define SELECTION_CANON                 (1 << 3)
26 #define SELECTION_DOTARCH               (1 << 4)
27 #define SELECTION_REL                   (1 << 5)
28
29 #define SELECTION_INSTALLED_ONLY        (1 << 8)
30 #define SELECTION_GLOB                  (1 << 9)
31 #define SELECTION_FLAT                  (1 << 10)
32 #define SELECTION_NOCASE                (1 << 11)
33 #define SELECTION_SOURCE_ONLY           (1 << 12)
34 #define SELECTION_WITH_SOURCE           (1 << 13)
35 #define SELECTION_SKIP_KIND             (1 << 14)
36 #define SELECTION_MATCH_DEPSTR          (1 << 15)
37
38 extern int  selection_make(Pool *pool, Queue *selection, const char *name, int flags);
39 extern int  selection_make_matchdeps(Pool *pool, Queue *selection, const char *name, int flags, int keyname, int marker);
40 extern int  selection_make_matchdepid(Pool *pool, Queue *selection, Id dep, int flags, int keyname, int marker);
41
42 extern void selection_filter(Pool *pool, Queue *sel1, Queue *sel2);
43 extern void selection_add(Pool *pool, Queue *sel1, Queue *sel2);
44 extern void selection_solvables(Pool *pool, Queue *selection, Queue *pkgs);
45
46 extern const char *pool_selection2str(Pool *pool, Queue *selection, Id flagmask);
47
48 #ifdef __cplusplus
49 }
50 #endif
51
52 #endif