diff options
author | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2011-02-08 11:34:07 -0600 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-24 15:19:26 +0100 |
commit | 8a4d453b7c040845991c4ca900758fd7a4d37611 (patch) | |
tree | 91184740ecbbf6d87ea3dd5985455330e8d667a2 | |
parent | adabf28b68ae680a8b607d951a7291b27e3c39e2 (diff) | |
download | telepathy-glib-8a4d453b7c040845991c4ca900758fd7a4d37611.tar.gz |
Expose TpSimplePasswordChannel as public API
-rw-r--r-- | docs/reference/Makefile.am | 1 | ||||
-rw-r--r-- | docs/reference/telepathy-glib-docs.sgml | 1 | ||||
-rw-r--r-- | docs/reference/telepathy-glib-sections.txt | 18 | ||||
-rw-r--r-- | telepathy-glib/Makefile.am | 2 | ||||
-rw-r--r-- | telepathy-glib/simple-password-channel.c | 36 | ||||
-rw-r--r-- | telepathy-glib/simple-password-channel.h (renamed from telepathy-glib/simple-password-channel-internal.h) | 4 | ||||
-rw-r--r-- | telepathy-glib/simple-password-manager.c | 2 |
7 files changed, 50 insertions, 14 deletions
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am index 8e66d8f2d..9124c650b 100644 --- a/docs/reference/Makefile.am +++ b/docs/reference/Makefile.am @@ -82,7 +82,6 @@ IGNORE_HFILES=\ proxy-internal.h \ proxy-introspectable.h \ signalled-message-internal.h \ - simple-password-channel-internal.h \ util-internal.h # Images to copy into HTML directory. diff --git a/docs/reference/telepathy-glib-docs.sgml b/docs/reference/telepathy-glib-docs.sgml index 42168eb04..601df91c5 100644 --- a/docs/reference/telepathy-glib-docs.sgml +++ b/docs/reference/telepathy-glib-docs.sgml @@ -135,6 +135,7 @@ <xi:include href="xml/message-mixin.xml"/> <xi:include href="xml/message.xml"/> <xi:include href="xml/cm-message.xml"/> + <xi:include href="xml/simple-password-channel.xml"/> <xi:include href="xml/simple-password-manager.xml"/> <xi:include href="xml/base-client.xml"/> <xi:include href="xml/observe-channels-context.xml"/> diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt index d446cbbf1..2d2e2c44d 100644 --- a/docs/reference/telepathy-glib-sections.txt +++ b/docs/reference/telepathy-glib-sections.txt @@ -4894,6 +4894,24 @@ TpSimplePasswordManagerPrivate </SECTION> <SECTION> +<INCLUDE>telepathy-glib/simple-password-channel.h</INCLUDE> +<FILE>simple-password-channel</FILE> +<TITLE>simple-password-channel</TITLE> +TpSimplePasswordChannel +<SUBSECTION Standard> +tp_simple_password_channel_get_type +TP_TYPE_SIMPLE_PASSWORD_CHANNEL +TP_SIMPLE_PASSWORD_CHANNEL +TP_SIMPLE_PASSWORD_CHANNEL_CLASS +TP_SIMPLE_PASSWORD_CHANNEL_GET_CLASS +TP_IS_SIMPLE_PASSWORD_CHANNEL +TP_IS_SIMPLE_PASSWORD_CHANNEL_CLASS +TpSimplePasswordChannelClass +<SUBSECTION Private> +TpSimplePasswordChannelPrivate +</SECTION> + +<SECTION> <INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE> <FILE>base-protocol</FILE> <TITLE>base-protocol</TITLE> diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 25d203027..490549f5f 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -89,6 +89,7 @@ our_headers = \ simple-approver.h \ simple-handler.h \ simple-observer.h \ + simple-password-channel.h \ simple-password-manager.h \ stream-tube-channel.h \ stream-tube-connection.h \ @@ -232,7 +233,6 @@ libtelepathy_glib_internal_la_SOURCES = \ simple-handler.c \ simple-observer.c \ simple-password-manager.c \ - simple-password-channel-internal.h \ simple-password-channel.c \ stream-tube-channel.c \ stream-tube-connection-internal.h \ diff --git a/telepathy-glib/simple-password-channel.c b/telepathy-glib/simple-password-channel.c index 3de3c5c35..f3663cd0c 100644 --- a/telepathy-glib/simple-password-channel.c +++ b/telepathy-glib/simple-password-channel.c @@ -17,7 +17,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "telepathy-glib/simple-password-channel-internal.h" +/** + * SECTION:simple-password-channel + * @title: TpSimplePasswordChannel + * @short_description: a simple X-TELEPATHY-PASSWORD channel + * + * This class implements a SASL Authentication channel with the + * X-TELEPATHY-PASSWORD SASL mechanism. Most of the time, you should not use + * or instantiate this class directly. It is used by #TpSimplePasswordManager + * behind the scenes. In some special circumstances (e.g. when the authentication + * channel needs to implement additional interfaces), it may be necessary to + * create your own custom authentication channels instead of letting + * #TpSimplePasswordManager create them automatically. In this case, you + * should derive your channel from this class and then pass the channel as an + * argument to tp_simple_password_manager_prompt_for_channel_async(). + * + * Since: 0.13.UNRELEASED + */ + +#include "telepathy-glib/simple-password-channel.h" #include <telepathy-glib/dbus.h> #include <telepathy-glib/gtypes.h> @@ -32,7 +50,7 @@ static void sasl_auth_iface_init (gpointer g_iface, gpointer iface_data); -G_DEFINE_TYPE_WITH_CODE (TpSimplePasswordChannel, _tp_simple_password_channel, +G_DEFINE_TYPE_WITH_CODE (TpSimplePasswordChannel, tp_simple_password_channel, TP_TYPE_BASE_CHANNEL, G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_SERVER_AUTHENTICATION, NULL); @@ -91,7 +109,7 @@ struct _TpSimplePasswordChannelPrivate }; static void -_tp_simple_password_channel_init (TpSimplePasswordChannel *self) +tp_simple_password_channel_init (TpSimplePasswordChannel *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TYPE_SIMPLE_PASSWORD_CHANNEL, TpSimplePasswordChannelPrivate); @@ -107,8 +125,8 @@ tp_simple_password_channel_constructed (GObject *obj) TpHandleRepoIface *contact_handles = tp_base_connection_get_handles ( base_conn, TP_HANDLE_TYPE_CONTACT); - if (((GObjectClass *) _tp_simple_password_channel_parent_class)->constructed != NULL) - ((GObjectClass *) _tp_simple_password_channel_parent_class)->constructed (obj); + if (((GObjectClass *) tp_simple_password_channel_parent_class)->constructed != NULL) + ((GObjectClass *) tp_simple_password_channel_parent_class)->constructed (obj); priv->sasl_error = g_strdup (""); priv->sasl_error_details = tp_asv_new (NULL, NULL); @@ -174,7 +192,7 @@ static void tp_simple_password_channel_fill_immutable_properties (TpBaseChannel GHashTable *properties); static void -_tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_password_channel_class) +tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_password_channel_class) { TpBaseChannelClass *chan_class = TP_BASE_CHANNEL_CLASS ( tp_simple_password_channel_class); @@ -337,8 +355,8 @@ tp_simple_password_channel_finalize (GObject *object) priv->password = NULL; } - if (G_OBJECT_CLASS (_tp_simple_password_channel_parent_class)->finalize != NULL) - G_OBJECT_CLASS (_tp_simple_password_channel_parent_class)->finalize (object); + if (G_OBJECT_CLASS (tp_simple_password_channel_parent_class)->finalize != NULL) + G_OBJECT_CLASS (tp_simple_password_channel_parent_class)->finalize (object); } static void @@ -388,7 +406,7 @@ tp_simple_password_channel_fill_immutable_properties (TpBaseChannel *chan, GHashTable *properties) { TpBaseChannelClass *klass = TP_BASE_CHANNEL_CLASS ( - _tp_simple_password_channel_parent_class); + tp_simple_password_channel_parent_class); klass->fill_immutable_properties (chan, properties); diff --git a/telepathy-glib/simple-password-channel-internal.h b/telepathy-glib/simple-password-channel.h index fe26ab2d2..bf69ba21f 100644 --- a/telepathy-glib/simple-password-channel-internal.h +++ b/telepathy-glib/simple-password-channel.h @@ -45,11 +45,11 @@ struct _TpSimplePasswordChannel TpSimplePasswordChannelPrivate *priv; }; -GType _tp_simple_password_channel_get_type (void); +GType tp_simple_password_channel_get_type (void); /* TYPE MACROS */ #define TP_TYPE_SIMPLE_PASSWORD_CHANNEL \ - (_tp_simple_password_channel_get_type ()) + (tp_simple_password_channel_get_type ()) #define TP_SIMPLE_PASSWORD_CHANNEL(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TYPE_SIMPLE_PASSWORD_CHANNEL,\ TpSimplePasswordChannel)) diff --git a/telepathy-glib/simple-password-manager.c b/telepathy-glib/simple-password-manager.c index aa8983d0e..8bbe12395 100644 --- a/telepathy-glib/simple-password-manager.c +++ b/telepathy-glib/simple-password-manager.c @@ -75,7 +75,7 @@ #define DEBUG_FLAG TP_DEBUG_SASL #include "telepathy-glib/debug-internal.h" -#include "telepathy-glib/simple-password-channel-internal.h" +#include "telepathy-glib/simple-password-channel.h" static void channel_manager_iface_init (gpointer, gpointer); static void tp_simple_password_manager_close_all (TpSimplePasswordManager *self); |