]> cygwin.com Git - cygwin-apps/setup.git/blame - cygpackage.h
2003-10-23 Jerry D. Hedden <jerry@hedden.us>
[cygwin-apps/setup.git] / cygpackage.h
CommitLineData
7939f6d1
RC
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
c93bc6d0
MB
16#ifndef SETUP_CYGPACKAGE_H
17#define SETUP_CYGPACKAGE_H
18
7939f6d1
RC
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
3c054baf 23#include "String++.h"
45e01f23
RC
24/* for _MAX_PATH */
25#include "win32.h"
3c054baf 26
3c196821
RC
27#include "package_version.h"
28
29class cygpackage:public _packageversion
7939f6d1
RC
30{
31public:
3c054baf
RC
32 virtual String const Name ();
33 virtual String const Vendor_version ();
34 virtual String const Package_version ();
35 virtual String const Canonical_version ();
7b606ae5
RC
36 virtual package_status_t Status ()
37 {
38 return status;
39 };
40 virtual package_type_t Type ()
41 {
42 return type;
43 };
3c054baf
RC
44 virtual void set_sdesc (String const &);
45 virtual void set_ldesc (String const &);
46 virtual String const SDesc ()
d4a4527d 47 {
bb849dbd
RC
48 return sdesc;
49 };
3c054baf 50 virtual String const LDesc ()
bb849dbd
RC
51 {
52 return ldesc;
d4a4527d 53 };
fa0c0d10
RC
54 virtual void uninstall ();
55
7939f6d1
RC
56
57 /* pass the name of the package when constructing */
3c196821 58 void setCanonicalVersion (String const &);
7b606ae5
RC
59
60
61 virtual ~ cygpackage ();
7939f6d1
RC
62 /* TODO: we should probably return a metaclass - file name & path & size & type
63 - ie doc/script/binary
64 */
3c054baf
RC
65 virtual String const getfirstfile ();
66 virtual String const getnextfile ();
3c196821
RC
67
68 /* pass the name of the package when constructing */
69 static packageversion createInstance (String const &);
70 static packageversion createInstance (String const &, String const &,
71 size_t const, String const &,
72 package_status_t const,
73 package_type_t const);
7939f6d1 74private:
3c196821 75 cygpackage ();
7939f6d1 76 void destroy ();
3c054baf
RC
77 String name;
78 String vendor;
79 String packagev;
80 String canonical;
81 String fn;
82 String sdesc, ldesc;
bb849dbd 83 char getfilenamebuffer[_MAX_PATH];
7b606ae5 84
7939f6d1
RC
85// package_stability_t stability;
86 package_status_t status;
87 package_type_t type;
7b606ae5 88
7939f6d1
RC
89 io_stream *listdata, *listfile;
90 size_t filesize;
91};
92
c93bc6d0 93#endif /* SETUP_CYGPACKAGE_H */
This page took 0.04152 seconds and 5 git commands to generate.