2 * fgcom - VoIP-Client for the FlightGear-Radio-Infrastructure
4 * This program realizes the usage of the VoIP infractructure based
5 * on flight data which is send from FlightGear with an external
6 * protocol to this application.
8 * Clement de l'Hamaide - Jan 2014
9 * Re-writting of FGCom standalone
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
31 // avoid name clash with winerror.h
32 #define FGC_SUCCESS(__x__) (__x__ == 0)
33 #define FGC_FAILED(__x__) (__x__ < 0)
36 #define snprintf _snprintf
38 typedef __int64 ssize_t;
56 #ifdef FLIGHTGEAR_VERSION
57 #define FGCOM_VERSION FLIGHTGEAR_VERSION
59 #define FGCOM_VERSION "unknown"
63 #define MAXBUFLEN 1024
101 // Internal functions
104 void quit(int state);
105 bool isInRange(std::string icao, double acftLat, double acftLon, double acftAlt);
106 std::string computePhoneNumber(double freq, std::string icao, bool atis = false);
107 std::string getClosestAirportForFreq(double freq, double acftLat, double acftLon, double acftAlt);
108 std::multimap<int, Airport> getAirportsData();
114 bool lib_call(std::string icao, double freq);
115 bool lib_directCall(std::string icao, double freq, std::string num);
117 int lib_registration();
118 int iaxc_callback(iaxc_event e);
120 void lib_setSilenceThreshold(double thd);
121 void lib_setCallerId(std::string callsign);
122 void lib_setVolume(double input, double output);