]>
Commit | Line | Data |
---|---|---|
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 */ | |
20 | #include <strings.h> | |
21 | #include "list.h" | |
22 | ||
23 | class site_list_type | |
24 | { | |
25 | public: | |
26 | site_list_type () : url(0), displayed_url (0), key (0) {}; | |
27 | site_list_type (char const *); | |
28 | /* workaround for missing placement new in gcc 2.95 */ | |
29 | void init (char const *); | |
30 | ~site_list_type () | |
31 | { | |
32 | if (url) | |
33 | free (url); | |
34 | if (displayed_url) | |
35 | free (displayed_url); | |
36 | if (key) | |
37 | free (key); | |
38 | }; | |
39 | char *url; | |
40 | char *displayed_url; | |
41 | char *key; | |
42 | }; | |
43 | ||
44 | /* user chosen sites */ | |
45 | extern list <site_list_type, const char *, strcasecmp> site_list; | |
46 | /* potential sites */ | |
47 | extern list <site_list_type, const char *, strcasecmp> all_site_list; | |
48 | ||
49 | void save_site_url (); | |
50 | ||
51 | #endif /* _SITE_H_ */ |