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 SETUP_CYGPACKAGE_H
17 #define SETUP_CYGPACKAGE_H
19 /* This is a cygwin specific package class, that should be able to
20 * arbitrate acceess to cygwin binary packages amd cygwin source packages
26 #include "package_version.h"
30 class cygpackage
:public _packageversion
33 virtual const std::string
Name ();
34 virtual const std::string
Vendor_version ();
35 virtual const std::string
Package_version ();
36 virtual const std::string
Canonical_version ();
37 virtual package_status_t
Status ()
41 virtual package_type_t
Type ()
45 virtual void set_sdesc (const std::string
& );
46 virtual void set_ldesc (const std::string
& );
47 virtual const std::string
SDesc ()
51 virtual const std::string
LDesc ()
55 virtual void set_autodep (const std::string
& );
56 virtual void uninstall ();
59 /* pass the name of the package when constructing */
60 void setCanonicalVersion (const std::string
& );
63 virtual ~ cygpackage ();
64 /* TODO: we should probably return a metaclass - file name & path & size & type
65 - ie doc/script/binary
67 virtual const std::string
getfirstfile ();
68 virtual const std::string
getnextfile ();
70 /* pass the name of the package when constructing */
71 static packageversion
createInstance (const std::string
& pkgname
,
72 const package_type_t type
);
74 static packageversion
createInstance (const std::string
& ,
77 package_status_t
const,
78 package_type_t
const);
86 std::string canonical
;
88 std::string sdesc
, ldesc
;
89 std::string autodep_regex
;
90 char getfilenamebuffer
[CYG_PATH_MAX
];
92 // package_stability_t stability;
93 package_status_t status
;
96 io_stream
*listdata
, *listfile
;
99 #endif /* SETUP_CYGPACKAGE_H */