00001 /* createrepo_c - Library of routines for manipulation with repodata 00002 * Copyright (C) 2012 Tomas Mlcoch 00003 * Copyright (C) 2007 James Bowes 00004 * Copyright (C) 2006 Seth Vidal 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 * USA. 00020 */ 00021 00022 #ifndef __C_CREATEREPOLIB_PACKAGE_H__ 00023 #define __C_CREATEREPOLIB_PACKAGE_H__ 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 #include <glib.h> 00030 00038 typedef struct { 00039 char *name; 00040 char *flags; 00042 char *epoch; 00043 char *version; 00044 char *release; 00045 gboolean pre; 00046 } cr_Dependency; 00047 00050 typedef struct { 00051 char *type; 00052 char *path; 00053 char *name; 00054 } cr_PackageFile; 00055 00058 typedef struct { 00059 char *author; 00060 gint64 date; 00061 char *changelog; 00062 } cr_ChangelogEntry; 00063 00066 typedef struct { 00067 gint64 pkgKey; 00068 char *pkgId; 00069 char *name; 00070 char *arch; 00071 char *version; 00072 char *epoch; 00073 char *release; 00074 char *summary; 00075 char *description; 00076 char *url; 00077 gint64 time_file; 00078 gint64 time_build; 00079 char *rpm_license; 00080 char *rpm_vendor; 00081 char *rpm_group; 00083 char *rpm_buildhost; 00085 char *rpm_sourcerpm; 00086 gint64 rpm_header_start; 00087 gint64 rpm_header_end; 00088 char *rpm_packager; 00089 gint64 size_package; 00090 gint64 size_installed; 00091 gint64 size_archive; 00093 char *location_href; 00094 char *location_base; 00095 char *checksum_type; 00098 GSList *requires; 00099 GSList *provides; 00100 GSList *conflicts; 00101 GSList *obsoletes; 00103 GSList *files; 00105 GSList *changelogs; 00108 GStringChunk *chunk; 00110 } cr_Package; 00111 00115 cr_Dependency *cr_dependency_new(void); 00116 00120 cr_PackageFile *cr_package_file_new(void); 00121 00125 cr_ChangelogEntry *cr_changelog_entry_new(void); 00126 00130 cr_Package *cr_package_new(void); 00131 00135 cr_Package *cr_package_new_without_chunk(void); 00136 00140 void cr_package_free(cr_Package *package); 00141 00146 gchar *cr_package_nvra(cr_Package *package); 00147 00152 gchar *cr_package_nevra(cr_Package *package); 00153 00158 cr_Package *cr_package_copy(cr_Package *package); 00159 00162 #ifdef __cplusplus 00163 } 00164 #endif 00165 00166 #endif /* __C_CREATEREPOLIB_PACKAGE_H__ */