createrepo_c library 1.2.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 gboolean restart_suggested;
50 gboolean relogin_suggested;
51
52 GStringChunk *chunk;
53 } cr_UpdateCollectionPackage;
54
55 typedef struct {
56 gchar *name;
57 gchar *stream;
58 guint64 version;
59 gchar *context;
60 gchar *arch;
61
62 GStringChunk *chunk;
63 } cr_UpdateCollectionModule;
64
65 typedef struct {
66 gchar *shortname;
67 gchar *name;
68 cr_UpdateCollectionModule *module;
69 GSList *packages;
70 GStringChunk *chunk;
71 } cr_UpdateCollection;
72
73 typedef struct {
74 gchar *href;
75 gchar *id;
76 gchar *type;
77 gchar *title;
78 GStringChunk *chunk;
79 } cr_UpdateReference;
80
81 typedef struct {
82 gchar *from;
83 gchar *status;
84 gchar *type;
85 gchar *version;
86 gchar *id;
87 gchar *title;
88 gchar *issued_date;
89 gchar *updated_date;
90 gchar *rights;
91 gchar *release;
92 gchar *pushcount;
93 gchar *severity;
94 gchar *summary;
95 gchar *description;
96 gchar *solution;
97 gboolean reboot_suggested;
99 GSList *references;
100 GSList *collections;
102 GStringChunk *chunk;
103 } cr_UpdateRecord;
104
105 typedef struct {
106 GSList *updates;
107 } cr_UpdateInfo;
108
109 /*
110 * cr_UpdateCollectionPackage
111 */
112
113 cr_UpdateCollectionPackage *
114 cr_updatecollectionpackage_new(void);
115
116 cr_UpdateCollectionPackage *
117 cr_updatecollectionpackage_copy(const cr_UpdateCollectionPackage *orig);
118
119 void
120 cr_updatecollectionpackage_free(cr_UpdateCollectionPackage *pkg);
121
122 /*
123 * cr_UpdateCollectionModule
124 */
125
126 cr_UpdateCollectionModule *
127 cr_updatecollectionmodule_new(void);
128
129 cr_UpdateCollectionModule *
130 cr_updatecollectionmodule_copy(const cr_UpdateCollectionModule *orig);
131
132 void
133 cr_updatecollectionmodule_free(cr_UpdateCollectionModule *pkg);
134
135 /*
136 * cr_UpdateCollection
137 */
138
139 cr_UpdateCollection *
140 cr_updatecollection_new(void);
141
142 cr_UpdateCollection *
143 cr_updatecollection_copy(const cr_UpdateCollection *orig);
144
145 void
146 cr_updatecollection_free(cr_UpdateCollection *collection);
147
148 void
149 cr_updatecollection_append_package(cr_UpdateCollection *collection,
150 cr_UpdateCollectionPackage *pkg);
151
152 /*
153 * cr_UpdateReference
154 */
155
156 cr_UpdateReference *
157 cr_updatereference_new(void);
158
159 cr_UpdateReference *
160 cr_updatereference_copy(const cr_UpdateReference *orig);
161
162 void
163 cr_updatereference_free(cr_UpdateReference *ref);
164
165 /*
166 * cr_UpdateRecord
167 */
168
169 cr_UpdateRecord *
170 cr_updaterecord_new(void);
171
172 cr_UpdateRecord *
173 cr_updaterecord_copy(const cr_UpdateRecord *orig);
174
175 void
176 cr_updaterecord_free(cr_UpdateRecord *record);
177
178 void
179 cr_updaterecord_append_reference(cr_UpdateRecord *record,
180 cr_UpdateReference *ref);
181
182 void
183 cr_updaterecord_append_collection(cr_UpdateRecord *record,
184 cr_UpdateCollection *collection);
185
186 /*
187 * cr_Updateinfo
188 */
189
190 cr_UpdateInfo *
191 cr_updateinfo_new(void);
192
193 void
194 cr_updateinfo_free(cr_UpdateInfo *uinfo);
195
196 void
197 cr_updateinfo_apped_record(cr_UpdateInfo *uinfo, cr_UpdateRecord *record);
198
201 #ifdef __cplusplus
202 }
203 #endif
204
205 #endif /* __C_CREATEREPOLIB_UPDATEINFO_H__ */
cr_UpdateRecord::id
gchar * id
Definition: updateinfo.h:86
cr_UpdateCollectionPackage
Definition: updateinfo.h:38
cr_UpdateRecord::updated_date
gchar * updated_date
Definition: updateinfo.h:89
cr_UpdateRecord::rights
gchar * rights
Definition: updateinfo.h:90
cr_UpdateReference::href
gchar * href
Definition: updateinfo.h:74
cr_UpdateInfo
Definition: updateinfo.h:105
cr_ChecksumType
cr_ChecksumType
Definition: checksum.h:43
cr_UpdateRecord::collections
GSList * collections
Definition: updateinfo.h:100
cr_UpdateRecord::issued_date
gchar * issued_date
Definition: updateinfo.h:88
cr_UpdateRecord::status
gchar * status
Definition: updateinfo.h:83
cr_UpdateRecord::title
gchar * title
Definition: updateinfo.h:87
cr_UpdateReference::title
gchar * title
Definition: updateinfo.h:77
cr_UpdateRecord::from
gchar * from
Definition: updateinfo.h:82
cr_UpdateCollection
Definition: updateinfo.h:65
cr_UpdateRecord::release
gchar * release
Definition: updateinfo.h:91
cr_UpdateRecord::description
gchar * description
Definition: updateinfo.h:95
cr_UpdateRecord::reboot_suggested
gboolean reboot_suggested
Definition: updateinfo.h:97
cr_UpdateCollection::packages
GSList * packages
Definition: updateinfo.h:69
cr_UpdateRecord::references
GSList * references
Definition: updateinfo.h:99
cr_UpdateCollection::shortname
gchar * shortname
Definition: updateinfo.h:66
cr_UpdateRecord::type
gchar * type
Definition: updateinfo.h:84
cr_UpdateReference::id
gchar * id
Definition: updateinfo.h:75
cr_UpdateRecord::severity
gchar * severity
Definition: updateinfo.h:93
cr_UpdateReference
Definition: updateinfo.h:73
cr_UpdateRecord::chunk
GStringChunk * chunk
Definition: updateinfo.h:102
cr_UpdateRecord::summary
gchar * summary
Definition: updateinfo.h:94
cr_UpdateCollectionModule
Definition: updateinfo.h:55
cr_UpdateCollection::name
gchar * name
Definition: updateinfo.h:67
cr_UpdateInfo::updates
GSList * updates
Definition: updateinfo.h:106
cr_UpdateRecord::solution
gchar * solution
Definition: updateinfo.h:96
cr_UpdateRecord
Definition: updateinfo.h:81
cr_UpdateReference::type
gchar * type
Definition: updateinfo.h:76
cr_UpdateRecord::version
gchar * version
Definition: updateinfo.h:85
cr_UpdateRecord::pushcount
gchar * pushcount
Definition: updateinfo.h:92