tlsdsk: clean up user/login name usage
[siplcs.git] / src / core / sipe-svc.h
blob8f1af4b8bebef12911b2ab92087d0f3ffafb841c
1 /**
2 * @file sipe-svc.h
4 * pidgin-sipe
6 * Copyright (C) 2011 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:
27 * <glib.h>
30 /* Forward declarations */
31 struct sipe_core_private;
32 struct sipe_tls_random;
33 struct _sipe_xml;
35 /**
36 * Service XML callback
38 * @param sipe_private SIPE core private data
39 * @param uri service URI (NULL when request aborted)
40 * @param raw raw XML data (NULL when request failed)
41 * @param xml parsed XML data (NULL when request failed)
42 * @param callback_data callback data
44 typedef void (sipe_svc_callback)(struct sipe_core_private *sipe_private,
45 const gchar *uri,
46 const gchar *raw,
47 struct _sipe_xml *xml,
48 gpointer callback_data);
50 /**
51 * Trigger fetch of Get & Publish certificate
53 * @param sipe_private SIPE core private data
54 * @param uri service URI
55 * @param wsse_security predefined authentication token
56 * @param certreq certificate request (Base64 encoded)
57 * @param callback callback function
58 * @param callback_data callback data
59 * @return @c TRUE if token fetch was triggered
61 gboolean sipe_svc_get_and_publish_cert(struct sipe_core_private *sipe_private,
62 const gchar *uri,
63 const gchar *wsse_security,
64 const gchar *certreq,
65 sipe_svc_callback *callback,
66 gpointer callback_data);
68 /**
69 * Trigger fetch of WebTicket security token
71 * @param sipe_private SIPE core private data
72 * @param uri service URI
73 * @param wsse_security predefined authentication token. May be @c NULL
74 * @param service_uri request token for this service URI
75 * @param entropy random bytes buffer for entropy
76 * @param callback callback function
77 * @param callback_data callback data
78 * @return @c TRUE if token fetch was triggered
80 gboolean sipe_svc_webticket(struct sipe_core_private *sipe_private,
81 const gchar *uri,
82 const gchar *wsse_security,
83 const gchar *service_uri,
84 const struct sipe_tls_random *entropy,
85 sipe_svc_callback *callback,
86 gpointer callback_data);
88 /**
89 * Trigger fetch of WebTicket security token from login.microsoftonline.com
91 * @param sipe_private SIPE core private data
92 * @param service_uri request token for this service URI
93 * @param callback callback function
94 * @param callback_data callback data
95 * @return @c TRUE if token fetch was triggered
97 gboolean sipe_svc_webticket_lmc(struct sipe_core_private *sipe_private,
98 const gchar *service_uri,
99 sipe_svc_callback *callback,
100 gpointer callback_data);
103 * Trigger fetch of service metadata
105 * @param sipe_private SIPE core private data
106 * @param uri service URI
107 * @param callback callback function
108 * @param callback_data callback data
109 * @return @c TRUE if metadata fetch was triggered
111 gboolean sipe_svc_metadata(struct sipe_core_private *sipe_private,
112 const gchar *uri,
113 sipe_svc_callback *callback,
114 gpointer callback_data);
117 * Free service data
119 * @param sipe_private SIPE core private data
121 void sipe_svc_free(struct sipe_core_private *sipe_private);