1 /*
2 
3    xlog - GTK+ logging program for amateur radio operators
4    Copyright (C) 2001 - 2008 Joop Stakenborg <pg4i@amsat.org>
5 
6    This file is part of xlog.
7 
8    Xlog is free software: you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation, either version 3 of the License, or
11    (at your option) any later version.
12 
13    Xlog is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17 
18    You should have received a copy of the GNU General Public License
19    along with xlog.  If not, see <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 /*
24  * dxcc.h
25  */
26 #ifndef DXCC_H
27 #define DXCC_H
28 
29 /* struct for dxcc information from cty.dat */
30 typedef struct
31 {
32 	gchar *countryname;
33 	guchar cq;              /* guchar max=255 */
34 	guchar itu;
35 	guchar continent;
36 	gint latitude;
37 	gint longitude;
38 	gshort timezone;
39 	gchar *px;
40 	gchar *exceptions;
41 	guint worked;
42 	guint confirmed;
43 }
44 dxcc_data;
45 
46 /* struct for dxcc information from area.dat */
47 typedef struct
48 {
49 	gchar *countryname;
50 	guchar cq;              /* guchar max=255 */
51 	guchar itu;
52 	gchar *continent;
53 	gint latitude;
54 	gint longitude;
55 	gshort timezone;
56 	gchar *px;
57 }
58 area_data;
59 
60 struct info
61 {
62 	guint country;
63 	guint cq;
64 	guint itu;
65 	guint continent;
66 };
67 
68 void cleanup_dxcc (void);
69 void cleanup_area (void);
70 gint readctyversion (void);
71 gint readctydata (void);
72 gint readareadata (void);
73 void updatedxccframe (gchar * item, gboolean byprefix, gint st, gint zone, gint cont, guint iota);
74 void update_dxccscoring (void);
75 void update_wacscoring (void);
76 void update_wasscoring (void);
77 void update_wazscoring (void);
78 void update_iotascoring (void);
79 void update_locscoring (void);
80 void fill_scoring_arrays (void);
81 struct info lookupcountry_by_callsign (gchar * callsign);
82 struct info lookupcountry_by_prefix (gchar * px);
83 
84 void hash_inc(GHashTable *hash_table, const gchar *key);
85 void hash_dec(GHashTable *hash_table, const gchar *key);
86 void iota_new_qso(guint iota, gint f, gboolean qslconfirmed);
87 void iota_del_qso(guint iota, gint f, gboolean qslconfirmed);
88 void loc_new_qso(const gchar *locator, gint f, gboolean qslconfirmed);
89 void loc_del_qso(const gchar *locator, gint f, gboolean qslconfirmed);
90 gchar *loc_norm(const gchar *locator);
91 
92 #endif	/* DXCC_H */
93