Subversion Repositories Kolibri OS

Rev

Rev 5737 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  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 packages;
  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;
  22.     char   *group;
  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);
  32.     free(pkg->group);
  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.  
  41. int copy_list(list_t *list, list_t *src);
  42.  
  43. int build_server_list(list_t *slist, const char *path);
  44. int build_download_list(list_t *download, list_t *src);
  45. void remove_missing_packages(list_t *install, list_t *missed);
  46. char *make_cache_path(const char *path);
  47. void print_pkg_list(list_t *list);
  48.  
  49. void do_download(list_t *download);
  50. void do_install(list_t *install);
  51.  
  52. extern char conbuf[256];
  53.  
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57.  
  58. #endif /* __PACKAGE_H__ */
  59.  
  60.