X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flp.h;h=9940b919e5441e73a59c1f8b9de50498ba8a5fe4;hb=b59ec44bffce28192c6408fed838c4d593a17c82;hp=95415c60438e6717805b2de5ad0798f06b4163a7;hpb=f2b0384f6231324f53e78aa458b9a46b0e659c43;p=ppastats.git diff --git a/src/lp.h b/src/lp.h index 95415c6..9940b91 100644 --- a/src/lp.h +++ b/src/lp.h @@ -1,28 +1,27 @@ /* - Copyright (C) 2011 jeanfi@gmail.com - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301 USA -*/ + * Copyright (C) 2011-2014 jeanfi@gmail.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ #ifndef _PPASTATS_LP_H_ #define _PPASTATS_LP_H_ #define URL_BASE_LP "https://api.launchpad.net/1.0" -#define _XOPEN_SOURCE #include struct daily_download_total { @@ -31,11 +30,16 @@ struct daily_download_total { struct tm date; }; -struct binary_package_publishing_history { +/* (b)inary (p)ackage (p)ublishing (h)istory */ +struct bpph { char *binary_package_name; char *binary_package_version; char *distro_arch_series_link; char *self_link; + char *status; + int architecture_specific; + + time_t date_created; }; struct distro_arch_series { @@ -71,22 +75,22 @@ distro_arch_series_new(const char *display_name, void distro_arch_series_free(struct distro_arch_series *); -void -binary_package_publishing_history_free -(struct binary_package_publishing_history *b); +void bpph_free(struct bpph *b); -struct binary_package_publishing_history * -binary_package_publishing_history_new(const char *binary_package_name, - const char *binary_package_version, - const char *distro_arch_series_link, - const char *self_link); +struct bpph *bpph_new(const char *binary_package_name, + const char *binary_package_version, + const char *distro_arch_series_link, + const char *self_link, + const char *status, + int architecture_specific, + time_t date_created); -void binary_package_publishing_history_list_free -(struct binary_package_publishing_history **list); +void bpph_list_free(struct bpph **list); +struct bpph **bpph_list_append_list(struct bpph **list1, struct bpph **list2); char *get_archive_url(const char *owner, const char *ppa); -int list_length(void **list); +char *time_to_str(time_t t); #endif