2 Copyright (C) 2011 jeanfi@gmail.com
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU 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 struct binary_package_publishing_history {
35 char *binary_package_name;
36 char *binary_package_version;
37 char *distro_arch_series_link;
41 struct distro_arch_series {
44 char *architecture_tag;
47 void daily_download_total_list_free(struct daily_download_total **);
49 struct distro_arch_series *distro_arch_series_new(const char *display_name,
51 const char *architecture_tag);
53 void distro_arch_series_free(struct distro_arch_series *);
56 binary_package_publishing_history_free
57 (struct binary_package_publishing_history *b);
59 struct binary_package_publishing_history *
60 binary_package_publishing_history_new(const char *binary_package_name,
61 const char *binary_package_version,
62 const char *distro_arch_series_link,
63 const char *self_link);
65 void binary_package_publishing_history_list_free
66 (struct binary_package_publishing_history **list);
69 char *get_archive_url(const char *owner, const char *ppa);
71 int list_length(void **list);