6 * Copyright (C) 2013 SIPE Project <http://sipe.sourceforge.net/>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 /* Public interface to HTTP request service */
27 * Interface dependencies:
32 /* Forward declarations */
33 struct sipe_core_private
;
34 struct sipe_http_request
;
39 * @param sipe_private SIPE core private data
41 void sipe_http_free(struct sipe_core_private
*sipe_private
);
44 * Cancel pending HTTP request
46 * @param pointer to opaque HTTP request data structure
48 void sipe_http_request_cancel(struct sipe_http_request
*request
);
51 * Create HTTP GET request
53 * @param sipe_private SIPE core private data
55 * @param headers additional headers (may be @c NULL)
57 * @return pointer to opaque HTTP request data structure (@c NULL if failed)
59 struct sipe_http_request
*sipe_http_request_get(struct sipe_core_private
*sipe_private
,
61 const gchar
*headers
);
64 * Create HTTP POST request
66 * @param sipe_private SIPE core private data
68 * @param headers additional headers (may be @c NULL)
69 * @param body body contents
70 * @param content_type body content type
72 * @return pointer to opaque HTTP request data structure (@c NULL if failed)
74 struct sipe_http_request
*sipe_http_request_post(struct sipe_core_private
*sipe_private
,
78 const gchar
*content_type
);