]> cygwin.com Git - cygwin-apps/setup.git/blob - cygpackage.h
* ini.h (SETUP_BZ2_FILENAME): Reflect new architecture layout in ftp.
[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 #ifndef SETUP_CYGPACKAGE_H
17 #define SETUP_CYGPACKAGE_H
18
19 /* This is a cygwin specific package class, that should be able to
20 * arbitrate acceess to cygwin binary packages amd cygwin source packages
21 */
22
23 /* for MAX_PATH */
24 #include "win32.h"
25
26 #include "package_version.h"
27
28 class io_stream;
29
30 class cygpackage:public _packageversion
31 {
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 ()
38 {
39 return status;
40 };
41 virtual package_type_t Type ()
42 {
43 return type;
44 };
45 virtual void set_sdesc (const std::string& );
46 virtual void set_ldesc (const std::string& );
47 virtual const std::string SDesc ()
48 {
49 return sdesc;
50 };
51 virtual const std::string LDesc ()
52 {
53 return ldesc;
54 };
55 virtual void uninstall ();
56
57
58 /* pass the name of the package when constructing */
59 void setCanonicalVersion (const std::string& );
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 const std::string getfirstfile ();
67 virtual const std::string getnextfile ();
68
69 /* pass the name of the package when constructing */
70 static packageversion createInstance (const std::string& pkgname,
71 const package_type_t type);
72
73 static packageversion createInstance (const std::string& ,
74 const std::string& ,
75 const std::string& ,
76 package_status_t const,
77 package_type_t const);
78
79 private:
80 cygpackage ();
81 void destroy ();
82 std::string name;
83 std::string vendor;
84 std::string packagev;
85 std::string canonical;
86 std::string fn;
87 std::string sdesc, ldesc;
88 char getfilenamebuffer[MAX_PATH];
89
90 // package_stability_t stability;
91 package_status_t status;
92 package_type_t type;
93
94 io_stream *listdata, *listfile;
95 };
96
97 #endif /* SETUP_CYGPACKAGE_H */
This page took 0.087219 seconds and 5 git commands to generate.