Add weather_forecast object
[monky] / src / weather.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2  *
3  * Conky, a system monitor, based on torsmo
4  *
5  * Any original torsmo code is licensed under the BSD license
6  *
7  * All code written since the fork of torsmo is licensed under the GPL
8  *
9  * Please see COPYING for details
10  *
11  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
12  * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
13  *      (see AUTHORS)
14  * All rights reserved.
15  *
16  * This program is free software: you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation, either version 3 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24  * GNU General Public License for more details.
25  * You should have received a copy of the GNU General Public License
26  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
27  *
28  */
29
30 #ifndef WEATHER_H_
31 #define WEATHER_H_
32
33 #include "config.h"
34
35 /* WEATHER data */
36 typedef struct PWEATHER_ {
37         char lastupd[32];
38 #ifdef XOAP
39         char xoap_t[32];
40         char icon[3];
41 #endif /* XOAP */
42         int temp;
43         int dew;
44         int cc;
45         int bar;
46         int wind_s;
47         int wind_d;
48         int hmid;
49         int wc;
50 } PWEATHER;
51
52 #ifdef XOAP
53 typedef struct PWEATHER_FORECAST_ {
54         int hi[5];
55         int low[5];
56         char icon[5][3];
57         char xoap_t[5][32];
58         int wind_s[5];
59         int wind_d[5];
60         int hmid[5];
61         int ppcp[5];
62 } PWEATHER_FORECAST;
63 #endif /* XOAP */
64
65 /* Prototypes */
66 void weather_free_info(void);
67 void weather_process_info(char *p, int p_max_size, char *uri, char *data_type, int interval);
68 #ifdef XOAP
69 void weather_forecast_process_info(char *p, int p_max_size, char *uri, unsigned int day, char *data_type, int interval);
70 #endif /* XOAP */
71 int process_weather_uri(char *uri, char *locID, int dayf);
72
73 #ifdef XOAP
74 void load_xoap_keys(void);
75 #endif /* XOAP */
76
77
78 #endif /*WEATHER_H_*/