createrepo_c library  0.7.4
C library for metadata manipulation
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
package.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2  * Copyright (C) 2012 Tomas Mlcoch
3  * Copyright (C) 2007 James Bowes
4  * Copyright (C) 2006 Seth Vidal
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19  * USA.
20  */
21 
22 #ifndef __C_CREATEREPOLIB_PACKAGE_H__
23 #define __C_CREATEREPOLIB_PACKAGE_H__
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #include <glib.h>
30 
36 typedef enum {
39  /* Some values are reserved (for sqlite, solv, etc..) */
44 
47 typedef struct {
48  char *name;
49  char *flags;
51  char *epoch;
52  char *version;
53  char *release;
54  gboolean pre;
56 
59 typedef struct {
60  char *type;
61  char *path;
62  char *name;
64 
67 typedef struct {
68  char *author;
69  gint64 date;
70  char *changelog;
72 
75 typedef struct {
76  void *data;
77  gsize size;
79 
82 typedef struct {
83  gint64 pkgKey;
84  char *pkgId;
85  char *name;
86  char *arch;
87  char *version;
88  char *epoch;
89  char *release;
90  char *summary;
91  char *description;
92  char *url;
93  gint64 time_file;
94  gint64 time_build;
95  char *rpm_license;
96  char *rpm_vendor;
97  char *rpm_group;
99  char *rpm_buildhost;
103  gint64 rpm_header_end;
104  char *rpm_packager;
105  gint64 size_package;
106  gint64 size_installed;
107  gint64 size_archive;
111  char *checksum_type;
114  GSList *requires;
115  GSList *provides;
116  GSList *conflicts;
117  GSList *obsoletes;
118  GSList *suggests;
119  GSList *enhances;
120  GSList *recommends;
121  GSList *supplements;
123  GSList *files;
125  GSList *changelogs;
128  char *hdrid;
129  cr_BinaryData *siggpg;
130  cr_BinaryData *sigpgp;
131 
132  GStringChunk *chunk;
135  cr_PackageLoadingFlags loadingflags;
137 } cr_Package;
138 
143 
148 
153 
158 
163 
168 
172 void cr_package_free(cr_Package *package);
173 
178 gchar *cr_package_nvra(cr_Package *package);
179 
184 gchar *cr_package_nevra(cr_Package *package);
185 
191 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #endif /* __C_CREATEREPOLIB_PACKAGE_H__ */