aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-10-24 03:57:58 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-10-24 03:57:58 +0800
commitb1be2a6d83aa9b9404ca735e73e73dc903625dc7 (patch)
tree36ede0609588101ba900b8c018462b7c7a3591c9
parent18ca85654d06140f30ea9db347dcf4f7cf00d7f0 (diff)
downloadgsoc2013-evolution-b1be2a6d83aa9b9404ca735e73e73dc903625dc7.tar.gz
gsoc2013-evolution-b1be2a6d83aa9b9404ca735e73e73dc903625dc7.tar.zst
gsoc2013-evolution-b1be2a6d83aa9b9404ca735e73e73dc903625dc7.zip
Removed unneeded CAMEL_OBJECT() casts.
2003-10-23 Jeffrey Stedfast <fejj@ximian.com> * *.c: Removed unneeded CAMEL_OBJECT() casts. svn path=/trunk/; revision=23052
-rw-r--r--camel/ChangeLog4
-rw-r--r--camel/camel-cipher-context.c6
-rw-r--r--camel/camel-cms-context.c6
-rw-r--r--camel/camel-digest-folder.c10
-rw-r--r--camel/camel-disco-diary.c2
-rw-r--r--camel/camel-filter-driver.c22
-rw-r--r--camel/camel-filter-search.c6
-rw-r--r--camel/camel-folder-search.c3
-rw-r--r--camel/camel-folder.c14
-rw-r--r--camel/camel-gpg-context.c19
-rw-r--r--camel/camel-http-stream.c6
-rw-r--r--camel/camel-medium.c6
-rw-r--r--camel/camel-mime-filter-save.c2
-rw-r--r--camel/camel-mime-message.c8
-rw-r--r--camel/camel-mime-part.c6
-rw-r--r--camel/camel-multipart.c10
-rw-r--r--camel/camel-sasl-anonymous.c8
-rw-r--r--camel/camel-sasl.c28
-rw-r--r--camel/camel-seekable-substream.c6
-rw-r--r--camel/camel-service.c5
-rw-r--r--camel/camel-session.c2
-rw-r--r--camel/camel-smime-context.c26
-rw-r--r--camel/camel-store.c8
-rw-r--r--camel/camel-stream-buffer.c8
24 files changed, 117 insertions, 104 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 343bbf3afb..66263461df 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,7 @@
+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):
diff --git a/camel/camel-cipher-context.c b/camel/camel-cipher-context.c
index ccec652863..717f79e37d 100644
--- a/camel/camel-cipher-context.c
+++ b/camel/camel-cipher-context.c
@@ -74,7 +74,7 @@ camel_cipher_context_finalise (CamelObject *o)
{
CamelCipherContext *context = (CamelCipherContext *)o;
- camel_object_unref (CAMEL_OBJECT (context->session));
+ camel_object_unref (context->session);
g_mutex_free (context->priv->lock);
@@ -134,7 +134,7 @@ camel_cipher_context_new (CamelSession *session)
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;
@@ -154,7 +154,7 @@ camel_cipher_context_construct (CamelCipherContext *context, CamelSession *sessi
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;
}
diff --git a/camel/camel-cms-context.c b/camel/camel-cms-context.c
index 252bb81300..7574ea458a 100644
--- a/camel/camel-cms-context.c
+++ b/camel/camel-cms-context.c
@@ -82,7 +82,7 @@ camel_cms_context_finalise (CamelObject *o)
{
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);
@@ -143,7 +143,7 @@ camel_cms_context_new (CamelSession *session)
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;
@@ -163,7 +163,7 @@ camel_cms_context_construct (CamelCMSContext *context, CamelSession *session)
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;
}
diff --git a/camel/camel-digest-folder.c b/camel/camel-digest-folder.c
index 595be88318..b2c81b5d4d 100644
--- a/camel/camel-digest-folder.c
+++ b/camel/camel-digest-folder.c
@@ -116,14 +116,14 @@ digest_finalize (CamelObject *object)
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);
@@ -231,7 +231,7 @@ camel_digest_folder_new (CamelStore *parent_store, CamelMimeMessage *message)
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));
@@ -310,7 +310,7 @@ digest_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
return NULL;
message = CAMEL_MIME_MESSAGE (wrapper);
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
return message;
}
diff --git a/camel/camel-disco-diary.c b/camel/camel-disco-diary.c
index d59f8b1004..927a97f432 100644
--- a/camel/camel-disco-diary.c
+++ b/camel/camel-disco-diary.c
@@ -405,7 +405,7 @@ camel_disco_diary_new (CamelDiscoStore *store, const char *filename, CamelExcept
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));
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 8ac4d8690e..ff6a8a88d2 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -254,7 +254,7 @@ camel_filter_driver_finalise (CamelObject *obj)
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))) {
@@ -345,14 +345,14 @@ camel_filter_driver_set_default_folder (CamelFilterDriver *d, CamelFolder *def)
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);
}
}
@@ -934,7 +934,7 @@ close_folder (void *key, void *value, void *data)
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"));
@@ -1141,7 +1141,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, co
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;
}
@@ -1150,7 +1150,7 @@ camel_filter_driver_filter_mbox (CamelFilterDriver *driver, const char *mbox, co
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);
@@ -1178,7 +1178,7 @@ fail:
if (fd != -1)
close (fd);
if (mp)
- camel_object_unref (CAMEL_OBJECT (mp));
+ camel_object_unref (mp);
return -1;
}
@@ -1352,7 +1352,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage
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)
@@ -1369,7 +1369,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage
uid = camel_message_info_uid (info);
if (message)
- camel_object_ref (CAMEL_OBJECT (message));
+ camel_object_ref (message);
}
p->ex = ex;
@@ -1458,7 +1458,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage
}
if (p->message)
- camel_object_unref (CAMEL_OBJECT (p->message));
+ camel_object_unref (p->message);
if (freeinfo)
camel_message_info_free (info);
@@ -1470,7 +1470,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage
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);
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 0fa2c5984a..8af3392e71 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -563,7 +563,7 @@ run_command (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessa
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);
@@ -676,13 +676,13 @@ camel_filter_search_match (CamelSession *session,
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);
diff --git a/camel/camel-folder-search.c b/camel/camel-folder-search.c
index 7045726df3..8262ee3c3a 100644
--- a/camel/camel-folder-search.c
+++ b/camel/camel-folder-search.c
@@ -867,7 +867,8 @@ match_words_1message (CamelDataWrapper *object, struct _camel_search_words *word
return TRUE;
}
}
- camel_object_unref (CAMEL_OBJECT (mem));
+
+ camel_object_unref (mem);
}
return truth;
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 034905ed2b..f682ee25ca 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -702,7 +702,7 @@ set_message_flags(CamelFolder *folder, const char *uid, guint32 flags, guint32 s
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);
}
/**
@@ -779,7 +779,7 @@ set_message_user_flag(CamelFolder *folder, const char *uid, const char *name, gb
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);
}
@@ -859,7 +859,7 @@ set_message_user_tag(CamelFolder *folder, const char *uid, const char *name, con
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);
}
@@ -1289,7 +1289,7 @@ transfer_message_to (CamelFolder *source, const char *uid, CamelFolder *dest,
}
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);
@@ -1415,7 +1415,7 @@ camel_folder_delete (CamelFolder *folder)
CAMEL_FOLDER_UNLOCK (folder, lock);
- camel_object_trigger_event (CAMEL_OBJECT (folder), "deleted", NULL);
+ camel_object_trigger_event (folder, "deleted", NULL);
}
static void
@@ -1451,7 +1451,7 @@ camel_folder_rename(CamelFolder *folder, const char *new)
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);
}
@@ -1507,7 +1507,7 @@ thaw (CamelFolder * folder)
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);
}
}
diff --git a/camel/camel-gpg-context.c b/camel/camel-gpg-context.c
index 2ff800615d..79c14d9b71 100644
--- a/camel/camel-gpg-context.c
+++ b/camel/camel-gpg-context.c
@@ -297,7 +297,7 @@ gpg_ctx_new (CamelSession *session)
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;
@@ -411,18 +411,18 @@ gpg_ctx_set_armor (struct _GpgCtx *gpg, gboolean armor)
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;
}
@@ -455,7 +455,7 @@ gpg_ctx_free (struct _GpgCtx *gpg)
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);
@@ -488,10 +488,10 @@ gpg_ctx_free (struct _GpgCtx *gpg)
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);
@@ -1349,7 +1349,8 @@ swrite (CamelStream *istream)
if (ret != -1)
ret = camel_stream_close (ostream);
}
- camel_object_unref (CAMEL_OBJECT (ostream));
+
+ camel_object_unref (ostream);
if (ret == -1) {
unlink (template);
diff --git a/camel/camel-http-stream.c b/camel/camel-http-stream.c
index 40bf71fdd3..b754422a3a 100644
--- a/camel/camel-http-stream.c
+++ b/camel/camel-http-stream.c
@@ -200,7 +200,7 @@ http_connect (CamelHttpStream *http, CamelURL *url)
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;
@@ -280,7 +280,7 @@ http_get_headers (CamelHttpStream *http)
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);
@@ -324,7 +324,7 @@ http_get_headers (CamelHttpStream *http)
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;
}
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index b3964f29e3..6a89682a2c 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -91,7 +91,7 @@ camel_medium_finalize (CamelObject *object)
CamelMedium *medium = CAMEL_MEDIUM (object);
if (medium->content)
- camel_object_unref (CAMEL_OBJECT (medium->content));
+ camel_object_unref (medium->content);
}
@@ -309,8 +309,8 @@ static void
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;
}
diff --git a/camel/camel-mime-filter-save.c b/camel/camel-mime-filter-save.c
index 1516527ded..3c6bf4b8a3 100644
--- a/camel/camel-mime-filter-save.c
+++ b/camel/camel-mime-filter-save.c
@@ -109,7 +109,7 @@ camel_mime_filter_save_new_with_stream (CamelStream *stream)
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;
}
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index b292e22bd0..7f4ac93f4b 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -179,7 +179,7 @@ camel_mime_message_get_type (void)
static void
unref_recipient (gpointer key, gpointer value, gpointer user_data)
{
- camel_object_unref (CAMEL_OBJECT (value));
+ camel_object_unref (value);
}
CamelMimeMessage *
@@ -527,13 +527,13 @@ process_header (CamelMedium *medium, const char *name, const char *value)
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;
@@ -873,7 +873,7 @@ check_content_id (CamelMimeMessage *message, CamelMimePart *part, void *data)
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;
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 80d6a6bf94..3a57a51970 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -901,12 +901,12 @@ camel_mime_part_set_content (CamelMimePart *camel_mime_part,
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;
}
}
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 6393e29251..3ec60147d5 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -147,7 +147,7 @@ camel_multipart_get_type (void)
static void
unref_part (gpointer data, gpointer user_data)
{
- CamelObject *part = CAMEL_OBJECT (data);
+ CamelObject *part = data;
camel_object_unref (part);
}
@@ -176,7 +176,7 @@ static void
add_part (CamelMultipart *multipart, CamelMimePart *part)
{
multipart->parts = g_list_append (multipart->parts, part);
- camel_object_ref (CAMEL_OBJECT (part));
+ camel_object_ref (part);
}
/**
@@ -200,7 +200,7 @@ static void
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);
}
/**
@@ -230,7 +230,7 @@ remove_part (CamelMultipart *multipart, CamelMimePart *part)
if (!multipart->parts)
return;
multipart->parts = g_list_remove (multipart->parts, part);
- camel_object_unref (CAMEL_OBJECT (part));
+ camel_object_unref (part);
}
/**
@@ -272,7 +272,7 @@ remove_part_at (CamelMultipart *multipart, guint index)
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;
diff --git a/camel/camel-sasl-anonymous.c b/camel/camel-sasl-anonymous.c
index 903212492d..9b97fdbc07 100644
--- a/camel/camel-sasl-anonymous.c
+++ b/camel/camel-sasl-anonymous.c
@@ -2,7 +2,7 @@
/*
* 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
@@ -20,6 +20,7 @@
*
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -29,6 +30,7 @@
#include "camel-internet-address.h"
#include <string.h>
+
CamelServiceAuthType camel_sasl_anonymous_authtype = {
N_("Anonymous"),
@@ -118,10 +120,10 @@ anon_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
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;
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
index 7f435612dd..24ee6e4d94 100644
--- a/camel/camel-sasl.c
+++ b/camel/camel-sasl.c
@@ -2,7 +2,7 @@
/*
* 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
@@ -20,6 +20,7 @@
*
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -38,6 +39,7 @@
#include "camel-sasl-popb4smtp.h"
#include "camel-sasl-ntlm.h"
+
#define w(x)
static CamelObjectClass *parent_class = NULL;
@@ -60,8 +62,8 @@ static void
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
@@ -191,32 +193,32 @@ camel_sasl_new (const char *service_name, const char *mechanism, CamelService *s
/* 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;
}
diff --git a/camel/camel-seekable-substream.c b/camel/camel-seekable-substream.c
index c4561175df..e92f4e0549 100644
--- a/camel/camel-seekable-substream.c
+++ b/camel/camel-seekable-substream.c
@@ -4,7 +4,7 @@
* 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
@@ -70,7 +70,7 @@ camel_seekable_substream_finalize (CamelObject *object)
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);
}
@@ -121,7 +121,7 @@ camel_seekable_substream_new(CamelSeekableStream *parent_stream, off_t start, of
/* 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.
diff --git a/camel/camel-service.c b/camel/camel-service.c
index bc4f4d8764..cd66bb9cb1 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -23,6 +23,7 @@
* USA
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -117,7 +118,7 @@ camel_service_finalize (CamelObject *object)
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);
@@ -299,7 +300,7 @@ construct (CamelService *service, CamelSession *session,
service->provider = provider;
service->url = url;
service->session = session;
- camel_object_ref (CAMEL_OBJECT (session));
+ camel_object_ref (session);
service->status = CAMEL_SERVICE_DISCONNECTED;
}
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 9d5fd7ea9f..c4e369b10b 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -497,7 +497,7 @@ camel_session_get_service_connected (CamelSession *session,
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;
}
}
diff --git a/camel/camel-smime-context.c b/camel/camel-smime-context.c
index dfd7ecd7f4..3c87c83f64 100644
--- a/camel/camel-smime-context.c
+++ b/camel/camel-smime-context.c
@@ -20,6 +20,8 @@
*
*/
+/* Note: much of the NSS code was copied from Mozilla's cmsutil.c program */
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -380,7 +382,7 @@ smime_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
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 */
@@ -394,7 +396,7 @@ smime_sign (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -495,7 +497,7 @@ smime_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
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 */
@@ -509,7 +511,7 @@ smime_certsonly (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -618,7 +620,7 @@ smime_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
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 */
@@ -632,7 +634,7 @@ smime_envelope (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -747,14 +749,14 @@ smime_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -764,7 +766,7 @@ smime_encrypt (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -933,9 +935,9 @@ smime_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
@@ -943,7 +945,7 @@ smime_decode (CamelCMSContext *ctx, CamelMimeMessage *message,
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;
}
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 3c49f312ec..96d840d2d3 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -424,7 +424,7 @@ camel_store_rename_folder (CamelStore *store, const char *old_name, const char *
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 {
@@ -490,7 +490,7 @@ init_trash (CamelStore *store)
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 */
@@ -512,14 +512,14 @@ static CamelFolder *
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."));
diff --git a/camel/camel-stream-buffer.c b/camel/camel-stream-buffer.c
index e8b0526873..8051441ae7 100644
--- a/camel/camel-stream-buffer.c
+++ b/camel/camel-stream-buffer.c
@@ -4,7 +4,7 @@
*
* 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
@@ -93,7 +93,7 @@ camel_stream_buffer_finalize (CamelObject *object)
g_free(sbf->buf);
}
if (sbf->stream)
- camel_object_unref(CAMEL_OBJECT(sbf->stream));
+ camel_object_unref (sbf->stream);
g_free(sbf->linebuf);
}
@@ -140,9 +140,9 @@ init_vbuf(CamelStreamBuffer *sbf, CamelStream *s, CamelStreamBufferMode mode, ch
{
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