Clarify weather opts, refactor some weather code.
[monky] / src / weather.h
1 /* Conky, a system monitor, based on torsmo
2  *
3  * Any original torsmo code is licensed under the BSD license
4  *
5  * All code written since the fork of torsmo is licensed under the GPL
6  *
7  * Please see COPYING for details
8  *
9  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
10  * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
11  *      (see AUTHORS)
12  * All rights reserved.
13  *
14  * This program is free software: you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation, either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU General Public License for more details.
23  * You should have received a copy of the GNU General Public License
24  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
25  *
26  */
27
28 #ifndef WEATHER_H_
29 #define WEATHER_H_
30
31 #include "config.h"
32
33 /* WEATHER data */
34 typedef struct PWEATHER_ {
35         char lastupd[32];
36 #ifdef XOAP
37         char xoap_t[32];
38         /*
39          * TODO:
40          * Is it worth investigating about using icons from weather.com?
41          * We could use them for data from noaa as well.
42          * They can display nicely with cimlib_add_image (with appropriate
43          * #ifdefs on imlib2 and x11), and an additional input argoment for position.
44
45          char icon[3];
46
47          */
48 #endif /* XOAP */
49         int temp;
50         int dew;
51         int cc;
52         int bar;
53         int wind_s;
54         int wind_d;
55         int hmid;
56         int wc;
57 } PWEATHER;
58
59 /* Prototypes */
60 void weather_free_info(void);
61 void weather_process_info(char *p, int p_max_size, char *uri, char *data_type, int interval);
62 int process_weather_uri(char *uri, char *locID);
63
64 #ifdef XOAP
65 void load_xoap_keys(void);
66 #endif /* XOAP */
67
68
69 #endif /*WEATHER_H_*/