aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
commit8cb514d6dd9497893a35a089d07a132d51263ee7 (patch)
tree9f4e5d1f929da7e0be900919753d419fe4c9c61a /camel/providers/smtp
parentbcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff)
downloadgsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.gz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.bz2
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.lz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.xz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.zst
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.zip
Merge with camel-async.
svn path=/trunk/; revision=4687
Diffstat (limited to 'camel/providers/smtp')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c38
-rw-r--r--camel/providers/smtp/camel-smtp-transport.h10
2 files changed, 21 insertions, 27 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 0f70d6314e..83241b2cad 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -83,7 +83,7 @@ camel_smtp_transport_class_init (CamelSmtpTransportClass *camel_smtp_transport_c
CamelServiceClass *camel_service_class =
CAMEL_SERVICE_CLASS (camel_smtp_transport_class);
- service_class = gtk_type_class (camel_service_get_type ());
+ service_class = CAMEL_SERVICE_CLASS(camel_type_get_global_classfuncs (camel_service_get_type ()));
/* virtual method overload */
camel_service_class->connect = smtp_connect;
@@ -98,32 +98,26 @@ camel_smtp_transport_class_init (CamelSmtpTransportClass *camel_smtp_transport_c
}
static void
-camel_smtp_transport_init (gpointer object, gpointer klass)
+camel_smtp_transport_init (gpointer object)
{
CamelService *service = CAMEL_SERVICE (object);
service->url_flags = CAMEL_SERVICE_URL_NEED_HOST;
}
-GtkType
+CamelType
camel_smtp_transport_get_type (void)
{
- static GtkType camel_smtp_transport_type = 0;
-
- if (!camel_smtp_transport_type) {
- GtkTypeInfo camel_smtp_transport_info =
- {
- "CamelSmtpTransport",
- sizeof (CamelSmtpTransport),
- sizeof (CamelSmtpTransportClass),
- (GtkClassInitFunc) camel_smtp_transport_class_init,
- (GtkObjectInitFunc) camel_smtp_transport_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_smtp_transport_type = gtk_type_unique (CAMEL_TRANSPORT_TYPE, &camel_smtp_transport_info);
+ static CamelType camel_smtp_transport_type = CAMEL_INVALID_TYPE;
+
+ if (camel_smtp_transport_type == CAMEL_INVALID_TYPE) {
+ camel_smtp_transport_type = camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSmtpTransport",
+ sizeof (CamelSmtpTransport),
+ sizeof (CamelSmtpTransportClass),
+ (CamelObjectClassInitFunc) camel_smtp_transport_class_init,
+ NULL,
+ (CamelObjectInitFunc) camel_smtp_transport_init,
+ NULL);
}
return camel_smtp_transport_type;
@@ -241,8 +235,8 @@ smtp_disconnect (CamelService *service, CamelException *ex)
g_free (transport->esmtp_supported_authtypes);
transport->esmtp_supported_authtypes = NULL;
- gtk_object_unref (GTK_OBJECT (transport->ostream));
- gtk_object_unref (GTK_OBJECT (transport->istream));
+ camel_object_unref (CAMEL_OBJECT (transport->ostream));
+ camel_object_unref (CAMEL_OBJECT (transport->istream));
transport->ostream = NULL;
transport->istream = NULL;
@@ -691,7 +685,7 @@ smtp_data (CamelSmtpTransport *transport, CamelMedium *message, CamelException *
camel_stream_filter_remove (filtered_stream, id);
camel_stream_flush (CAMEL_STREAM(filtered_stream));
- gtk_object_unref (GTK_OBJECT(filtered_stream));
+ camel_object_unref (CAMEL_OBJECT(filtered_stream));
/* terminate the message body */
diff --git a/camel/providers/smtp/camel-smtp-transport.h b/camel/providers/smtp/camel-smtp-transport.h
index c11b8b4738..21bdaa03f7 100644
--- a/camel/providers/smtp/camel-smtp-transport.h
+++ b/camel/providers/smtp/camel-smtp-transport.h
@@ -43,9 +43,9 @@ extern "C" {
#include "camel-transport.h"
#define CAMEL_SMTP_TRANSPORT_TYPE (camel_smtp_transport_get_type ())
-#define CAMEL_SMTP_TRANSPORT(obj) (GTK_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
-#define CAMEL_SMTP_TRANSPORT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
-#define IS_CAMEL_SMTP_TRANSPORT(o) (GTK_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
+#define CAMEL_SMTP_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransport))
+#define CAMEL_SMTP_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SMTP_TRANSPORT_TYPE, CamelSmtpTransportClass))
+#define IS_CAMEL_SMTP_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE))
typedef struct {
@@ -69,8 +69,8 @@ typedef struct {
} CamelSmtpTransportClass;
-/* Standard Gtk function */
-GtkType camel_smtp_transport_get_type (void);
+/* Standard Camel function */
+CamelType camel_smtp_transport_get_type (void);
#ifdef __cplusplus
}