+2003-10-23 Jeffrey Stedfast <fejj@ximian.com>
+
+ * *.c: Removed unneeded CAMEL_OBJECT() casts.
+
2003-10-21 Not Zed <NotZed@Ximian.com>
* providers/local/camel-local-folder.c (local_getv, local_setv):
{
CamelCipherContext *context = (CamelCipherContext *)o;
- camel_object_unref (CAMEL_OBJECT (context->session));
+ camel_object_unref (context->session);
g_mutex_free (context->priv->lock);
context = CAMEL_CIPHER_CONTEXT (camel_object_new (CAMEL_CIPHER_CONTEXT_TYPE));
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
context->session = session;
return context;
g_return_if_fail (CAMEL_IS_CIPHER_CONTEXT (context));
g_return_if_fail (CAMEL_IS_SESSION (session));
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
context->session = session;
}
{
CamelCMSContext *context = (CamelCMSContext *)o;
- camel_object_unref (CAMEL_OBJECT (context->session));
+ camel_object_unref (context->session);
#ifdef ENABLE_THREADS
g_mutex_free (context->priv->lock);
context = CAMEL_CMS_CONTEXT (camel_object_new (CAMEL_CMS_CONTEXT_TYPE));
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
context->session = session;
return context;
g_return_if_fail (CAMEL_IS_CMS_CONTEXT (context));
g_return_if_fail (CAMEL_IS_SESSION (session));
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
context->session = session;
}
CamelFolder *folder = CAMEL_FOLDER (object);
if (folder->summary) {
- camel_object_unref (CAMEL_OBJECT (folder->summary));
+ camel_object_unref (folder->summary);
folder->summary = NULL;
}
- camel_object_unref (CAMEL_OBJECT (digest_folder->priv->message));
+ camel_object_unref (digest_folder->priv->message);
if (digest_folder->priv->search)
- camel_object_unref (CAMEL_OBJECT (digest_folder->priv->search));
+ camel_object_unref (digest_folder->priv->search);
g_mutex_free (digest_folder->priv->search_lock);
camel_folder_construct (folder, parent_store, "folder_name", "short_name");
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
digest_folder->priv->message = message;
construct_summary (folder, CAMEL_MULTIPART (wrapper));
return NULL;
message = CAMEL_MIME_MESSAGE (wrapper);
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
return message;
}
diary->file = fopen (filename, "a+");
if (!diary->file) {
- camel_object_unref (CAMEL_OBJECT (diary));
+ camel_object_unref (diary);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Could not open journal file: %s",
g_strerror (errno));
if (p->defaultfolder) {
camel_folder_thaw (p->defaultfolder);
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
+ camel_object_unref (p->defaultfolder);
}
while ((node = (struct _filter_rule *)e_dlist_remhead(&p->rules))) {
if (p->defaultfolder) {
camel_folder_thaw (p->defaultfolder);
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
+ camel_object_unref (p->defaultfolder);
}
p->defaultfolder = def;
if (p->defaultfolder) {
camel_folder_freeze (p->defaultfolder);
- camel_object_ref (CAMEL_OBJECT (p->defaultfolder));
+ camel_object_ref (p->defaultfolder);
}
}
if (folder != FOLDER_INVALID) {
camel_folder_sync (folder, FALSE, p->ex);
camel_folder_thaw (folder);
- camel_object_unref (CAMEL_OBJECT (folder));
+ camel_object_unref (folder);
}
report_status(driver, CAMEL_FILTER_STATUS_PROGRESS, g_hash_table_size(p->folders)* 100 / p->closed, _("Syncing folders"));
if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
camel_exception_set (ex, (errno==EINTR)?CAMEL_EXCEPTION_USER_CANCEL:CAMEL_EXCEPTION_SYSTEM, _("Cannot open message"));
report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
- camel_object_unref (CAMEL_OBJECT (msg));
+ camel_object_unref (msg);
goto fail;
}
last = camel_mime_parser_tell(mp);
status = camel_filter_driver_filter_message (driver, msg, info, NULL, NULL, source_url,
original_source_url ? original_source_url : source_url, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
+ camel_object_unref (msg);
if (camel_exception_is_set (ex) || status == -1) {
report_status (driver, CAMEL_FILTER_STATUS_END, 100, _("Failed on message %d"), i);
camel_message_info_free (info);
if (fd != -1)
close (fd);
if (mp)
- camel_object_unref (CAMEL_OBJECT (mp));
+ camel_object_unref (mp);
return -1;
}
struct _camel_header_raw *h;
if (message) {
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
} else {
message = camel_folder_get_message (source, uid, ex);
if (!message)
uid = camel_message_info_uid (info);
if (message)
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
}
p->ex = ex;
}
if (p->message)
- camel_object_unref (CAMEL_OBJECT (p->message));
+ camel_object_unref (p->message);
if (freeinfo)
camel_message_info_free (info);
camel_filter_driver_log (driver, FILTER_LOG_END, NULL);
if (p->message)
- camel_object_unref (CAMEL_OBJECT (p->message));
+ camel_object_unref (p->message);
if (freeinfo)
camel_message_info_free (info);
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
camel_stream_flush (stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
result = waitpid (pid, &status, 0);
e_sexp_unref (sexp);
if (fms.message)
- camel_object_unref (CAMEL_OBJECT (fms.message));
+ camel_object_unref (fms.message);
return retval;
error:
if (fms.message)
- camel_object_unref (CAMEL_OBJECT (fms.message));
+ camel_object_unref (fms.message);
e_sexp_unref (sexp);
return TRUE;
}
}
- camel_object_unref (CAMEL_OBJECT (mem));
+
+ camel_object_unref (mem);
}
return truth;
camel_folder_summary_touch(folder->summary);
camel_folder_summary_info_free(folder->summary, info);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
+ camel_object_trigger_event (folder, "message_changed", (char *) uid);
}
/**
if (camel_flag_set(&info->user_flags, name, value)) {
info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
+ camel_object_trigger_event (folder, "message_changed", (char *) uid);
}
camel_folder_summary_info_free(folder->summary, info);
}
if (camel_tag_set(&info->user_tags, name, value)) {
info->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
camel_folder_summary_touch(folder->summary);
- camel_object_trigger_event(CAMEL_OBJECT(folder), "message_changed", (char *) uid);
+ camel_object_trigger_event (folder, "message_changed", (char *) uid);
}
camel_folder_summary_info_free(folder->summary, info);
}
}
camel_folder_append_message (dest, msg, info, transferred_uid, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
+ camel_object_unref (msg);
if (delete_original && !camel_exception_is_set (ex))
camel_folder_set_message_flags (source, uid, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, ~0);
CAMEL_FOLDER_UNLOCK (folder, lock);
- camel_object_trigger_event (CAMEL_OBJECT (folder), "deleted", NULL);
+ camel_object_trigger_event (folder, "deleted", NULL);
}
static void
CF_CLASS (folder)->rename(folder, new);
- camel_object_trigger_event (CAMEL_OBJECT (folder), "renamed", old);
+ camel_object_trigger_event (folder, "renamed", old);
g_free(old);
}
CAMEL_FOLDER_UNLOCK(folder, change_lock);
if (info) {
- camel_object_trigger_event(CAMEL_OBJECT(folder), "folder_changed", info);
+ camel_object_trigger_event (folder, "folder_changed", info);
camel_folder_change_info_free(info);
}
}
gpg = g_new (struct _GpgCtx, 1);
gpg->mode = GPG_CTX_MODE_SIGN;
gpg->session = session;
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
gpg->userid_hint = g_hash_table_new (g_str_hash, g_str_equal);
gpg->complete = FALSE;
gpg->seen_eof1 = TRUE;
static void
gpg_ctx_set_istream (struct _GpgCtx *gpg, CamelStream *istream)
{
- camel_object_ref (CAMEL_OBJECT (istream));
+ camel_object_ref (istream);
if (gpg->istream)
- camel_object_unref (CAMEL_OBJECT (gpg->istream));
+ camel_object_unref (gpg->istream);
gpg->istream = istream;
}
static void
gpg_ctx_set_ostream (struct _GpgCtx *gpg, CamelStream *ostream)
{
- camel_object_ref (CAMEL_OBJECT (ostream));
+ camel_object_ref (ostream);
if (gpg->ostream)
- camel_object_unref (CAMEL_OBJECT (gpg->ostream));
+ camel_object_unref (gpg->ostream);
gpg->ostream = ostream;
gpg->seen_eof1 = FALSE;
}
int i;
if (gpg->session)
- camel_object_unref (CAMEL_OBJECT (gpg->session));
+ camel_object_unref (gpg->session);
g_hash_table_foreach (gpg->userid_hint, userid_hint_free, NULL);
g_hash_table_destroy (gpg->userid_hint);
g_free (gpg->passwd);
if (gpg->istream)
- camel_object_unref (CAMEL_OBJECT (gpg->istream));
+ camel_object_unref (gpg->istream);
if (gpg->ostream)
- camel_object_unref (CAMEL_OBJECT (gpg->ostream));
+ camel_object_unref (gpg->ostream);
camel_object_unref (gpg->diagnostics);
if (ret != -1)
ret = camel_stream_close (ostream);
}
- camel_object_unref (CAMEL_OBJECT (ostream));
+
+ camel_object_unref (ostream);
if (ret == -1) {
unlink (template);
if (camel_tcp_stream_connect (CAMEL_TCP_STREAM (stream), host, url->port ? url->port : 80) == -1) {
errsave = errno;
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
camel_free_host (host);
errno = errsave;
return NULL;
int err;
if (http->parser)
- camel_object_unref (CAMEL_OBJECT (http->parser));
+ camel_object_unref (http->parser);
http->parser = camel_mime_parser_new ();
camel_mime_parser_init_with_stream (http->parser, http->read);
err = camel_mime_parser_errno (http->parser);
if (err != 0) {
- camel_object_unref (CAMEL_OBJECT (http->parser));
+ camel_object_unref (http->parser);
http->parser = NULL;
goto exception;
}
CamelMedium *medium = CAMEL_MEDIUM (object);
if (medium->content)
- camel_object_unref (CAMEL_OBJECT (medium->content));
+ camel_object_unref (medium->content);
}
set_content_object (CamelMedium *medium, CamelDataWrapper *content)
{
if (medium->content)
- camel_object_unref (CAMEL_OBJECT (medium->content));
- camel_object_ref (CAMEL_OBJECT (content));
+ camel_object_unref (medium->content);
+ camel_object_ref (content);
medium->content = content;
}
CamelMimeFilterSave *save = CAMEL_MIME_FILTER_SAVE (camel_object_new (CAMEL_MIME_FILTER_SAVE_TYPE));
save->stream = stream;
- camel_object_ref (CAMEL_OBJECT (stream));
+ camel_object_ref (stream);
return (CamelMimeFilter *) save;
}
static void
unref_recipient (gpointer key, gpointer value, gpointer user_data)
{
- camel_object_unref (CAMEL_OBJECT (value));
+ camel_object_unref (value);
}
CamelMimeMessage *
switch (header_type) {
case HEADER_FROM:
if (message->from)
- camel_object_unref (CAMEL_OBJECT (message->from));
+ camel_object_unref (message->from);
message->from = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (message->from), value);
break;
case HEADER_REPLY_TO:
if (message->reply_to)
- camel_object_unref (CAMEL_OBJECT (message->reply_to));
+ camel_object_unref (message->reply_to);
message->reply_to = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (message->reply_to), value);
break;
found = content_id && !strcmp (content_id, check->content_id) ? TRUE : FALSE;
if (found) {
check->part = part;
- camel_object_ref (CAMEL_OBJECT (part));
+ camel_object_ref (part);
}
return !found;
camel_data_wrapper_set_mime_type (dw, type);
stream = camel_stream_mem_new_with_buffer (data, length);
camel_data_wrapper_construct_from_stream (dw, stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
camel_medium_set_content_object (medium, dw);
- camel_object_unref (CAMEL_OBJECT (dw));
+ camel_object_unref (dw);
} else {
if (medium->content)
- camel_object_unref (CAMEL_OBJECT (medium->content));
+ camel_object_unref (medium->content);
medium->content = NULL;
}
}
static void
unref_part (gpointer data, gpointer user_data)
{
- CamelObject *part = CAMEL_OBJECT (data);
+ CamelObject *part = data;
camel_object_unref (part);
}
add_part (CamelMultipart *multipart, CamelMimePart *part)
{
multipart->parts = g_list_append (multipart->parts, part);
- camel_object_ref (CAMEL_OBJECT (part));
+ camel_object_ref (part);
}
/**
add_part_at (CamelMultipart *multipart, CamelMimePart *part, guint index)
{
multipart->parts = g_list_insert (multipart->parts, part, index);
- camel_object_ref (CAMEL_OBJECT (part));
+ camel_object_ref (part);
}
/**
if (!multipart->parts)
return;
multipart->parts = g_list_remove (multipart->parts, part);
- camel_object_unref (CAMEL_OBJECT (part));
+ camel_object_unref (part);
}
/**
multipart->parts = g_list_remove_link (parts_list, part_to_remove);
if (part_to_remove->data)
- camel_object_unref (CAMEL_OBJECT (part_to_remove->data));
+ camel_object_unref (part_to_remove->data);
g_list_free_1 (part_to_remove);
return removed_part;
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
+ * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
*
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel-internet-address.h"
#include <string.h>
+
CamelServiceAuthType camel_sasl_anonymous_authtype = {
N_("Anonymous"),
camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
_("Invalid email address trace information:\n%s"),
sasl_anon->trace_info);
- camel_object_unref (CAMEL_OBJECT (cia));
+ camel_object_unref (cia);
return NULL;
}
- camel_object_unref (CAMEL_OBJECT (cia));
+ camel_object_unref (cia);
ret = g_byte_array_new ();
g_byte_array_append (ret, sasl_anon->trace_info, strlen (sasl_anon->trace_info));
break;
/*
* Authors: Jeffrey Stedfast <fejj@ximian.com>
*
- * Copyright 2001 Ximian, Inc. (www.ximian.com)
+ * Copyright 2001-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
*
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "camel-sasl-popb4smtp.h"
#include "camel-sasl-ntlm.h"
+
#define w(x)
static CamelObjectClass *parent_class = NULL;
camel_sasl_finalize (CamelSasl *sasl)
{
g_free (sasl->service_name);
- g_free(sasl->mech);
- camel_object_unref (CAMEL_OBJECT (sasl->service));
+ g_free (sasl->mech);
+ camel_object_unref (sasl->service);
}
CamelType
/* We don't do ANONYMOUS here, because it's a little bit weird. */
if (!strcmp (mechanism, "CRAM-MD5"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_CRAM_MD5_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_CRAM_MD5_TYPE);
else if (!strcmp (mechanism, "DIGEST-MD5"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_DIGEST_MD5_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_DIGEST_MD5_TYPE);
#ifdef HAVE_KRB5
else if (!strcmp (mechanism, "GSSAPI"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_GSSAPI_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_GSSAPI_TYPE);
#endif
#ifdef HAVE_KRB4
else if (!strcmp (mechanism, "KERBEROS_V4"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_KERBEROS4_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_KERBEROS4_TYPE);
#endif
else if (!strcmp (mechanism, "PLAIN"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_PLAIN_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_PLAIN_TYPE);
else if (!strcmp (mechanism, "LOGIN"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_LOGIN_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_LOGIN_TYPE);
else if (!strcmp (mechanism, "POPB4SMTP"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_POPB4SMTP_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_POPB4SMTP_TYPE);
else if (!strcmp (mechanism, "NTLM"))
- sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_NTLM_TYPE);
+ sasl = (CamelSasl *) camel_object_new (CAMEL_SASL_NTLM_TYPE);
else
return NULL;
- sasl->mech = g_strdup(mechanism);
+ sasl->mech = g_strdup (mechanism);
sasl->service_name = g_strdup (service_name);
sasl->service = service;
- camel_object_ref (CAMEL_OBJECT (service));
+ camel_object_ref (service);
return sasl;
}
* Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
* Michael Zucchi <notzed@ximian.com>
*
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
+ * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
CAMEL_SEEKABLE_SUBSTREAM (object);
if (seekable_substream->parent_stream)
- camel_object_unref (CAMEL_OBJECT (seekable_substream->parent_stream));
+ camel_object_unref (seekable_substream->parent_stream);
}
/* Initialize it. */
seekable_substream->parent_stream = parent_stream;
- camel_object_ref (CAMEL_OBJECT (parent_stream));
+ camel_object_ref (parent_stream);
/* Set the bound of the substream. We can ignore any possible error
* here, because if we fail to seek now, it will try again later.
* USA
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
if (service->url)
camel_url_free (service->url);
if (service->session)
- camel_object_unref (CAMEL_OBJECT (service->session));
+ camel_object_unref (service->session);
e_mutex_destroy (service->priv->connect_lock);
e_mutex_destroy (service->priv->connect_op_lock);
service->provider = provider;
service->url = url;
service->session = session;
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
service->status = CAMEL_SERVICE_DISCONNECTED;
}
if (svc->status != CAMEL_SERVICE_CONNECTED) {
if (camel_service_connect (svc, ex) == FALSE) {
- camel_object_unref (CAMEL_OBJECT (svc));
+ camel_object_unref (svc);
return NULL;
}
}
*
*/
+/* Note: much of the NSS code was copied from Mozilla's cmsutil.c program */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
NSS_CMSEncoder_Finish (ecx);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
g_free (data);
/* write the result to a camel stream */
mesg = camel_mime_message_new ();
camel_stream_reset (stream);
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
return mesg;
}
NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
NSS_CMSEncoder_Finish (ecx);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
g_free (data);
/* write the result to a camel stream */
mesg = camel_mime_message_new ();
camel_stream_reset (stream);
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
return mesg;
}
NSS_CMSEncoder_Update (ecx, buf->data, buf->len);
NSS_CMSEncoder_Finish (ecx);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
g_free (data);
/* write the result to a camel stream */
mesg = camel_mime_message_new ();
camel_stream_reset (stream);
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
return mesg;
}
stream = camel_stream_mem_new ();
camel_stream_mem_set_byte_array (CAMEL_STREAM_MEM (stream), buf);
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
stream = camel_stream_mem_new ();
cmsg = encrypted_data (CAMEL_SMIME_CONTEXT (ctx), buf, bulkkey, stream, ex);
g_byte_array_free (buf, TRUE);
g_free (bulkkey);
if (!cmsg) {
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
return NULL;
}
mesg = camel_mime_message_new ();
camel_stream_reset (stream);
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
return mesg;
}
ostream = camel_stream_mem_new ();
cmsg = decode_data (CAMEL_SMIME_CONTEXT (ctx), buf, ostream, info, ex);
- camel_object_unref (CAMEL_OBJECT (stream));
+ camel_object_unref (stream);
if (!cmsg) {
- camel_object_unref (CAMEL_OBJECT (ostream));
+ camel_object_unref (ostream);
return NULL;
}
mesg = camel_mime_message_new ();
camel_stream_reset (ostream);
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (mesg), ostream);
- camel_object_unref (CAMEL_OBJECT (ostream));
+ camel_object_unref (ostream);
return mesg;
}
reninfo.old_base = (char *)old_name;
reninfo.new = ((CamelStoreClass *)((CamelObject *)store)->klass)->get_folder_info(store, new_name, flags, ex);
if (reninfo.new != NULL) {
- camel_object_trigger_event(CAMEL_OBJECT(store), "folder_renamed", &reninfo);
+ camel_object_trigger_event (store, "folder_renamed", &reninfo);
((CamelStoreClass *)((CamelObject *)store)->klass)->free_folder_info(store, reninfo.new);
}
} else {
if (store->vtrash) {
/* FIXME: this should probably use the object bag or another one ? ... */
/* attach to the finalise event of the vtrash */
- camel_object_hook_event (CAMEL_OBJECT (store->vtrash), "finalize",
+ camel_object_hook_event (store->vtrash, "finalize",
trash_finalize, store);
/* add all the pre-opened folders to the vtrash */
get_trash (CamelStore *store, CamelException *ex)
{
if (store->vtrash) {
- camel_object_ref (CAMEL_OBJECT (store->vtrash));
+ camel_object_ref (store->vtrash);
return store->vtrash;
} else {
CS_CLASS (store)->init_trash (store);
if (store->vtrash) {
/* We don't ref here because we don't want the
store to own a ref on the trash folder */
- /*camel_object_ref (CAMEL_OBJECT (store->vtrash));*/
+ /*camel_object_ref (store->vtrash);*/
return store->vtrash;
} else {
w(g_warning ("This store does not support vTrash."));
*
* Authors: Michael Zucchi <notzed@ximian.com>
*
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
+ * Copyright 1999-2003 Ximian, Inc. (www.ximian.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
g_free(sbf->buf);
}
if (sbf->stream)
- camel_object_unref(CAMEL_OBJECT(sbf->stream));
+ camel_object_unref (sbf->stream);
g_free(sbf->linebuf);
}
{
set_vbuf(sbf, buf, mode, size);
if (sbf->stream)
- camel_object_unref(CAMEL_OBJECT(sbf->stream));
+ camel_object_unref (sbf->stream);
sbf->stream = s;
- camel_object_ref(CAMEL_OBJECT(sbf->stream));
+ camel_object_ref (sbf->stream);
}
static void