Fix MD5sum.str () formatting bug
[cygwin-setup.git] / cygpackage.h
blobc00539b6d923ebdb4ea9d15a16d6d6f899c5354c
1 /*
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
10 * http://www.gnu.org/
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
23 /* for MAX_PATH */
24 #include "win32.h"
26 #include "package_version.h"
28 class io_stream;
30 class cygpackage:public _packageversion
32 public:
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 ()
39 return status;
41 virtual package_type_t Type ()
43 return type;
45 virtual void set_sdesc (const std::string& );
46 virtual void set_ldesc (const std::string& );
47 virtual const std::string SDesc ()
49 return sdesc;
51 virtual const std::string LDesc ()
53 return 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& ,
75 const std::string& ,
76 const std::string& ,
77 package_status_t const,
78 package_type_t const);
80 private:
81 cygpackage ();
82 void destroy ();
83 std::string name;
84 std::string vendor;
85 std::string packagev;
86 std::string canonical;
87 std::string fn;
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;
94 package_type_t type;
96 io_stream *listdata, *listfile;
99 #endif /* SETUP_CYGPACKAGE_H */