/* * Copyright (c) 2001, Robert Collins. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * A copy of the GNU General Public License can be found at * http://www.gnu.org/ * * Written by Robert Collins * */ #ifndef SETUP_SITE_H #define SETUP_SITE_H #include #include #include "proppage.h" class SitePage : public PropertyPage { public: SitePage (); virtual ~ SitePage () { }; bool Create (); virtual void OnActivate (); virtual long OnNext (); virtual long OnBack (); virtual long OnUnattended (); virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code); void PopulateListBox(); void CheckControlsAndDisableAccordingly () const; }; void do_download_site_info (HINSTANCE h, HWND owner); class site_list_type { public: site_list_type () : url (), displayed_url (), key () {}; site_list_type (const site_list_type &); site_list_type (const std::string& , const std::string& , const std::string& , const std::string&, bool); ~site_list_type () {}; site_list_type &operator= (const site_list_type &); std::string url; // provided by mirrors.lst but not used std::string servername; std::string area; std::string location; // did this site come from mirrors.lst? bool from_mirrors_lst; std::string displayed_url; // sort key std::string key; bool operator == (const site_list_type &) const; bool operator != (const site_list_type &) const; bool operator < (const site_list_type &) const; bool operator <= (const site_list_type &) const; bool operator > (const site_list_type &) const; bool operator >= (const site_list_type &) const; }; typedef std::vector SiteList; /* user chosen sites */ extern SiteList site_list; /* potential sites */ extern SiteList all_site_list; class SiteSetting { public: SiteSetting (); void save (); ~SiteSetting (); private: bool saved; void getSavedSites(); void registerSavedSite(char const *); const char *lastMirrorKey(); }; #endif /* SETUP_SITE_H */