createrepo_c library  0.3.0
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  gint64 pkgKey;
77  char *pkgId;
78  char *name;
79  char *arch;
80  char *version;
81  char *epoch;
82  char *release;
83  char *summary;
84  char *description;
85  char *url;
86  gint64 time_file;
87  gint64 time_build;
88  char *rpm_license;
89  char *rpm_vendor;
90  char *rpm_group;
92  char *rpm_buildhost;
94  char *rpm_sourcerpm;
96  gint64 rpm_header_end;
97  char *rpm_packager;
98  gint64 size_package;
99  gint64 size_installed;
100  gint64 size_archive;
104  char *checksum_type;
107  GSList *requires;
108  GSList *provides;
109  GSList *conflicts;
110  GSList *obsoletes;
112  GSList *files;
114  GSList *changelogs;
117  GStringChunk *chunk;
120  cr_PackageLoadingFlags loadingflags;
122 } cr_Package;
123 
128 
133 
138 
143 
148 
152 void cr_package_free(cr_Package *package);
153 
158 gchar *cr_package_nvra(cr_Package *package);
159 
164 gchar *cr_package_nevra(cr_Package *package);
165 
171 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif /* __C_CREATEREPOLIB_PACKAGE_H__ */