Initial packaging
[tools/yum-metadata-parser.git] / package.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /* This program is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU General Public License,
5  * version 2, as published by the Free Software Foundation
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10  * General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
15  * 02111-1307, USA.
16  */
17
18 #ifndef __YUM_PACKAGE_H__
19 #define __YUM_PACKAGE_H__
20
21 #include <glib.h>
22
23 typedef struct {
24     char *name;
25     char *flags;
26     char *epoch;
27     char *version;
28     char *release;
29     gboolean pre;
30 } Dependency;
31
32 typedef struct {
33     char *type;
34     char *name;
35 } PackageFile;
36
37 typedef struct {
38     char *author;
39     gint64 date;
40     char *changelog;
41 } ChangelogEntry;
42
43 typedef struct {
44     gint64 pkgKey;
45     char *pkgId;
46     char *name;
47     char *arch;
48     char *version;
49     char *epoch;
50     char *release;
51     char *summary;
52     char *description;
53     char *url;
54     gint64 time_file;
55     gint64 time_build;
56     char *rpm_license;
57     char *rpm_vendor;
58     char *rpm_group;
59     char *rpm_buildhost;
60     char *rpm_sourcerpm;
61     gint64 rpm_header_start;
62     gint64 rpm_header_end;
63     char *rpm_packager;
64     gint64 size_package;
65     gint64 size_installed;
66     gint64 size_archive;
67     char *location_href;
68     char *location_base;
69     char *checksum_type;
70
71     GSList *requires;
72     GSList *provides;
73     GSList *conflicts;
74     GSList *obsoletes;
75
76     GSList *files;
77     GSList *changelogs;
78
79     GStringChunk *chunk;
80 } Package;
81
82 typedef void (*PackageFn) (Package *pkg, gpointer data);
83
84 Dependency     *dependency_new      (void);
85 PackageFile    *package_file_new    (void);
86 ChangelogEntry *changelog_entry_new (void);
87 Package        *package_new         (void);
88 void            package_free        (Package *package);
89
90 #endif /* __YUM_PACKAGE_H__ */