]> git.0d.be Git - empathy.git/blob - libempathy/empathy-sasl-mechanisms.h
Updated Spanish Translation
[empathy.git] / libempathy / empathy-sasl-mechanisms.h
1 /*
2  * empathy-sasl-mechanisms.h - Header for SASL authentication mechanisms
3  * Copyright (C) 2012 Collabora Ltd.
4  * @author Xavier Claessens <xavier.claessens@collabora.co.uk>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  */
20
21 #ifndef __EMPATHY_SASL_MECHANISMS_H__
22 #define __EMPATHY_SASL_MECHANISMS_H__
23
24 #include <telepathy-glib/telepathy-glib.h>
25
26 G_BEGIN_DECLS
27
28 typedef enum
29 {
30   EMPATHY_SASL_MECHANISM_UNSUPPORTED,
31   EMPATHY_SASL_MECHANISM_FACEBOOK,
32   EMPATHY_SASL_MECHANISM_WLM,
33   EMPATHY_SASL_MECHANISM_GOOGLE,
34   EMPATHY_SASL_MECHANISM_PASSWORD,
35 } EmpathySaslMechanism;
36
37 void empathy_sasl_auth_facebook_async (TpChannel *channel,
38     const gchar *client_id,
39     const gchar *access_token,
40     GAsyncReadyCallback callback,
41     gpointer user_data);
42
43 void empathy_sasl_auth_wlm_async (TpChannel *channel,
44     const gchar *access_token,
45     GAsyncReadyCallback callback,
46     gpointer user_data);
47
48 void empathy_sasl_auth_google_async (TpChannel *channel,
49     const gchar *username,
50     const gchar *access_token,
51     GAsyncReadyCallback callback,
52     gpointer user_data);
53
54 void empathy_sasl_auth_password_async (TpChannel *channel,
55     const gchar *password,
56     GAsyncReadyCallback callback,
57     gpointer user_data);
58
59 gboolean empathy_sasl_auth_finish (TpChannel *channel,
60     GAsyncResult *result,
61     GError **error);
62
63 gboolean empathy_sasl_channel_supports_mechanism (TpChannel *channel,
64     const gchar *mechanism);
65
66 EmpathySaslMechanism empathy_sasl_channel_select_mechanism (TpChannel *channel);
67
68 G_END_DECLS
69
70 #endif /* #ifndef __EMPATHY_SASL_MECHANISMS_H__*/