1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
|
2 /* |
|
3 * Copyright (C) 2007 Collabora Ltd. |
|
4 * |
|
5 * This program is free software; you can redistribute it and/or |
|
6 * modify it under the terms of the GNU Lesser General Public License as |
|
7 * published by the Free Software Foundation; either version 2 of the |
|
8 * License, or (at your option) any later version. |
|
9 * |
|
10 * This program is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 * Lesser General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU Lesser General Public |
|
16 * License along with this program; if not, write to the |
|
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
18 * Boston, MA 02111-1307, USA. |
|
19 */ |
|
20 |
|
21 #ifndef __LM_SASL_H__ |
|
22 #define __LM_SASL_H__ |
|
23 |
|
24 #if !defined (LM_INSIDE_LOUDMOUTH_H) && !defined (LM_COMPILATION) |
|
25 #error "Only <loudmouth/loudmouth.h> can be included directly, this file may disappear or change contents." |
|
26 #endif |
|
27 |
|
28 #include <glib.h> |
|
29 |
|
30 G_BEGIN_DECLS |
|
31 |
|
32 typedef struct _LmSASL LmSASL; |
|
33 |
|
34 typedef void (*LmSASLResultHandler) (LmSASL *sasl, |
|
35 LmConnection *connection, |
|
36 gboolean success, |
|
37 const gchar *reason); |
|
38 |
|
39 LmSASL *lm_sasl_new (LmConnection *connection); |
|
40 |
|
41 void lm_sasl_authenticate (LmSASL *sasl, |
|
42 const gchar *username, |
|
43 const gchar *password, |
|
44 const gchar *server, |
|
45 LmSASLResultHandler handler); |
|
46 |
|
47 void lm_sasl_free (LmSASL *sasl); |
|
48 |
|
49 void |
|
50 lm_sasl_get_auth_params (LmSASL *sasl, const gchar **username, |
|
51 const gchar **password); |
|
52 G_END_DECLS |
|
53 |
|
54 #endif /* __LM_SASL_H__ */ |
|
55 |
|