createrepo_c library  0.19.0
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;
54 
55 typedef struct {
56  gchar *name;
57  gchar *stream;
58  guint64 version;
59  gchar *context;
60  gchar *arch;
61 
62  GStringChunk *chunk;
64 
65 typedef struct {
66  gchar *shortname;
67  gchar *name;
69  GSList *packages;
70  GStringChunk *chunk;
72 
73 typedef struct {
74  gchar *href;
75  gchar *id;
76  gchar *type;
77  gchar *title;
78  GStringChunk *chunk;
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;
104 
105 typedef struct {
106  GSList *updates;
107 } cr_UpdateInfo;
108 
109 /*
110  * cr_UpdateCollectionPackage
111  */
112 
114 cr_updatecollectionpackage_new(void);
115 
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 
127 cr_updatecollectionmodule_new(void);
128 
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 
140 cr_updatecollection_new(void);
141 
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,
151 
152 /*
153  * cr_UpdateReference
154  */
155 
157 cr_updatereference_new(void);
158 
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 
170 cr_updaterecord_new(void);
171 
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 
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_ChecksumType
Definition: checksum.h:43
GSList * updates
Definition: updateinfo.h:106
gchar * version
Definition: updateinfo.h:85
GSList * references
Definition: updateinfo.h:99
gchar * description
Definition: updateinfo.h:95
gchar * title
Definition: updateinfo.h:87
gchar * release
Definition: updateinfo.h:91
gchar * rights
Definition: updateinfo.h:90
GStringChunk * chunk
Definition: updateinfo.h:102
gboolean reboot_suggested
Definition: updateinfo.h:97
gchar * solution
Definition: updateinfo.h:96
gchar * issued_date
Definition: updateinfo.h:88
gchar * type
Definition: updateinfo.h:84
gchar * pushcount
Definition: updateinfo.h:92
gchar * from
Definition: updateinfo.h:82
gchar * status
Definition: updateinfo.h:83
gchar * summary
Definition: updateinfo.h:94
gchar * updated_date
Definition: updateinfo.h:89
GSList * collections
Definition: updateinfo.h:100
gchar * severity
Definition: updateinfo.h:93