]>
cygwin.com Git - cygwin-apps/setup.git/blob - package_meta.h
2 * Copyright (c) 2001, Robert Collins.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins <rbtcollins@hotmail.com>
16 #ifndef _PACKAGE_META_H_
17 #define _PACKAGE_META_H_
23 /* Required to parse this completely */
29 For cleanliness this may need to be put in its own file later. */
33 CategoryPackage (Category
& cat
):key (cat
), pkg (0)
39 CategoryPackage
*next
; /* The next package pointer in the list */
44 /* NOTE: A packagemeta without 1 packageversion is invalid! */
48 packagemeta (char const *pkgname
):installed_from (0),
50 // versioncount (0), versionspace (0),
51 installed (0), prev (0), prevtimestamp (0), curr (0), currtimestamp (0),
52 exp (0), exptimestamp (0), desired (0)
54 name
= new char[strlen (pkgname
) + 1];
55 strcpy (name
, pkgname
);
58 packagemeta (char const *pkgname
,
59 char const *installedfrom
):installed_from (0),
60 //versions (0), versioncount (0), versionspace (0),
62 installed (0), prev (0), prevtimestamp (0), curr (0), currtimestamp (0),
63 exp (0), exptimestamp (0), desired (0)
65 name
= new char[strlen (pkgname
) + 1];
66 strcpy (name
, pkgname
);
67 installed_from
= new char[strlen (installedfrom
) + 1];
68 strcpy (installed_from
, installedfrom
);
76 delete installed_from
;
79 void add_version (packageversion
&);
80 void set_installed (packageversion
&);
83 char *name
; /* package name, like "cygwin" */
84 /* legacy variable used to output data for installed.db versions <= 2 */
86 /* SDesc is global in theory, across all package versions.
87 LDesc is not: it can be different per version */
89 /* what categories does this package belong in. Note that if multiple versions
90 * of a package disagree.... the first one read in will take precedence.
92 void add_category (Category
&);
93 list
< CategoryPackage
, Category
&, Categorycmp
> Categories
;
95 list
< packageversion
, char const *, strcasecmp
> versions
;
96 /* which one is installed. */
97 packageversion
*installed
;
98 /* which one is listed as "prev" in our available packages db */
100 /* And what was the timestamp of the ini it was found from */
101 unsigned int prevtimestamp
;
102 /* ditto for current - stable */
103 packageversion
*curr
;
104 unsigned int currtimestamp
;
105 /* and finally the experimental version */
107 unsigned int exptimestamp
;
108 /* Now for the user stuff :] */
109 /* What version does the user want ? */
110 packageversion
*desired
;
113 #endif /* _PACKAGE_META_H_ */
This page took 0.03955 seconds and 5 git commands to generate.