]> cygwin.com Git - cygwin-apps/setup.git/blob - cygpackage.h
2002-05-19 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / cygpackage.h
1 /*
2 * Copyright (c) 2001, Robert Collins.
3 *
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.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by Robert Collins <rbtcollins@hotmail.com>
13 *
14 */
15
16 /* This is a cygwin specific package class, that should be able to
17 * arbitrate acceess to cygwin binary packages amd cygwin source packages
18 */
19
20 #ifndef _CYGPACKAGE_H_
21 #define _CYGPACKAGE_H_
22
23 #include "String++.h"
24 /* for _MAX_PATH */
25 #include "win32.h"
26
27 class cygpackage:public packageversion
28 {
29 public:
30 virtual String const Name ();
31 virtual String const Vendor_version ();
32 virtual String const Package_version ();
33 virtual String const Canonical_version ();
34 virtual package_status_t Status ()
35 {
36 return status;
37 };
38 virtual package_type_t Type ()
39 {
40 return type;
41 };
42 virtual void set_sdesc (String const &);
43 virtual void set_ldesc (String const &);
44 virtual String const SDesc ()
45 {
46 return sdesc;
47 };
48 virtual String const LDesc ()
49 {
50 return ldesc;
51 };
52 virtual void uninstall ();
53
54
55 /* pass the name of the package when constructing */
56 cygpackage (String const &);
57 cygpackage (String const &, String const &, size_t const, String const &,
58 package_status_t const, package_type_t const);
59 void set_canonical_version (String const &);
60
61
62 virtual ~ cygpackage ();
63 /* TODO: we should probably return a metaclass - file name & path & size & type
64 - ie doc/script/binary
65 */
66 virtual String const getfirstfile ();
67 virtual String const getnextfile ();
68 private:
69 void destroy ();
70 String name;
71 String vendor;
72 String packagev;
73 String canonical;
74 String fn;
75 String sdesc, ldesc;
76 char getfilenamebuffer[_MAX_PATH];
77
78 // package_stability_t stability;
79 package_status_t status;
80 package_type_t type;
81
82 io_stream *listdata, *listfile;
83 size_t filesize;
84 };
85
86 #endif /* _CYGPACKAGE_H_ */
This page took 0.040275 seconds and 5 git commands to generate.