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;
41 int architecture_specific;
43 struct tm date_created;
46 struct distro_arch_series {
49 char *architecture_tag;
50 int is_nominated_arch_indep;
51 char *distroseries_link;
54 struct distro_series {
61 struct distro_series *distro_series_new(const char *name,
64 const char *displayname);
66 void distro_series_free(struct distro_series *distro_series);
68 void daily_download_total_list_free(struct daily_download_total **);
70 struct distro_arch_series *
71 distro_arch_series_new(const char *display_name,
73 const char *architecture_tag,
74 int is_nominated_arch_indep,
75 const char *distroseries_link);
77 void distro_arch_series_free(struct distro_arch_series *);
79 void bpph_free(struct bpph *b);
81 struct bpph *bpph_new(const char *binary_package_name,
82 const char *binary_package_version,
83 const char *distro_arch_series_link,
84 const char *self_link,
85 int architecture_specific);
87 void bpph_list_free(struct bpph **list);
89 struct bpph **bpph_list_append_list(struct bpph **list1, struct bpph **list2);
91 char *get_archive_url(const char *owner, const char *ppa);