Merging upstream version 0.7.0 (Closes: #493243, #510888, #567617, #699414, #709777...
[debian/lxpanel.git] / plugins / weather / httputil.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 http protocol utility functions */
22
23 #ifndef LXWEATHER_HTTPUTIL_HEADER
24 #define LXWEATHER_HTTPUTIL_HEADER
25
26 #include <glib.h>
27
28 static const gint HTTP_STATUS_OK = 200;
29
30 /**
31 * Returns the contents of the requested URL
32 *
33 * @param pczURL The URL to retrieve [in].
34 * @param piRetCode The return code supplied with the response [out].
35 * @param piDataSize The resulting data length [out].
36 *
37 * @return A pointer to a null-terminated buffer containing the textual
38 * representation of the response. Must be freed by the caller.
39 */
40 gpointer
41 getURL(const gchar * pczURL, gint * piRetCode, gint * piDataSize);
42
43 #endif