2 * empathy-server-sasl-handler.h - Header for EmpathyServerSASLHandler
3 * Copyright (C) 2010 Collabora Ltd.
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.
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.
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
20 #ifndef __EMPATHY_SERVER_SASL_HANDLER_H__
21 #define __EMPATHY_SERVER_SASL_HANDLER_H__
23 #include <glib-object.h>
26 #include <telepathy-glib/telepathy-glib.h>
30 typedef struct _EmpathyServerSASLHandler EmpathyServerSASLHandler;
31 typedef struct _EmpathyServerSASLHandlerClass EmpathyServerSASLHandlerClass;
33 struct _EmpathyServerSASLHandlerClass {
34 GObjectClass parent_class;
37 struct _EmpathyServerSASLHandler {
42 GType empathy_server_sasl_handler_get_type (void);
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))
60 void empathy_server_sasl_handler_new_async (
61 TpAccount *account, TpChannel *channel,
62 GAsyncReadyCallback callback, gpointer user_data);
64 EmpathyServerSASLHandler * empathy_server_sasl_handler_new_finish (
65 GAsyncResult *result, GError **error);
67 void empathy_server_sasl_handler_provide_password (
68 EmpathyServerSASLHandler *handler, const gchar *password,
71 void empathy_server_sasl_handler_cancel (EmpathyServerSASLHandler *handler);
73 TpAccount * empathy_server_sasl_handler_get_account (
74 EmpathyServerSASLHandler *handler);
76 TpChannel * empathy_server_sasl_handler_get_channel (
77 EmpathyServerSASLHandler *handler);
79 gboolean empathy_server_sasl_handler_has_password (
80 EmpathyServerSASLHandler *handler);
82 gboolean empathy_server_sasl_handler_can_save_response_somewhere (
83 EmpathyServerSASLHandler *self);
87 #endif /* #ifndef __EMPATHY_SERVER_SASL_HANDLER_H__*/