]> cygwin.com Git - cygwin-apps/setup.git/blame - prereq.h
* CHANGES: Update.
[cygwin-apps/setup.git] / prereq.h
CommitLineData
82306ac2
BD
1#ifndef SETUP_PREREQ_H
2#define SETUP_PREREQ_H
3
4#include <map>
5#include "proppage.h"
6#include "PackageTrust.h"
7#include "package_meta.h"
8
9using namespace std;
10
11// keeps the map sorted by name
12struct packagemeta_ltcomp
13{
14 bool operator() ( const packagemeta *m1, const packagemeta *m2 )
afa76033 15 { return casecompare(m1->name, m2->name) < 0; }
82306ac2
BD
16};
17
18
19class PrereqPage:public PropertyPage
20{
21public:
22 PrereqPage ();
23 virtual ~PrereqPage () { };
24 bool Create ();
25 virtual void OnInit ();
26 virtual void OnActivate ();
27 virtual long OnNext ();
28 virtual long OnBack ();
29 virtual long OnUnattended () { return 0; };
30};
31
32class PrereqChecker
33{
34public:
35 // checks all dependecies, populates 'unmet'
36 // returns true if unsatisfied dependencies exist
37 bool isMet ();
38
39 // formats 'unmet' as a string for display
08678720 40 void getUnmetString (std::string &s);
82306ac2
BD
41
42 // selects/picks the needed packages that were missing
43 void selectMissing ();
44
45 // notes the current trust (for use in selectMissing)
46 void setTrust (trusts t) { theTrust = t; };
47
48private:
49
50 // this is the actual hash_map that does all the work
51 static map <packagemeta *, vector <packagemeta *>, packagemeta_ltcomp> unmet;
52 static trusts theTrust;
53};
54
55#endif /* SETUP_PREREQ_H */
This page took 0.030084 seconds and 5 git commands to generate.