]> cygwin.com Git - cygwin-apps/setup.git/blame - site.h
2003-02-16 Pavel Tsekov <ptsekov@gmx.net>
[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
16#ifndef _SITE_H_
17#define _SITE_H_
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
39 virtual void OnInit ();
b7301c43 40 virtual void OnActivate ();
ab57ceaa
RC
41 virtual long OnNext ();
42 virtual long OnBack ();
f2ff9838 43 virtual long OnUnattended ();
b7301c43
RC
44
45 virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code);
46
47 void PopulateListBox();
48 void CheckControlsAndDisableAccordingly () const;
ab57ceaa
RC
49};
50
51void do_download_site_info (HINSTANCE h, HWND owner);
52
de6a1a64
RC
53class site_list_type
54{
55public:
3bac26a1 56 site_list_type ():url (), displayed_url (), key()
ab57ceaa
RC
57 {
58 };
3bac26a1 59 site_list_type (site_list_type const &);
3c054baf 60 site_list_type (String const &);
de6a1a64 61 /* workaround for missing placement new in gcc 2.95 */
3c054baf
RC
62 void init (String const &);
63 ~site_list_type () {};
3bac26a1 64 site_list_type &operator= (site_list_type const &);
3c054baf
RC
65 String url;
66 String displayed_url;
67 String key;
3bac26a1
RC
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;
73 bool operator >= (site_list_type const &) const;
de6a1a64
RC
74};
75
666bf37d 76typedef std::vector <site_list_type> SiteList;
3bac26a1 77
de6a1a64 78/* user chosen sites */
3bac26a1 79extern SiteList site_list;
de6a1a64 80/* potential sites */
3bac26a1 81extern SiteList all_site_list;
de6a1a64
RC
82
83void save_site_url ();
84
85#endif /* _SITE_H_ */
This page took 0.035799 seconds and 5 git commands to generate.