createrepo_c library  0.2.1
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 
38 typedef struct {
39  char *name;
40  char *flags;
42  char *epoch;
43  char *version;
44  char *release;
45  gboolean pre;
47 
50 typedef struct {
51  char *type;
52  char *path;
53  char *name;
55 
58 typedef struct {
59  char *author;
60  gint64 date;
61  char *changelog;
63 
66 typedef struct {
67  gint64 pkgKey;
68  char *pkgId;
69  char *name;
70  char *arch;
71  char *version;
72  char *epoch;
73  char *release;
74  char *summary;
75  char *description;
76  char *url;
77  gint64 time_file;
78  gint64 time_build;
79  char *rpm_license;
80  char *rpm_vendor;
81  char *rpm_group;
83  char *rpm_buildhost;
85  char *rpm_sourcerpm;
87  gint64 rpm_header_end;
88  char *rpm_packager;
89  gint64 size_package;
90  gint64 size_installed;
91  gint64 size_archive;
93  char *location_href;
94  char *location_base;
95  char *checksum_type;
98  GSList *requires;
99  GSList *provides;
100  GSList *conflicts;
101  GSList *obsoletes;
103  GSList *files;
105  GSList *changelogs;
108  GStringChunk *chunk;
110 } cr_Package;
111 
116 
121 
126 
131 
136 
140 void cr_package_free(cr_Package *package);
141 
146 gchar *cr_package_nvra(cr_Package *package);
147 
152 gchar *cr_package_nevra(cr_Package *package);
153 
159 
162 #ifdef __cplusplus
163 }
164 #endif
165 
166 #endif /* __C_CREATEREPOLIB_PACKAGE_H__ */