]> cygwin.com Git - cygwin-apps/setup.git/blame - site.h
2003-10-23 Jerry D. Hedden <jerry@hedden.us>
[cygwin-apps/setup.git] / site.h
CommitLineData
de6a1a64
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_SITE_H
17#define SETUP_SITE_H
de6a1a64
RC
18
19/* required to parse this file */
ab57ceaa
RC
20#include <string.h>
21#include <stdlib.h>
3bac26a1 22#include <vector>
3c054baf 23#include "String++.h"
de6a1a64 24
ab57ceaa
RC
25#include "proppage.h"
26
27class SitePage:public PropertyPage
28{
29public:
30 SitePage ()
31 {
32 };
33 virtual ~ SitePage ()
34 {
35 };
36
37 bool Create ();
38
b7301c43 39 virtual void OnActivate ();
ab57ceaa
RC
40 virtual long OnNext ();
41 virtual long OnBack ();
f2ff9838 42 virtual long OnUnattended ();
b7301c43
RC
43
44 virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code);
45
46 void PopulateListBox();
47 void CheckControlsAndDisableAccordingly () const;
ab57ceaa
RC
48};
49
50void do_download_site_info (HINSTANCE h, HWND owner);
51
de6a1a64
RC
52class site_list_type
53{
54public:
3bac26a1 55 site_list_type ():url (), displayed_url (), key()
ab57ceaa
RC
56 {
57 };
3bac26a1 58 site_list_type (site_list_type const &);
3c054baf 59 site_list_type (String const &);
de6a1a64 60 /* workaround for missing placement new in gcc 2.95 */
3c054baf
RC
61 void init (String const &);
62 ~site_list_type () {};
3bac26a1 63 site_list_type &operator= (site_list_type const &);
3c054baf
RC
64 String url;
65 String displayed_url;
66 String key;
3bac26a1
RC
67 bool operator == (site_list_type const &) const;
68 bool operator != (site_list_type const &) const;
69 bool operator < (site_list_type const &) const;
70 bool operator <= (site_list_type const &) const;
71 bool operator > (site_list_type const &) const;
72 bool operator >= (site_list_type const &) const;
de6a1a64
RC
73};
74
666bf37d 75typedef std::vector <site_list_type> SiteList;
3bac26a1 76
de6a1a64 77/* user chosen sites */
3bac26a1 78extern SiteList site_list;
de6a1a64 79/* potential sites */
3bac26a1 80extern SiteList all_site_list;
de6a1a64 81
ead15931
RC
82#include "UserSetting.h"
83class SiteSetting : public UserSetting
84{
85 public:
2bbf91cf
RC
86 virtual void load();
87 virtual void save();
dbdc1d9d
RC
88 private:
89 void getSavedSites();
90 void registerSavedSite(char const *);
ead15931
RC
91};
92
c93bc6d0 93#endif /* SETUP_SITE_H */
This page took 0.042058 seconds and 5 git commands to generate.