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