summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2011-02-23 22:14:02 -0600
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-24 15:19:26 +0100
commit4dcc2a8524986092696b2fdf287962edf1719a16 (patch)
treec4ec64362d69c5981300852e54956c413e987dc5
parentab3968c64b3fb093d972c222c38802292e8e1bd9 (diff)
downloadtelepathy-glib-4dcc2a8524986092696b2fdf287962edf1719a16.tar.gz
Rename TpSimplePasswordChannel to TpBasePasswordChannel
Server-side base classes tend to be named TpBase*, so rename this class to make it more consistent with other base classes to be used by CMs.
-rw-r--r--docs/reference/telepathy-glib-sections.txt26
-rw-r--r--telepathy-glib/Makefile.am4
-rw-r--r--telepathy-glib/base-password-channel.c148
-rw-r--r--telepathy-glib/base-password-channel.h52
-rw-r--r--telepathy-glib/simple-password-manager.c20
-rw-r--r--telepathy-glib/simple-password-manager.h6
6 files changed, 128 insertions, 128 deletions
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 11bc1d274..f79415cbd 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -4895,21 +4895,21 @@ TpSimplePasswordManagerPrivate
</SECTION>
<SECTION>
-<INCLUDE>telepathy-glib/simple-password-channel.h</INCLUDE>
-<FILE>simple-password-channel</FILE>
-<TITLE>simple-password-channel</TITLE>
-TpSimplePasswordChannel
+<INCLUDE>telepathy-glib/base-password-channel.h</INCLUDE>
+<FILE>base-password-channel</FILE>
+<TITLE>base-password-channel</TITLE>
+TpBasePasswordChannel
<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
+tp_base_password_channel_get_type
+TP_TYPE_BASE_PASSWORD_CHANNEL
+TP_BASE_PASSWORD_CHANNEL
+TP_BASE_PASSWORD_CHANNEL_CLASS
+TP_BASE_PASSWORD_CHANNEL_GET_CLASS
+TP_IS_BASE_PASSWORD_CHANNEL
+TP_IS_BASE_PASSWORD_CHANNEL_CLASS
+TpBasePasswordChannelClass
<SUBSECTION Private>
-TpSimplePasswordChannelPrivate
+TpBasePasswordChannelPrivate
</SECTION>
<SECTION>
diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am
index 490549f5f..8d2aacb9f 100644
--- a/telepathy-glib/Makefile.am
+++ b/telepathy-glib/Makefile.am
@@ -32,6 +32,7 @@ our_headers = \
base-channel.h \
base-connection.h \
base-connection-manager.h \
+ base-password-channel.h \
base-protocol.h \
basic-proxy-factory.h \
channel.h \
@@ -89,7 +90,6 @@ 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 \
@@ -151,6 +151,7 @@ libtelepathy_glib_internal_la_SOURCES = \
base-connection.c \
base-connection-internal.h \
base-connection-manager.c \
+ base-password-channel.c \
base-protocol-internal.h \
base-protocol.c \
basic-proxy-factory.c \
@@ -233,7 +234,6 @@ libtelepathy_glib_internal_la_SOURCES = \
simple-handler.c \
simple-observer.c \
simple-password-manager.c \
- simple-password-channel.c \
stream-tube-channel.c \
stream-tube-connection-internal.h \
stream-tube-connection.c \
diff --git a/telepathy-glib/base-password-channel.c b/telepathy-glib/base-password-channel.c
index 877aecfd5..b98488531 100644
--- a/telepathy-glib/base-password-channel.c
+++ b/telepathy-glib/base-password-channel.c
@@ -1,5 +1,5 @@
/*
- * simple_password-channel.c - Source for TpSimplePasswordChannel
+ * base-password-channel.c - Source for TpBasePasswordChannel
* Copyright (C) 2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -18,24 +18,24 @@
*/
/**
- * SECTION:simple-password-channel
- * @title: TpSimplePasswordChannel
+ * SECTION:base-password-channel
+ * @title: TpBasePasswordChannel
* @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
+ * or instantiate this class directly. It is used by #TpBasePasswordManager
* 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
+ * #TpBasePasswordManager 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().
+ * argument to tp_base_password_manager_prompt_for_channel_async().
*
* Since: 0.13.UNRELEASED
*/
-#include "telepathy-glib/simple-password-channel.h"
+#include "telepathy-glib/base-password-channel.h"
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
@@ -50,19 +50,19 @@
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 (TpBasePasswordChannel, tp_base_password_channel,
TP_TYPE_BASE_CHANNEL,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_SERVER_AUTHENTICATION,
NULL);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_SASL_AUTHENTICATION,
sasl_auth_iface_init));
-static const gchar *tp_simple_password_channel_interfaces[] = {
+static const gchar *tp_base_password_channel_interfaces[] = {
TP_IFACE_CHANNEL_INTERFACE_SASL_AUTHENTICATION,
NULL
};
-static const gchar *tp_simple_password_channel_available_mechanisms[] = {
+static const gchar *tp_base_password_channel_available_mechanisms[] = {
"X-TELEPATHY-PASSWORD",
NULL
};
@@ -95,7 +95,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-struct _TpSimplePasswordChannelPrivate
+struct _TpBasePasswordChannelPrivate
{
TpSASLStatus sasl_status;
gchar *sasl_error;
@@ -112,24 +112,24 @@ struct _TpSimplePasswordChannelPrivate
};
static void
-tp_simple_password_channel_init (TpSimplePasswordChannel *self)
+tp_base_password_channel_init (TpBasePasswordChannel *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- TP_TYPE_SIMPLE_PASSWORD_CHANNEL, TpSimplePasswordChannelPrivate);
+ TP_TYPE_BASE_PASSWORD_CHANNEL, TpBasePasswordChannelPrivate);
}
static void
-tp_simple_password_channel_constructed (GObject *obj)
+tp_base_password_channel_constructed (GObject *obj)
{
- TpSimplePasswordChannel *chan = TP_SIMPLE_PASSWORD_CHANNEL (obj);
- TpSimplePasswordChannelPrivate *priv = chan->priv;
+ TpBasePasswordChannel *chan = TP_BASE_PASSWORD_CHANNEL (obj);
+ TpBasePasswordChannelPrivate *priv = chan->priv;
TpBaseConnection *base_conn = tp_base_channel_get_connection (
TP_BASE_CHANNEL (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_base_password_channel_parent_class)->constructed != NULL)
+ ((GObjectClass *) tp_base_password_channel_parent_class)->constructed (obj);
priv->sasl_error = g_strdup ("");
priv->sasl_error_details = tp_asv_new (NULL, NULL);
@@ -141,13 +141,13 @@ tp_simple_password_channel_constructed (GObject *obj)
}
static void
-tp_simple_password_channel_set_property (GObject *object,
+tp_base_password_channel_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpSimplePasswordChannel *chan = TP_SIMPLE_PASSWORD_CHANNEL (object);
- TpSimplePasswordChannelPrivate *priv = chan->priv;
+ TpBasePasswordChannel *chan = TP_BASE_PASSWORD_CHANNEL (object);
+ TpBasePasswordChannelPrivate *priv = chan->priv;
switch (property_id)
{
@@ -161,13 +161,13 @@ tp_simple_password_channel_set_property (GObject *object,
}
static void
-tp_simple_password_channel_get_property (GObject *object,
+tp_base_password_channel_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpSimplePasswordChannel *chan = TP_SIMPLE_PASSWORD_CHANNEL (object);
- TpSimplePasswordChannelPrivate *priv = chan->priv;
+ TpBasePasswordChannel *chan = TP_BASE_PASSWORD_CHANNEL (object);
+ TpBasePasswordChannelPrivate *priv = chan->priv;
switch (property_id)
{
@@ -177,7 +177,7 @@ tp_simple_password_channel_get_property (GObject *object,
break;
case PROP_AVAILABLE_MECHANISMS:
g_value_set_boxed (value,
- tp_simple_password_channel_available_mechanisms);
+ tp_base_password_channel_available_mechanisms);
break;
case PROP_HAS_INITIAL_DATA:
g_value_set_boolean (value, TRUE);
@@ -212,18 +212,18 @@ tp_simple_password_channel_get_property (GObject *object,
}
}
-static void tp_simple_password_channel_finalize (GObject *object);
-static void tp_simple_password_channel_close (TpBaseChannel *base);
-static void tp_simple_password_channel_fill_immutable_properties (TpBaseChannel *chan,
+static void tp_base_password_channel_finalize (GObject *object);
+static void tp_base_password_channel_close (TpBaseChannel *base);
+static void tp_base_password_channel_fill_immutable_properties (TpBaseChannel *chan,
GHashTable *properties);
static void
-tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_password_channel_class)
+tp_base_password_channel_class_init (TpBasePasswordChannelClass *tp_base_password_channel_class)
{
TpBaseChannelClass *chan_class = TP_BASE_CHANNEL_CLASS (
- tp_simple_password_channel_class);
+ tp_base_password_channel_class);
- static TpDBusPropertiesMixinPropImpl server_simple_password_props[] = {
+ static TpDBusPropertiesMixinPropImpl server_base_password_props[] = {
{ "AuthenticationMethod", "authentication-method", NULL },
{ NULL }
};
@@ -244,7 +244,7 @@ tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_p
{ TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION,
tp_dbus_properties_mixin_getter_gobject_properties,
NULL,
- server_simple_password_props,
+ server_base_password_props,
},
{ TP_IFACE_CHANNEL_INTERFACE_SASL_AUTHENTICATION,
tp_dbus_properties_mixin_getter_gobject_properties,
@@ -253,23 +253,23 @@ tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_p
},
{ NULL }
};
- GObjectClass *object_class = G_OBJECT_CLASS (tp_simple_password_channel_class);
+ GObjectClass *object_class = G_OBJECT_CLASS (tp_base_password_channel_class);
GParamSpec *param_spec;
- g_type_class_add_private (tp_simple_password_channel_class,
- sizeof (TpSimplePasswordChannelPrivate));
+ g_type_class_add_private (tp_base_password_channel_class,
+ sizeof (TpBasePasswordChannelPrivate));
- object_class->constructed = tp_simple_password_channel_constructed;
- object_class->set_property = tp_simple_password_channel_set_property;
- object_class->get_property = tp_simple_password_channel_get_property;
- object_class->finalize = tp_simple_password_channel_finalize;
+ object_class->constructed = tp_base_password_channel_constructed;
+ object_class->set_property = tp_base_password_channel_set_property;
+ object_class->get_property = tp_base_password_channel_get_property;
+ object_class->finalize = tp_base_password_channel_finalize;
chan_class->channel_type = TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION;
chan_class->target_handle_type = TP_HANDLE_TYPE_NONE;
- chan_class->interfaces = tp_simple_password_channel_interfaces;
- chan_class->close = tp_simple_password_channel_close;
+ chan_class->interfaces = tp_base_password_channel_interfaces;
+ chan_class->close = tp_base_password_channel_close;
chan_class->fill_immutable_properties =
- tp_simple_password_channel_fill_immutable_properties;
+ tp_base_password_channel_fill_immutable_properties;
param_spec = g_param_spec_string ("authentication-method",
"Authentication method",
@@ -328,7 +328,7 @@ tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_p
param_spec);
param_spec = g_param_spec_string ("authorization-identity",
- "simple_password identity",
+ "base_password identity",
"Authorization identity",
"",
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
@@ -368,16 +368,16 @@ tp_simple_password_channel_class_init (TpSimplePasswordChannelClass *tp_simple_p
G_TYPE_NONE, 4,
G_TYPE_GSTRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_STRING);
- tp_simple_password_channel_class->properties_class.interfaces = prop_interfaces;
+ tp_base_password_channel_class->properties_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpSimplePasswordChannelClass, properties_class));
+ G_STRUCT_OFFSET (TpBasePasswordChannelClass, properties_class));
}
static void
-tp_simple_password_channel_finalize (GObject *object)
+tp_base_password_channel_finalize (GObject *object)
{
- TpSimplePasswordChannel *self = TP_SIMPLE_PASSWORD_CHANNEL (object);
- TpSimplePasswordChannelPrivate *priv = self->priv;
+ TpBasePasswordChannel *self = TP_BASE_PASSWORD_CHANNEL (object);
+ TpBasePasswordChannelPrivate *priv = self->priv;
tp_clear_pointer (&priv->sasl_error_details, g_hash_table_destroy);
tp_clear_pointer (&priv->sasl_error, g_free);
@@ -391,16 +391,16 @@ 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_base_password_channel_parent_class)->finalize != NULL)
+ G_OBJECT_CLASS (tp_base_password_channel_parent_class)->finalize (object);
}
static void
-tp_simple_password_channel_change_status (TpSimplePasswordChannel *channel,
+tp_base_password_channel_change_status (TpBasePasswordChannel *channel,
TpSASLStatus new_status,
const gchar *new_sasl_error)
{
- TpSimplePasswordChannelPrivate *priv = channel->priv;
+ TpBasePasswordChannelPrivate *priv = channel->priv;
priv->sasl_status = new_status;
@@ -412,10 +412,10 @@ tp_simple_password_channel_change_status (TpSimplePasswordChannel *channel,
}
static void
-tp_simple_password_channel_close (TpBaseChannel *base)
+tp_base_password_channel_close (TpBaseChannel *base)
{
- TpSimplePasswordChannel *self = TP_SIMPLE_PASSWORD_CHANNEL (base);
- TpSimplePasswordChannelPrivate *priv = self->priv;
+ TpBasePasswordChannel *self = TP_BASE_PASSWORD_CHANNEL (base);
+ TpBasePasswordChannelPrivate *priv = self->priv;
DEBUG ("Called on %p", base);
@@ -426,11 +426,11 @@ tp_simple_password_channel_close (TpBaseChannel *base)
&& priv->sasl_status != TP_SASL_STATUS_SERVER_FAILED
&& priv->sasl_status != TP_SASL_STATUS_CLIENT_FAILED)
{
- tp_simple_password_channel_change_status (self,
+ tp_base_password_channel_change_status (self,
TP_SASL_STATUS_CLIENT_FAILED, TP_ERROR_STR_CANCELLED);
g_signal_emit (self, signals[FINISHED], 0, NULL, TP_ERRORS,
- TP_ERROR_CANCELLED, "SimplePassword channel was closed");
+ TP_ERROR_CANCELLED, "BasePassword channel was closed");
}
DEBUG ("Closing channel");
@@ -438,11 +438,11 @@ tp_simple_password_channel_close (TpBaseChannel *base)
}
static void
-tp_simple_password_channel_fill_immutable_properties (TpBaseChannel *chan,
+tp_base_password_channel_fill_immutable_properties (TpBaseChannel *chan,
GHashTable *properties)
{
TpBaseChannelClass *klass = TP_BASE_CHANNEL_CLASS (
- tp_simple_password_channel_parent_class);
+ tp_base_password_channel_parent_class);
klass->fill_immutable_properties (chan, properties);
@@ -460,18 +460,18 @@ tp_simple_password_channel_fill_immutable_properties (TpBaseChannel *chan,
}
static void
-tp_simple_password_channel_start_mechanism_with_data (
+tp_base_password_channel_start_mechanism_with_data (
TpSvcChannelInterfaceSASLAuthentication *self,
const gchar *mechanism,
const GArray *initial_data,
DBusGMethodInvocation *context)
{
- TpSimplePasswordChannel *channel = TP_SIMPLE_PASSWORD_CHANNEL (self);
- TpSimplePasswordChannelPrivate *priv = channel->priv;
+ TpBasePasswordChannel *channel = TP_BASE_PASSWORD_CHANNEL (self);
+ TpBasePasswordChannelPrivate *priv = channel->priv;
GError *error = NULL;
if (!tp_strv_contains (
- tp_simple_password_channel_available_mechanisms, mechanism))
+ tp_base_password_channel_available_mechanisms, mechanism))
{
error = g_error_new (TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
"The mechanism %s is not implemented", mechanism);
@@ -493,13 +493,13 @@ tp_simple_password_channel_start_mechanism_with_data (
goto error;
}
- tp_simple_password_channel_change_status (channel,
+ tp_base_password_channel_change_status (channel,
TP_SASL_STATUS_IN_PROGRESS, "");
priv->password = g_string_new_len (
initial_data->data, initial_data->len);
- tp_simple_password_channel_change_status (channel,
+ tp_base_password_channel_change_status (channel,
TP_SASL_STATUS_SERVER_SUCCEEDED, "");
tp_svc_channel_interface_sasl_authentication_return_from_start_mechanism_with_data (
@@ -514,12 +514,12 @@ error:
}
static void
-tp_simple_password_channel_accept_sasl (
+tp_base_password_channel_accept_sasl (
TpSvcChannelInterfaceSASLAuthentication *self,
DBusGMethodInvocation *context)
{
- TpSimplePasswordChannel *channel = TP_SIMPLE_PASSWORD_CHANNEL (self);
- TpSimplePasswordChannelPrivate *priv = channel->priv;
+ TpBasePasswordChannel *channel = TP_BASE_PASSWORD_CHANNEL (self);
+ TpBasePasswordChannelPrivate *priv = channel->priv;
if (priv->sasl_status != TP_SASL_STATUS_SERVER_SUCCEEDED)
{
@@ -530,7 +530,7 @@ tp_simple_password_channel_accept_sasl (
return;
}
- tp_simple_password_channel_change_status (channel,
+ tp_base_password_channel_change_status (channel,
TP_SASL_STATUS_SUCCEEDED, "");
g_signal_emit (channel, signals[FINISHED], 0, priv->password, 0, 0, NULL);
@@ -540,14 +540,14 @@ tp_simple_password_channel_accept_sasl (
}
static void
-tp_simple_password_channel_abort_sasl (
+tp_base_password_channel_abort_sasl (
TpSvcChannelInterfaceSASLAuthentication *self,
TpSASLAbortReason reason,
const gchar *debug_message,
DBusGMethodInvocation *context)
{
- TpSimplePasswordChannel *channel = TP_SIMPLE_PASSWORD_CHANNEL (self);
- TpSimplePasswordChannelPrivate *priv = channel->priv;
+ TpBasePasswordChannel *channel = TP_BASE_PASSWORD_CHANNEL (self);
+ TpBasePasswordChannelPrivate *priv = channel->priv;
if (priv->sasl_status == TP_SASL_STATUS_SERVER_SUCCEEDED
|| priv->sasl_status == TP_SASL_STATUS_CLIENT_ACCEPTED)
@@ -569,7 +569,7 @@ tp_simple_password_channel_abort_sasl (
tp_asv_set_string (priv->sasl_error_details, "debug-message",
debug_message);
- tp_simple_password_channel_change_status (channel,
+ tp_base_password_channel_change_status (channel,
TP_SASL_STATUS_CLIENT_FAILED, TP_ERROR_STR_CANCELLED);
g_signal_emit (channel, signals[FINISHED], 0, NULL, TP_ERRORS,
@@ -585,7 +585,7 @@ sasl_auth_iface_init (gpointer g_iface,
gpointer iface_data)
{
#define IMPLEMENT(x) tp_svc_channel_interface_sasl_authentication_implement_##x (\
- g_iface, tp_simple_password_channel_##x)
+ g_iface, tp_base_password_channel_##x)
IMPLEMENT(start_mechanism_with_data);
IMPLEMENT(accept_sasl);
IMPLEMENT(abort_sasl);
diff --git a/telepathy-glib/base-password-channel.h b/telepathy-glib/base-password-channel.h
index bf69ba21f..3f99acd1d 100644
--- a/telepathy-glib/base-password-channel.h
+++ b/telepathy-glib/base-password-channel.h
@@ -1,5 +1,5 @@
/*
- * simple-password-channel.h - Header for TpSimplePasswordChannel
+ * base-password-channel.h - Header for TpBasePasswordChannel
* Copyright (C) 2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
@@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __TP_SIMPLE_PASSWORD_CHANNEL_H__
-#define __TP_SIMPLE_PASSWORD_CHANNEL_H__
+#ifndef __TP_BASE_PASSWORD_CHANNEL_H__
+#define __TP_BASE_PASSWORD_CHANNEL_H__
#include <glib-object.h>
@@ -27,43 +27,43 @@
G_BEGIN_DECLS
-typedef struct _TpSimplePasswordChannel TpSimplePasswordChannel;
-typedef struct _TpSimplePasswordChannelPrivate TpSimplePasswordChannelPrivate;
-typedef struct _TpSimplePasswordChannelClass TpSimplePasswordChannelClass;
+typedef struct _TpBasePasswordChannel TpBasePasswordChannel;
+typedef struct _TpBasePasswordChannelPrivate TpBasePasswordChannelPrivate;
+typedef struct _TpBasePasswordChannelClass TpBasePasswordChannelClass;
-struct _TpSimplePasswordChannelClass
+struct _TpBasePasswordChannelClass
{
TpBaseChannelClass parent_class;
TpDBusPropertiesMixinClass properties_class;
};
-struct _TpSimplePasswordChannel
+struct _TpBasePasswordChannel
{
TpBaseChannel parent;
- TpSimplePasswordChannelPrivate *priv;
+ TpBasePasswordChannelPrivate *priv;
};
-GType tp_simple_password_channel_get_type (void);
+GType tp_base_password_channel_get_type (void);
/* TYPE MACROS */
-#define TP_TYPE_SIMPLE_PASSWORD_CHANNEL \
- (tp_simple_password_channel_get_type ())
-#define TP_SIMPLE_PASSWORD_CHANNEL(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TYPE_SIMPLE_PASSWORD_CHANNEL,\
- TpSimplePasswordChannel))
-#define TP_SIMPLE_PASSWORD_CHANNEL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TYPE_SIMPLE_PASSWORD_CHANNEL,\
- TpSimplePasswordChannelClass))
-#define TP_IS_SIMPLE_PASSWORD_CHANNEL(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TYPE_SIMPLE_PASSWORD_CHANNEL))
-#define TP_IS_SIMPLE_PASSWORD_CHANNEL_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TYPE_SIMPLE_PASSWORD_CHANNEL))
-#define TP_SIMPLE_PASSWORD_CHANNEL_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_SIMPLE_PASSWORD_CHANNEL, \
- TpSimplePasswordChannelClass))
+#define TP_TYPE_BASE_PASSWORD_CHANNEL \
+ (tp_base_password_channel_get_type ())
+#define TP_BASE_PASSWORD_CHANNEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TYPE_BASE_PASSWORD_CHANNEL,\
+ TpBasePasswordChannel))
+#define TP_BASE_PASSWORD_CHANNEL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass), TP_TYPE_BASE_PASSWORD_CHANNEL,\
+ TpBasePasswordChannelClass))
+#define TP_IS_BASE_PASSWORD_CHANNEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TYPE_BASE_PASSWORD_CHANNEL))
+#define TP_IS_BASE_PASSWORD_CHANNEL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TYPE_BASE_PASSWORD_CHANNEL))
+#define TP_BASE_PASSWORD_CHANNEL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_BASE_PASSWORD_CHANNEL, \
+ TpBasePasswordChannelClass))
G_END_DECLS
-#endif /* #ifndef __TP_SIMPLE_PASSWORD_CHANNEL_H__*/
+#endif /* #ifndef __TP_BASE_PASSWORD_CHANNEL_H__*/
diff --git a/telepathy-glib/simple-password-manager.c b/telepathy-glib/simple-password-manager.c
index 0f44abd69..13343a348 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.h"
+#include "telepathy-glib/base-password-channel.h"
static void channel_manager_iface_init (gpointer, gpointer);
static void tp_simple_password_manager_close_all (TpSimplePasswordManager *self);
@@ -98,7 +98,7 @@ struct _TpSimplePasswordManagerPrivate
TpBaseConnection *conn;
guint status_changed_id;
- TpSimplePasswordChannel *channel;
+ TpBasePasswordChannel *channel;
GAsyncResult *result;
gboolean dispose_has_run;
@@ -307,7 +307,7 @@ tp_simple_password_manager_channel_closed_cb (GObject *chan,
static void
tp_simple_password_manager_channel_finished_cb (
- TpSimplePasswordChannel *channel,
+ TpBasePasswordChannel *channel,
const GString *str,
guint domain,
gint code,
@@ -336,7 +336,7 @@ tp_simple_password_manager_channel_finished_cb (
static void
tp_simple_password_manager_prompt_common_async (
TpSimplePasswordManager *self,
- TpSimplePasswordChannel *channel,
+ TpBasePasswordChannel *channel,
GSimpleAsyncResult *result)
{
TpSimplePasswordManagerPrivate *priv = self->priv;
@@ -364,7 +364,7 @@ tp_simple_password_manager_prompt_common_async (
/**
* tp_simple_password_manager_prompt_for_channel_async:
* @self: a #TpSimplePasswordManager
- * @channel: a #TpSimplePasswordChannel
+ * @channel: a #TpBasePasswordChannel
* @callback: a callback to call when the request is satisfied
* @user_data: data to pass to @callback
*
@@ -387,7 +387,7 @@ tp_simple_password_manager_prompt_common_async (
void
tp_simple_password_manager_prompt_for_channel_async (
TpSimplePasswordManager *self,
- TpSimplePasswordChannel *channel,
+ TpBasePasswordChannel *channel,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -423,13 +423,13 @@ tp_simple_password_manager_prompt_async (
gpointer user_data)
{
TpSimplePasswordManagerPrivate *priv = self->priv;
- gchar *object_path = g_strdup_printf ("%s/SimplePasswordChannel",
+ gchar *object_path = g_strdup_printf ("%s/BasePasswordChannel",
priv->conn->object_path);
- TpSimplePasswordChannel *channel;
+ TpBasePasswordChannel *channel;
GSimpleAsyncResult *result = g_simple_async_result_new (G_OBJECT (self),
callback, user_data, tp_simple_password_manager_prompt_async);
- channel = g_object_new (TP_TYPE_SIMPLE_PASSWORD_CHANNEL,
+ channel = g_object_new (TP_TYPE_BASE_PASSWORD_CHANNEL,
"connection", priv->conn,
"object-path", object_path,
"handle", 0,
@@ -502,7 +502,7 @@ const GString *
tp_simple_password_manager_prompt_for_channel_finish (
TpSimplePasswordManager *self,
GAsyncResult *result,
- TpSimplePasswordChannel **channel,
+ TpBasePasswordChannel **channel,
GError **error)
{
TpSimplePasswordManagerPrivate *priv = self->priv;
diff --git a/telepathy-glib/simple-password-manager.h b/telepathy-glib/simple-password-manager.h
index b8d151654..854cb80dc 100644
--- a/telepathy-glib/simple-password-manager.h
+++ b/telepathy-glib/simple-password-manager.h
@@ -23,7 +23,7 @@
#include <gio/gio.h>
#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/simple-password-channel.h>
+#include <telepathy-glib/base-password-channel.h>
G_BEGIN_DECLS
@@ -74,13 +74,13 @@ const GString * tp_simple_password_manager_prompt_finish (
void tp_simple_password_manager_prompt_for_channel_async (
TpSimplePasswordManager *self,
- TpSimplePasswordChannel *channel,
+ TpBasePasswordChannel *channel,
GAsyncReadyCallback callback, gpointer user_data);
const GString * tp_simple_password_manager_prompt_for_channel_finish (
TpSimplePasswordManager *self,
GAsyncResult *result,
- TpSimplePasswordChannel **channel,
+ TpBasePasswordChannel **channel,
GError **error);