createrepo_c library  0.15.1
C library for metadata manipulation
updateinfo.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2  * Copyright (C) 2014 Tomas Mlcoch
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
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.
13  *
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 02110-1301,
17  * USA.
18  */
19 
20 #ifndef __C_CREATEREPOLIB_UPDATEINFO_H__
21 #define __C_CREATEREPOLIB_UPDATEINFO_H__
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <glib.h>
28 #include "checksum.h"
29 
38 typedef struct {
39  gchar *name;
40  gchar *version;
41  gchar *release;
42  gchar *epoch;
43  gchar *arch;
44  gchar *src;
45  gchar *filename;
46  gchar *sum;
47  cr_ChecksumType sum_type;
48  gboolean reboot_suggested;
49 
50  GStringChunk *chunk;
52 
53 typedef struct {
54  gchar *name;
55  gchar *stream;
56  guint64 version;
57  gchar *context;
58  gchar *arch;
59 
60  GStringChunk *chunk;
62 
63 typedef struct {
64  gchar *shortname;
65  gchar *name;
67  GSList *packages;
68  GStringChunk *chunk;
70 
71 typedef struct {
72  gchar *href;
73  gchar *id;
74  gchar *type;
75  gchar *title;
76  GStringChunk *chunk;
78 
79 typedef struct {
80  gchar *from;
81  gchar *status;
82  gchar *type;
83  gchar *version;
84  gchar *id;
85  gchar *title;
86  gchar *issued_date;
87  gchar *updated_date;
88  gchar *rights;
89  gchar *release;
90  gchar *pushcount;
91  gchar *severity;
92  gchar *summary;
93  gchar *description;
94  gchar *solution;
95  gboolean reboot_suggested;
97  GSList *references;
98  GSList *collections;
100  GStringChunk *chunk;
102 
103 typedef struct {
104  GSList *updates;
105 } cr_UpdateInfo;
106 
107 /*
108  * cr_UpdateCollectionPackage
109  */
110 
112 cr_updatecollectionpackage_new(void);
113 
115 cr_updatecollectionpackage_copy(const cr_UpdateCollectionPackage *orig);
116 
117 void
118 cr_updatecollectionpackage_free(cr_UpdateCollectionPackage *pkg);
119 
120 /*
121  * cr_UpdateCollectionModule
122  */
123 
125 cr_updatecollectionmodule_new(void);
126 
128 cr_updatecollectionmodule_copy(const cr_UpdateCollectionModule *orig);
129 
130 void
131 cr_updatecollectionmodule_free(cr_UpdateCollectionModule *pkg);
132 
133 /*
134  * cr_UpdateCollection
135  */
136 
138 cr_updatecollection_new(void);
139 
141 cr_updatecollection_copy(const cr_UpdateCollection *orig);
142 
143 void
144 cr_updatecollection_free(cr_UpdateCollection *collection);
145 
146 void
147 cr_updatecollection_append_package(cr_UpdateCollection *collection,
149 
150 /*
151  * cr_UpdateReference
152  */
153 
155 cr_updatereference_new(void);
156 
158 cr_updatereference_copy(const cr_UpdateReference *orig);
159 
160 void
161 cr_updatereference_free(cr_UpdateReference *ref);
162 
163 /*
164  * cr_UpdateRecord
165  */
166 
168 cr_updaterecord_new(void);
169 
171 cr_updaterecord_copy(const cr_UpdateRecord *orig);
172 
173 void
174 cr_updaterecord_free(cr_UpdateRecord *record);
175 
176 void
177 cr_updaterecord_append_reference(cr_UpdateRecord *record,
178  cr_UpdateReference *ref);
179 
180 void
181 cr_updaterecord_append_collection(cr_UpdateRecord *record,
182  cr_UpdateCollection *collection);
183 
184 /*
185  * cr_Updateinfo
186  */
187 
189 cr_updateinfo_new(void);
190 
191 void
192 cr_updateinfo_free(cr_UpdateInfo *uinfo);
193 
194 void
195 cr_updateinfo_apped_record(cr_UpdateInfo *uinfo, cr_UpdateRecord *record);
196 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 #endif /* __C_CREATEREPOLIB_UPDATEINFO_H__ */
gchar * from
Definition: updateinfo.h:80
cr_ChecksumType
Definition: checksum.h:43
gboolean reboot_suggested
Definition: updateinfo.h:95
gchar * pushcount
Definition: updateinfo.h:90
gchar * issued_date
Definition: updateinfo.h:86
GStringChunk * chunk
Definition: updateinfo.h:100
gchar * description
Definition: updateinfo.h:93
gchar * updated_date
Definition: updateinfo.h:87
GSList * references
Definition: updateinfo.h:97
GSList * collections
Definition: updateinfo.h:98
gchar * type
Definition: updateinfo.h:82
gchar * solution
Definition: updateinfo.h:94
gchar * status
Definition: updateinfo.h:81
gchar * version
Definition: updateinfo.h:83
gchar * release
Definition: updateinfo.h:89
gchar * severity
Definition: updateinfo.h:91
gchar * title
Definition: updateinfo.h:85
gchar * summary
Definition: updateinfo.h:92
gchar * rights
Definition: updateinfo.h:88
GSList * updates
Definition: updateinfo.h:104