Merging upstream version 0.7.0 (Closes: #493243, #510888, #567617, #699414, #709777...
[debian/lxpanel.git] / plugins / weather / yahooutil.h
1 /**
2 * Copyright (c) 2012-2014 Piotr Sipika; see the AUTHORS file for more.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * See the COPYRIGHT file for more information.
19 */
20
21 /* Provides utilities to use Yahoo's weather services */
22
23 #ifndef LXWEATHER_YAHOOUTIL_HEADER
24 #define LXWEATHER_YAHOOUTIL_HEADER
25
26 #include <glib.h>
27
28 /**
29 * Retrieves the details for the specified location
30 *
31 * @param pczLocation The string containing the name/code of the location
32 *
33 * @return A pointer to a list of LocationInfo entries, possibly empty,
34 * if no details were found. Caller is responsible for freeing the list.
35 */
36 GList *
37 getLocationInfo(const gchar * pczLocation);
38
39 /**
40 * Retrieves the forecast for the specified location WOEID
41 *
42 * @param pczWOEID The string containing the WOEID of the location
43 * @param czUnits The character containing the units for the forecast (c|f)
44 * @param pForecast The pointer to the forecast to be filled. If set to NULL,
45 * a new one will be allocated.
46 *
47 */
48 void
49 getForecastInfo(const gchar * pczWOEID, const gchar czUnits, gpointer pForecast);
50
51 /**
52 * Initializes the internals: XML and HTTP
53 *
54 */
55 void
56 initializeYahooUtil(void);
57
58 /**
59 * Cleans up the internals: XML and HTTP
60 *
61 */
62 void
63 cleanupYahooUtil(void);
64
65 #endif