aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/sendmail
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/sendmail
parentbcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff)
downloadgsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.gz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.zst
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.zip
Merge with camel-async.
svn path=/trunk/; revision=4687
Diffstat (limited to 'camel/providers/sendmail')
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c30
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.h10
2 files changed, 17 insertions, 23 deletions
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index 3facc42676..c53512ccb4 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -64,25 +64,19 @@ camel_sendmail_transport_class_init (CamelSendmailTransportClass *camel_sendmail
camel_transport_class->send_to = _send_to;
}
-GtkType
+CamelType
camel_sendmail_transport_get_type (void)
{
- static GtkType camel_sendmail_transport_type = 0;
+ static CamelType camel_sendmail_transport_type = CAMEL_INVALID_TYPE;
- if (!camel_sendmail_transport_type) {
- GtkTypeInfo camel_sendmail_transport_info =
- {
- "CamelSendmailTransport",
- sizeof (CamelSendmailTransport),
- sizeof (CamelSendmailTransportClass),
- (GtkClassInitFunc) camel_sendmail_transport_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_sendmail_transport_type = gtk_type_unique (CAMEL_TRANSPORT_TYPE, &camel_sendmail_transport_info);
+ if (camel_sendmail_transport_type == CAMEL_INVALID_TYPE) {
+ camel_sendmail_transport_type = camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSendmailTransport",
+ sizeof (CamelSendmailTransport),
+ sizeof (CamelSendmailTransportClass),
+ (CamelObjectClassInitFunc) camel_sendmail_transport_class_init,
+ NULL,
+ (CamelObjectInitFunc) NULL,
+ NULL);
}
return camel_sendmail_transport_type;
@@ -148,13 +142,13 @@ _send_internal (CamelMedium *message, char **argv, CamelException *ex)
out = camel_stream_fs_new_with_fd (fd[1]);
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), out) == -1
|| camel_stream_close(out) == -1) {
- gtk_object_unref (GTK_OBJECT (out));
+ camel_object_unref (CAMEL_OBJECT (out));
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Could not send message: %s",
strerror(errno));
return FALSE;
}
- gtk_object_unref (GTK_OBJECT (out));
+ camel_object_unref (CAMEL_OBJECT (out));
/* Wait for sendmail to exit. */
while (waitpid (pid, &wstat, 0) == -1 && errno == EINTR)
diff --git a/camel/providers/sendmail/camel-sendmail-transport.h b/camel/providers/sendmail/camel-sendmail-transport.h
index 3f3714584a..bb5dca071b 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.h
+++ b/camel/providers/sendmail/camel-sendmail-transport.h
@@ -37,9 +37,9 @@ extern "C" {
#include "camel-transport.h"
#define CAMEL_SENDMAIL_TRANSPORT_TYPE (camel_sendmail_transport_get_type ())
-#define CAMEL_SENDMAIL_TRANSPORT(obj) (GTK_CHECK_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
-#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
-#define CAMEL_IS_SENDMAIL_TRANSPORT(o) (GTK_CHECK_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
+#define CAMEL_SENDMAIL_TRANSPORT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransport))
+#define CAMEL_SENDMAIL_TRANSPORT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_SENDMAIL_TRANSPORT_TYPE, CamelSendmailTransportClass))
+#define CAMEL_IS_SENDMAIL_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SENDMAIL_TRANSPORT_TYPE))
typedef struct {
@@ -54,8 +54,8 @@ typedef struct {
} CamelSendmailTransportClass;
-/* Standard Gtk function */
-GtkType camel_sendmail_transport_get_type (void);
+/* Standard Camel function */
+CamelType camel_sendmail_transport_get_type (void);
#ifdef __cplusplus
}