]> cygwin.com Git - cygwin-apps/setup.git/blob - site.h
Handle multiple signature packets in .sig file
[cygwin-apps/setup.git] / site.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_SITE_H
17 #define SETUP_SITE_H
18
19 #include <string>
20 #include <vector>
21
22 #include "proppage.h"
23
24 class SitePage : public PropertyPage
25 {
26 public:
27 SitePage ();
28 virtual ~ SitePage ()
29 {
30 };
31
32 bool Create ();
33
34 virtual void OnActivate ();
35 virtual long OnNext ();
36 virtual long OnBack ();
37 virtual long OnUnattended ();
38
39 virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code);
40
41 void PopulateListBox();
42 void CheckControlsAndDisableAccordingly () const;
43 };
44
45 void do_download_site_info (HINSTANCE h, HWND owner);
46
47 class site_list_type
48 {
49 public:
50 site_list_type () : url (), displayed_url (), key () {};
51 site_list_type (const site_list_type &);
52 site_list_type (const std::string& , const std::string& ,
53 const std::string& , const std::string&, bool);
54 ~site_list_type () {};
55 site_list_type &operator= (const site_list_type &);
56 std::string url;
57 // provided by mirrors.lst but not used
58 std::string servername;
59 std::string area;
60 std::string location;
61 // did this site come from mirrors.lst?
62 bool from_mirrors_lst;
63 std::string displayed_url;
64 // sort key
65 std::string key;
66 bool operator == (const site_list_type &) const;
67 bool operator != (const site_list_type &) const;
68 bool operator < (const site_list_type &) const;
69 bool operator <= (const site_list_type &) const;
70 bool operator > (const site_list_type &) const;
71 bool operator >= (const site_list_type &) const;
72 };
73
74 typedef std::vector <site_list_type> SiteList;
75
76 /* user chosen sites */
77 extern SiteList site_list;
78 /* potential sites */
79 extern SiteList all_site_list;
80
81 class SiteSetting
82 {
83 public:
84 SiteSetting ();
85 void save ();
86 ~SiteSetting ();
87 private:
88 bool saved;
89 void getSavedSites();
90 void registerSavedSite(char const *);
91 const char *lastMirrorKey();
92 };
93
94 #endif /* SETUP_SITE_H */
This page took 0.039207 seconds and 5 git commands to generate.