diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-07-13 18:05:38 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-07-18 20:26:27 +0800 |
commit | 2e74f7c0c092d4930fe690085d76a6fbd7d27e29 (patch) | |
tree | 88bbbfc6095913028bcf1de698a41f803523214e /libempathy/empathy-sasl-mechanisms.h | |
parent | 4c7c9410f125620408089ee95a20bd750b055e48 (diff) | |
download | gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar.gz gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar.bz2 gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar.lz gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar.xz gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.tar.zst gsoc2013-empathy-2e74f7c0c092d4930fe690085d76a6fbd7d27e29.zip |
Move SASL mechanism implementations into its own file
We could have other account providers than GOA requiring
this SASL code.
https://bugzilla.gnome.org/show_bug.cgi?id=680160
Diffstat (limited to 'libempathy/empathy-sasl-mechanisms.h')
-rw-r--r-- | libempathy/empathy-sasl-mechanisms.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libempathy/empathy-sasl-mechanisms.h b/libempathy/empathy-sasl-mechanisms.h new file mode 100644 index 000000000..84165ac70 --- /dev/null +++ b/libempathy/empathy-sasl-mechanisms.h @@ -0,0 +1,57 @@ +/* + * empathy-sasl-mechanisms.h - Header for SASL authentication mechanisms + * Copyright (C) 2012 Collabora Ltd. + * @author Xavier Claessens <xavier.claessens@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __EMPATHY_SASL_MECHANISMS_H__ +#define __EMPATHY_SASL_MECHANISMS_H__ + +#include <telepathy-glib/telepathy-glib.h> + +G_BEGIN_DECLS + +typedef enum +{ + EMPATHY_SASL_MECHANISM_UNSUPPORTED, + EMPATHY_SASL_MECHANISM_FACEBOOK, + EMPATHY_SASL_MECHANISM_WLM, +} EmpathySaslMechanism; + +void empathy_sasl_auth_facebook_async (TpChannel *channel, + const gchar *client_id, + const gchar *access_token, + GAsyncReadyCallback callback, + gpointer user_data); + +void empathy_sasl_auth_wlm_async (TpChannel *channel, + const gchar *access_token, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean empathy_sasl_auth_finish (TpChannel *channel, + GAsyncResult *result, + GError **error); + +gboolean empathy_sasl_channel_supports_mechanism (TpChannel *channel, + const gchar *mechanism); + +EmpathySaslMechanism empathy_sasl_channel_select_mechanism (TpChannel *channel); + +G_END_DECLS + +#endif /* #ifndef __EMPATHY_SASL_MECHANISMS_H__*/ |