4 // Copyright (c) 2000-2002 Per Liden
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307,
22 #ifndef _TEMPERATURE_H_
23 #define _TEMPERATURE_H_
28 #define APPNAME "Temperature.app"
30 #define INSTANCENAME "temperature_app"
31 #define CLASSNAME "Temperature_app"
32 #define METAR_URL "http://weather.noaa.gov/pub/data/observations/metar/decoded/%s.TXT"
33 #define UPDATE_INTERVAL 900
36 #define TEMP_WITH_TIME_POS 42
37 #define TIME_FONT "-*-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"
38 #define AMPM_FONT "-*-helvetica-medium-r-*-*-8-*-*-*-*-*-*-*"
39 #define TEMP_FONT "-*-helvetica-medium-r-*-*-18-*-*-*-*-*-*-*"
40 #define UNIT_FONT "-*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*"
43 #define TMP_FILE "/tmp/temperature.app-XXXXXX"
58 Temperature(int argc
, char** argv
);
63 void tryHelp(char* appname
);
65 void checkArgument(char** argv
, int argc
, int index
);
66 void showErrorLed(bool show
);
68 void setTime(char* utcTime
);
69 bool updateTemperture(ifstream
& file
);
70 void showLed(bool show
);
85 bool mTime12HourFormat
;