2 * @file sipe-webticket.h
6 * Copyright (C) 2011-2016 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
25 * Interface dependencies:
30 /* Forward declarations */
31 struct sipe_core_private
;
32 struct sipe_svc_session
;
37 * @param sipe_private SIPE core private data
38 * @param base_uri Web Service base URI
39 * @param auth_uri Web Service auth. URI (@c NULL when request aborted)
40 * @param wsse_security Web Ticket XML fragment (@c NULL when request failed)
41 * @param failure_msg Web Ticket error message (may be @c NULL)
42 * @param callback_data callback data
44 typedef void (sipe_webticket_callback
)(struct sipe_core_private
*sipe_private
,
45 const gchar
*base_uri
,
46 const gchar
*auth_uri
,
47 const gchar
*wsse_security
,
48 const gchar
*failure_msg
,
49 gpointer callback_data
);
52 * Request a Web Ticket for Web Service URI with port name
54 * NOTE: the callback can be called immediately if the Web Ticket is cached.
55 * The callback data must therefore be properly initialized already.
57 * @param sipe_private SIPE core private data
58 * @param base_uri Web Service base URI
59 * @param port_name Web Service authentication port name
60 * @param callback callback function
61 * @param callback_data callback data
62 * @return @c TRUE if web ticket fetch was triggered
64 gboolean
sipe_webticket_request_with_port(struct sipe_core_private
*sipe_private
,
65 struct sipe_svc_session
*session
,
66 const gchar
*base_uri
,
67 const gchar
*port_name
,
68 sipe_webticket_callback
*callback
,
69 gpointer callback_data
);
72 * Request a Web Ticket for Web Service URI with Authentication URI
74 * NOTE: the callback can be called immediately if the Web Ticket is cached.
75 * The callback data must therefore be properly initialized already.
77 * @param sipe_private SIPE core private data
79 * @param auth_uri Authentication URI
80 * @param callback callback function
81 * @param callback_data callback data
82 * @return @c TRUE if web ticket fetch was triggered
84 gboolean
sipe_webticket_request_with_auth(struct sipe_core_private
*sipe_private
,
85 struct sipe_svc_session
*session
,
86 const gchar
*base_uri
,
87 const gchar
*auth_uri
,
88 sipe_webticket_callback
*callback
,
89 gpointer callback_data
);
94 * @param sipe_private SIPE core private data
96 void sipe_webticket_free(struct sipe_core_private
*sipe_private
);