add changes, bump version
[platform/upstream/libsolv.git] / src / linkedpkg.h
1 /*
2  * Copyright (c) 2013, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 /*
9  * linkedpkg.h (internal)
10  */
11
12 #ifndef LIBSOLV_LINKEDPKG_H
13 #define LIBSOLV_LINKEDPKG_H
14
15 static inline int
16 has_package_link(Pool *pool, Solvable *s)
17 {
18   const char *name = pool_id2str(pool, s->name);
19   if (name[0] == 'a' && !strncmp("application:", name, 12))
20     return 1;
21   if (name[0] == 'p' && !strncmp("pattern:", name, 7))
22     return 1;
23   if (name[0] == 'p' && !strncmp("product:", name, 8))
24     return 1;
25   return 0;
26 }
27
28 extern void find_application_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Queue *qp);
29 extern void find_product_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Queue *qp);
30 extern void find_pattern_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Queue *qp);
31
32 extern Id find_autopattern_name(Pool *pool, Solvable *s);
33 extern Id find_autoproduct_name(Pool *pool, Solvable *s);
34
35 /* generic */
36 extern void find_package_link(Pool *pool, Solvable *s, Id *reqidp, Queue *qr, Id *prvidp, Queue *qp);
37
38 #endif