Subversion Repositories Kolibri OS

Rev

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
{
5809 serge 11
    list_t packages;
5728 serge 12
    char   *issue;
13
}collection_t;
14
 
15
typedef struct package
16
{
17
    list_t list;
18
    list_t file_list;
19
    int    id;
20
    char   *name;
21
    char   *version;
5809 serge 22
    char   *group;
5728 serge 23
    char   *filename;
24
    char   *description;
25
}package_t;
26
 
27
static inline void list_del_pkg(package_t *pkg)
28
{
29
    list_del(&pkg->list);
30
    free(pkg->description);
31
    free(pkg->filename);
5809 serge 32
    free(pkg->group);
5728 serge 33
    free(pkg->version);
34
    free(pkg->name);
35
    free(pkg);
36
};
37
 
38
collection_t* load_collection_file(const char *name);
39
collection_t* load_collection_buffer(const char *buffer);
40
 
5809 serge 41
int copy_list(list_t *list, list_t *src);
42
 
5737 serge 43
int build_server_list(list_t *slist, const char *path);
5728 serge 44
int build_download_list(list_t *download, list_t *src);
5729 serge 45
void remove_missing_packages(list_t *install, list_t *missed);
5728 serge 46
char *make_cache_path(const char *path);
5737 serge 47
void print_pkg_list(list_t *list);
5728 serge 48
 
49
void do_download(list_t *download);
5729 serge 50
void do_install(list_t *install);
5728 serge 51
 
5809 serge 52
extern char conbuf[256];
53
 
5728 serge 54
#ifdef __cplusplus
55
}
56
#endif
57
 
58
#endif /* __PACKAGE_H__ */
59