build: remove output shaving support
[project/opkg-lede.git] / libopkg / release.h
1 /* release.h - the opkg package management system
2
3 Copyright (C) 2010,2011 Javier Palacios
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2, or (at
8 your option) any later version.
9
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14 */
15
16 #ifndef RELEASE_H
17 #define RELEASE_H
18
19 #include <stdio.h>
20 #include "pkg.h"
21 #include "cksum_list.h"
22
23 struct release
24 {
25 char *name;
26 char *datestring;
27 char **architectures;
28 unsigned int architectures_count;
29 char **components;
30 unsigned int components_count;
31 cksum_list_t *md5sums;
32 #ifdef HAVE_SHA256
33 cksum_list_t *sha256sums;
34 #endif
35 char **complist;
36 unsigned int complist_count;
37 };
38
39 typedef struct release release_t;
40
41 release_t *release_new(void);
42 void release_deinit(release_t *release);
43 int release_init_from_file(release_t *release, const char *filename);
44
45 int release_arch_supported(release_t *release);
46 int release_comps_supported(release_t *release, const char *complist);
47 int release_download(release_t *release, pkg_src_t *dist, char *lists_dir, char *tmpdir);
48
49 const char **release_comps(release_t *release, unsigned int *count);
50
51 int release_verify_file(release_t *release, const char *filename, const char *pathname);
52
53 #endif