1 // ---------------------------------------------------------------------------- 2 // dxcc.h 3 // 4 // Copyright (C) 2009 5 // Stelios Bounanos, M0GLD 6 // 7 // This file is part of fldigi. 8 // 9 // Fldigi is free software: you can redistribute it and/or modify 10 // it under the terms of the GNU General Public License as published by 11 // the Free Software Foundation, either version 3 of the License, or 12 // (at your option) any later version. 13 // 14 // Fldigi is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with fldigi. If not, see <http://www.gnu.org/licenses/>. 21 // ---------------------------------------------------------------------------- 22 23 #ifndef DXCC_H_ 24 #define DXCC_H_ 25 26 #include <vector> 27 #include <string> 28 #include <iostream> 29 30 struct dxcc { 31 const char* country; 32 int cq_zone; 33 int itu_zone; 34 char continent[3]; 35 float latitude; 36 float longitude; 37 float gmt_offset; 38 dxcc(const char* cn = "", int cq = 0, int itu = 0, const char* ct = "", 39 float lat = 0.0f, float lon = 0.0f, float tz = 0.0f); printdxcc40 void print() { 41 std::cout << country << ", " 42 << cq_zone << ", " 43 << itu_zone << ", " 44 << continent << ", " 45 << latitude << ", " 46 << longitude << ", " 47 << gmt_offset << "\n"; 48 } 49 }; 50 51 enum qsl_t { QSL_LOTW, QSL_EQSL, QSL_END }; 52 extern const char* qsl_names[]; 53 54 bool dxcc_open(const char* filename); 55 bool dxcc_is_open(void); 56 void dxcc_close(void); 57 const dxcc* dxcc_lookup(const char* callsign); 58 const std::vector<dxcc*>* dxcc_entity_list(void); 59 60 extern std::string cbolist; 61 62 bool qsl_open(const char* filename, qsl_t qsl_type); 63 unsigned char qsl_is_open(void); 64 void qsl_close(void); 65 unsigned char qsl_lookup(const char* callsign); 66 67 extern void reload_cty_dat(); 68 extern void default_cty_dat_pathname(); 69 extern void select_cty_dat_pathname(); 70 71 #endif // DXCC_H_ 72