Rev 5728 | Rev 5737 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5728 | serge | 1 | #ifndef __PACKAGE_H__ |
2 | |||
3 | #ifdef __cplusplus |
||
4 | extern "C" { |
||
5 | #endif |
||
6 | |||
7 | #include "list.h" |
||
8 | |||
9 | typedef struct |
||
10 | { |
||
11 | list_t groups; |
||
12 | char *issue; |
||
13 | }collection_t; |
||
14 | |||
15 | typedef struct |
||
16 | { |
||
17 | list_t list; |
||
18 | list_t packages; |
||
19 | char *name; |
||
20 | }pkg_group_t; |
||
21 | |||
22 | typedef struct package |
||
23 | { |
||
24 | list_t list; |
||
25 | list_t file_list; |
||
26 | int id; |
||
27 | char *name; |
||
28 | char *version; |
||
29 | char *filename; |
||
30 | char *description; |
||
31 | }package_t; |
||
32 | |||
33 | static inline void list_del_pkg(package_t *pkg) |
||
34 | { |
||
35 | list_del(&pkg->list); |
||
36 | free(pkg->description); |
||
37 | free(pkg->filename); |
||
38 | free(pkg->version); |
||
39 | free(pkg->name); |
||
40 | free(pkg); |
||
41 | }; |
||
42 | |||
43 | collection_t* load_collection_file(const char *name); |
||
44 | collection_t* load_collection_buffer(const char *buffer); |
||
45 | |||
46 | int build_install_list(list_t *list, collection_t *collection); |
||
47 | int build_download_list(list_t *download, list_t *src); |
||
5729 | serge | 48 | void remove_missing_packages(list_t *install, list_t *missed); |
5728 | serge | 49 | char *make_cache_path(const char *path); |
50 | |||
51 | void do_download(list_t *download); |
||
5729 | serge | 52 | void do_install(list_t *install); |
5728 | serge | 53 | |
54 | #ifdef __cplusplus |
||
55 | } |
||
56 | #endif |
||
57 | |||
58 | #endif /* __PACKAGE_H__ */ |
||
59 |