]> git.0d.be Git - empathy.git/blob - libempathy/empathy-server-sasl-handler.h
UOA: Do not segfault when "Done" or "Cancel" button clicked but widget is not ready yet
[empathy.git] / libempathy / empathy-server-sasl-handler.h
1 /*
2  * empathy-server-sasl-handler.h - Header for EmpathyServerSASLHandler
3  * Copyright (C) 2010 Collabora Ltd.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library 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 library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 #ifndef __EMPATHY_SERVER_SASL_HANDLER_H__
21 #define __EMPATHY_SERVER_SASL_HANDLER_H__
22
23 #include <glib-object.h>
24 #include <gio/gio.h>
25
26 #include <telepathy-glib/telepathy-glib.h>
27
28 G_BEGIN_DECLS
29
30 typedef struct _EmpathyServerSASLHandler EmpathyServerSASLHandler;
31 typedef struct _EmpathyServerSASLHandlerClass EmpathyServerSASLHandlerClass;
32
33 struct _EmpathyServerSASLHandlerClass {
34     GObjectClass parent_class;
35 };
36
37 struct _EmpathyServerSASLHandler {
38     GObject parent;
39     gpointer priv;
40 };
41
42 GType empathy_server_sasl_handler_get_type (void);
43
44 #define EMPATHY_TYPE_SERVER_SASL_HANDLER \
45   (empathy_server_sasl_handler_get_type ())
46 #define EMPATHY_SERVER_SASL_HANDLER(obj) \
47   (G_TYPE_CHECK_INSTANCE_CAST((obj), EMPATHY_TYPE_SERVER_SASL_HANDLER, \
48     EmpathyServerSASLHandler))
49 #define EMPATHY_SERVER_SASL_HANDLER_CLASS(klass) \
50   (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_SERVER_SASL_HANDLER, \
51   EmpathyServerSASLHandlerClass))
52 #define EMPATHY_IS_SERVER_SASL_HANDLER(obj) \
53   (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_SERVER_SASL_HANDLER))
54 #define EMPATHY_IS_SERVER_SASL_HANDLER_CLASS(klass) \
55   (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_SERVER_SASL_HANDLER))
56 #define EMPATHY_SERVER_SASL_HANDLER_GET_CLASS(obj) \
57   (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_SERVER_SASL_HANDLER, \
58   EmpathyServerSASLHandlerClass))
59
60 void empathy_server_sasl_handler_new_async (
61     TpAccount *account, TpChannel *channel,
62     GAsyncReadyCallback callback, gpointer user_data);
63
64 EmpathyServerSASLHandler * empathy_server_sasl_handler_new_finish (
65     GAsyncResult *result, GError **error);
66
67 void empathy_server_sasl_handler_provide_password (
68     EmpathyServerSASLHandler *handler, const gchar *password,
69     gboolean remember);
70
71 void empathy_server_sasl_handler_cancel (EmpathyServerSASLHandler *handler);
72
73 TpAccount * empathy_server_sasl_handler_get_account (
74     EmpathyServerSASLHandler *handler);
75
76 TpChannel * empathy_server_sasl_handler_get_channel (
77     EmpathyServerSASLHandler *handler);
78
79 gboolean empathy_server_sasl_handler_has_password (
80     EmpathyServerSASLHandler *handler);
81
82 gboolean empathy_server_sasl_handler_can_save_response_somewhere (
83     EmpathyServerSASLHandler *self);
84
85 G_END_DECLS
86
87 #endif /* #ifndef __EMPATHY_SERVER_SASL_HANDLER_H__*/