2 * Copyright (C) 2011-2012 jeanfi@gmail.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 #ifndef _PPASTATS_LP_H_
21 #define _PPASTATS_LP_H_
23 #define URL_BASE_LP "https://api.launchpad.net/1.0"
28 struct daily_download_total {
34 /* (b)inary (p)ackage (p)ublishing (h)istory */
36 char *binary_package_name;
37 char *binary_package_version;
38 char *distro_arch_series_link;
40 int architecture_specific;
43 struct distro_arch_series {
46 char *architecture_tag;
47 int is_nominated_arch_indep;
48 char *distroseries_link;
51 struct distro_series {
58 struct distro_series *distro_series_new(const char *name,
61 const char *displayname);
63 void distro_series_free(struct distro_series *distro_series);
65 void daily_download_total_list_free(struct daily_download_total **);
67 struct distro_arch_series *
68 distro_arch_series_new(const char *display_name,
70 const char *architecture_tag,
71 int is_nominated_arch_indep,
72 const char *distroseries_link);
74 void distro_arch_series_free(struct distro_arch_series *);
76 void bpph_free(struct bpph *b);
78 struct bpph *bpph_new(const char *binary_package_name,
79 const char *binary_package_version,
80 const char *distro_arch_series_link,
81 const char *self_link,
82 int architecture_specific);
84 void bpph_list_free(struct bpph **list);
86 char *get_archive_url(const char *owner, const char *ppa);