00001 /* createrepo_c - Library of routines for manipulation with repodata 00002 * Copyright (C) 2014 Tomas Mlcoch 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00017 * USA. 00018 */ 00019 00020 #ifndef __C_CREATEREPOLIB_UPDATEINFO_H__ 00021 #define __C_CREATEREPOLIB_UPDATEINFO_H__ 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 #include <glib.h> 00028 #include "checksum.h" 00029 00038 typedef struct { 00039 gchar *name; 00040 gchar *version; 00041 gchar *release; 00042 gchar *epoch; 00043 gchar *arch; 00044 gchar *src; 00045 gchar *filename; 00046 gchar *sum; 00047 cr_ChecksumType sum_type; 00048 gboolean reboot_suggested; 00049 00050 GStringChunk *chunk; 00051 } cr_UpdateCollectionPackage; 00052 00053 typedef struct { 00054 gchar *shortname; 00055 gchar *name; 00056 GSList *packages; 00057 GStringChunk *chunk; 00058 } cr_UpdateCollection; 00059 00060 typedef struct { 00061 gchar *href; 00062 gchar *id; 00063 gchar *type; 00064 gchar *title; 00065 GStringChunk *chunk; 00066 } cr_UpdateReference; 00067 00068 typedef struct { 00069 gchar *from; 00070 gchar *status; 00071 gchar *type; 00072 gchar *version; 00073 gchar *id; 00074 gchar *title; 00075 gchar *issued_date; 00076 gchar *updated_date; 00077 gchar *rights; 00078 gchar *release; 00079 gchar *pushcount; 00080 gchar *severity; 00081 gchar *summary; 00082 gchar *description; 00083 gchar *solution; 00085 GSList *references; 00086 GSList *collections; 00088 GStringChunk *chunk; 00089 } cr_UpdateRecord; 00090 00091 typedef struct { 00092 GSList *updates; 00093 } cr_UpdateInfo; 00094 00095 /* 00096 * cr_UpdateCollectionPackage 00097 */ 00098 00099 cr_UpdateCollectionPackage * 00100 cr_updatecollectionpackage_new(void); 00101 00102 cr_UpdateCollectionPackage * 00103 cr_updatecollectionpackage_copy(const cr_UpdateCollectionPackage *orig); 00104 00105 void 00106 cr_updatecollectionpackage_free(cr_UpdateCollectionPackage *pkg); 00107 00108 /* 00109 * cr_UpdateCollection 00110 */ 00111 00112 cr_UpdateCollection * 00113 cr_updatecollection_new(void); 00114 00115 cr_UpdateCollection * 00116 cr_updatecollection_copy(const cr_UpdateCollection *orig); 00117 00118 void 00119 cr_updatecollection_free(cr_UpdateCollection *collection); 00120 00121 void 00122 cr_updatecollection_append_package(cr_UpdateCollection *collection, 00123 cr_UpdateCollectionPackage *pkg); 00124 00125 /* 00126 * cr_UpdateReference 00127 */ 00128 00129 cr_UpdateReference * 00130 cr_updatereference_new(void); 00131 00132 cr_UpdateReference * 00133 cr_updatereference_copy(const cr_UpdateReference *orig); 00134 00135 void 00136 cr_updatereference_free(cr_UpdateReference *ref); 00137 00138 /* 00139 * cr_UpdateRecord 00140 */ 00141 00142 cr_UpdateRecord * 00143 cr_updaterecord_new(void); 00144 00145 cr_UpdateRecord * 00146 cr_updaterecord_copy(const cr_UpdateRecord *orig); 00147 00148 void 00149 cr_updaterecord_free(cr_UpdateRecord *record); 00150 00151 void 00152 cr_updaterecord_append_reference(cr_UpdateRecord *record, 00153 cr_UpdateReference *ref); 00154 00155 void 00156 cr_updaterecord_append_collection(cr_UpdateRecord *record, 00157 cr_UpdateCollection *collection); 00158 00159 /* 00160 * cr_Updateinfo 00161 */ 00162 00163 cr_UpdateInfo * 00164 cr_updateinfo_new(void); 00165 00166 void 00167 cr_updateinfo_free(cr_UpdateInfo *uinfo); 00168 00169 void 00170 cr_updateinfo_apped_record(cr_UpdateInfo *uinfo, cr_UpdateRecord *record); 00171 00174 #ifdef __cplusplus 00175 } 00176 #endif 00177 00178 #endif /* __C_CREATEREPOLIB_UPDATEINFO_H__ */