Commit fe97fa2f authored by Dan Winship's avatar Dan Winship

kill camel-log

svn path=/trunk/; revision=2487
parent b0c0886a
2000-04-18 Dan Winship <danw@helixcode.com>
* tests/*: remove camel-log references
2000-04-17 Dan Winship <danw@helixcode.com>
* configure.in (xmlpatch): Require gnome-xml 1.8.7 (or later,
......
2000-04-18 Dan Winship <danw@helixcode.com>
* camel-log.[ch], *: Nuke camel log stuff. Replace calls to
CAMEL_LOG_WARNING with calls to g_warning.
* camel-data-wrapper.[ch]:
* camel-simple-data-wrapper.[ch]:
* camel-medium.[ch]: Clean, polish, document. Most of the gtk-doc
......
......@@ -33,7 +33,6 @@ endif
libcamel_la_SOURCES = \
camel.c \
camel-log.c \
camel-data-wrapper.c \
camel-exception.c \
camel-simple-data-wrapper.c \
......@@ -77,7 +76,6 @@ libcamel_la_SOURCES = \
libcamelinclude_HEADERS = \
camel.h \
camel-log.h \
camel-data-wrapper.h \
camel-exception.h \
camel-simple-data-wrapper.h \
......
......@@ -28,7 +28,6 @@
#include <config.h>
#include "camel-folder-pt-proxy.h"
#include "camel-log.h"
#include "camel-marshal-utils.h"
#include "camel-exception.h"
#include <pthread.h>
......@@ -237,12 +236,9 @@ _finalize (GtkObject *object)
CamelFolder *camel_folder = CAMEL_FOLDER (object);
CamelFolderPtProxy *camel_folder_pt_proxy = CAMEL_FOLDER_PT_PROXY (camel_folder);
CAMEL_LOG_FULL_DEBUG ("Entering CamelFolderPtProxy::finalize\n");
camel_exception_free (camel_folder_pt_proxy->thread_ex);
g_free (camel_folder_pt_proxy->pud);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolderPtProxy::finalize\n");
}
......
......@@ -26,7 +26,6 @@
*/
#include <config.h>
#include "camel-folder-summary.h"
#include "camel-log.h"
static GtkObjectClass *parent_class = NULL;
......
......@@ -27,7 +27,6 @@
#include <config.h>
#include "camel-folder-utils.h"
#include "camel-log.h"
#include "camel-mime-message.h"
......@@ -89,12 +88,11 @@ camel_aml_expunge_messages (GList *aml,
expunged_messages = g_list_prepend (expunged_messages, message);
}
}
else {
CAMEL_LOG_WARNING ("CamelFolder::expunge warning message_node contains no message\n");
} else {
g_warning ("CamelFolder::expunge warning message_node "
"contains no message\n");
}
message_node = next_message_node;
CAMEL_LOG_FULL_DEBUG ("CamelFolder::expunge, examined message node %p\n", message_node);
}
return expunged_messages;
......
......@@ -25,7 +25,6 @@
*/
#include <config.h>
#include "camel-folder.h"
#include "camel-log.h"
#include "camel-exception.h"
#include "camel-store.h"
#include "string-utils.h"
......@@ -223,8 +222,6 @@ _finalize (GtkObject *object)
{
CamelFolder *camel_folder = CAMEL_FOLDER (object);
CAMEL_LOG_FULL_DEBUG ("Entering CamelFolder::finalize\n");
g_free (camel_folder->name);
g_free (camel_folder->full_name);
g_free (camel_folder->permanent_flags);
......@@ -235,7 +232,6 @@ _finalize (GtkObject *object)
gtk_object_unref (GTK_OBJECT (camel_folder->parent_folder));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::finalize\n");
}
......@@ -325,8 +321,8 @@ _open_async (CamelFolder *folder,
gpointer user_data,
CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::open_async directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::open_async not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
}
......@@ -401,8 +397,8 @@ _close_async (CamelFolder *folder,
gpointer user_data,
CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::close_async directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::close_async not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
}
/**
......@@ -456,9 +452,6 @@ _set_name (CamelFolder *folder,
folder->name = NULL;
folder->full_name = NULL;
CAMEL_LOG_FULL_DEBUG ("CamelFolder::set_name, folder name is %s\n",
name);
if (folder->parent_folder) {
parent_full_name =
camel_folder_get_full_name (folder->parent_folder);
......@@ -469,8 +462,6 @@ _set_name (CamelFolder *folder,
full_name = g_strdup_printf ("%c%s", folder->separator, name);
}
CAMEL_LOG_FULL_DEBUG ("CamelFolder::set_name, folder full name "
"set to %s\n", full_name);
folder->name = g_strdup (name);
folder->full_name = full_name;
......@@ -851,8 +842,8 @@ camel_folder_delete (CamelFolder *folder, gboolean recurse, CamelException *ex)
static gboolean
_delete_messages (CamelFolder *folder, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::delete_messages directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::delete_messages not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return FALSE;
}
......@@ -971,8 +962,8 @@ camel_folder_get_mode (CamelFolder *folder, CamelException *ex)
static GList *
_list_subfolders (CamelFolder *folder, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::list_subfolders directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::list_folders not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......@@ -1000,8 +991,8 @@ camel_folder_list_subfolders (CamelFolder *folder, CamelException *ex)
static GList *
_expunge (CamelFolder *folder, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::expunge directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::expunge not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......@@ -1027,8 +1018,9 @@ camel_folder_expunge (CamelFolder *folder, CamelException *ex)
static gboolean
_has_message_number_capability (CamelFolder *folder)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::has_message_number_capability directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::has_message_number_capability not "
"implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return FALSE;
}
......@@ -1060,8 +1052,8 @@ camel_folder_has_message_number_capability (CamelFolder *folder)
static CamelMimeMessage *
_get_message_by_number (CamelFolder *folder, gint number, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_message_by_number "
"directly. Should be overloaded\n");
g_warning ("CamelFolder::get_message_by_number not implemented "
"for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......@@ -1091,8 +1083,8 @@ static void
_delete_message_by_number (CamelFolder *folder, gint number,
CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::delete_message_by_number "
"directly. Should be overloaded\n");
g_warning ("CamelFolder::delete_message_by_number not implemented "
"for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
}
/**
......@@ -1119,8 +1111,8 @@ camel_folder_delete_message_by_number (CamelFolder *folder, gint number,
static gint
_get_message_count (CamelFolder *folder, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_message_count directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::get_message_count not implemented "
"for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
return -1;
}
......@@ -1148,8 +1140,8 @@ static void
_append_message (CamelFolder *folder, CamelMimeMessage *message,
CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::append_message directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::append_message not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return;
}
......@@ -1274,8 +1266,8 @@ camel_folder_has_uid_capability (CamelFolder *folder)
static const gchar *
_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_message_uid directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::get_message_uid not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......@@ -1303,50 +1295,11 @@ camel_folder_get_message_uid (CamelFolder *folder, CamelMimeMessage *message, Ca
/* the next two func are left there temporarily */
#if 0
static const gchar *
_get_message_uid_by_number (CamelFolder *folder, gint message_number, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_message_uid_by_number "
"directly. Should be overloaded\n");
return NULL;
}
const gchar *
camel_folder_get_message_uid_by_number (CamelFolder *folder, gint message_number, CamelException *ex);
/**
* camel_folder_get_message_uid_by_number: get the UID corresponding to a message number
* @folder: Folder object
* @message_number: Message number
*
* get the UID corresponding to a message number.
* Use of this routine should be avoiding, as on
* folders supporting UIDs, message numbers should
* not been used.
*
* Return value:
**/
const gchar *
camel_folder_get_message_uid_by_number (CamelFolder *folder, gint message_number, CamelException *ex)
{
g_assert (folder != NULL);
/* if (!folder->has_uid_capability) return NULL; */
/* return CF_CLASS (folder)->get_message_uid_by_number (folder, message_number, ex); */
return NULL;
}
#endif /* 0 */
static CamelMimeMessage *
_get_message_by_uid (CamelFolder *folder, const gchar *uid, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_message_by_uid directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::get_message_by_uid not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......@@ -1376,8 +1329,8 @@ static void
_delete_message_by_uid (CamelFolder *folder, const gchar *uid,
CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::delete_message_by_uid "
"directly. Should be overloaded\n");
g_warning ("CamelFolder::delete_message_by_uid not implemented "
"for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
}
......@@ -1403,8 +1356,8 @@ camel_folder_delete_message_by_uid (CamelFolder *folder, const gchar *uid,
static GList *
_get_uid_list (CamelFolder *folder, CamelException *ex)
{
CAMEL_LOG_WARNING ("Calling CamelFolder::get_uid_list directly. "
"Should be overloaded\n");
g_warning ("CamelFolder::get_uid_list not implemented for `%s'",
gtk_type_name (GTK_OBJECT_TYPE (folder)));
return NULL;
}
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
*
* Author :
* Bertrand Guiheneuf <bertrand@helixcode.com>
*
* Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#include <config.h>
#include "camel-log.h"
int camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG;
FILE *camel_log_file_descriptor = NULL;
void
camel_log(guint level, const gchar *format, ... )
{
va_list args;
if (camel_log_file_descriptor == NULL)
camel_log_file_descriptor = stdout;
if (level<=camel_debug_level)
{
va_start(args, format);
vfprintf(camel_log_file_descriptor, format, args);
va_end (args);
}
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
*
* Author :
* Bertrand Guiheneuf <bertrand@helixcode.com>
*
* Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#ifndef CAMEL_LOG_H
#define CAMEL_LOG_H
#include <stdarg.h>
#include <glib.h>
#include <stdio.h>
extern int camel_debug_level;
extern FILE *camel_log_file_descriptor;
#define CAMEL_LOG_LEVEL_NO_LOG 0
#define CAMEL_LOG_LEVEL_STRANGE 5
#define CAMEL_LOG_LEVEL_WARNING 6
#define CAMEL_LOG_LEVEL_TRACE 8
#define CAMEL_LOG_LEVEL_FULL_DEBUG 10
/* #define CAMEL_HARD_LOG_LEVEL CAMEL_LOG_LEVEL_TRACE */
/* the idea here is to be able to have a hard maximum log
level, given at compilation time, and a soft one, given at
runtime (with camel_debug_level) */
#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_STRANGE
#define CAMEL_LOG_STRANGE(args...) camel_log(CAMEL_LOG_LEVEL_STRANGE, ##args)
#else /* CAMEL_LOG_LEVEL_STRANGE */
#define CAMEL_LOG_STRANGE(args...)
#endif /* CAMEL_LOG_LEVEL_STRANGE */
#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_WARNING
#define CAMEL_LOG_WARNING(args...) camel_log(CAMEL_LOG_LEVEL_WARNING, ##args)
#else /* CAMEL_LOG_LEVEL_WARNING */
#define CAMEL_LOG_WARNING(args...)
#endif /* CAMEL_LOG_LEVEL_WARNING */
#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_TRACE
#define CAMEL_LOG_TRACE(args...) camel_log(CAMEL_LOG_LEVEL_TRACE, ##args)
#else /* CAMEL_LOG_LEVEL_TRACE */
#define CAMEL_LOG_TRACE(args...)
#endif /* CAMEL_LOG_LEVEL_TRACE */
#if CAMEL_HARD_LOG_LEVEL>=CAMEL_LOG_LEVEL_FULL_DEBUG
#define CAMEL_LOG_FULL_DEBUG(args...) camel_log(CAMEL_LOG_LEVEL_FULL_DEBUG, ##args)
#else /* CAMEL_LOG_LEVEL_FULL_DEBUG */
#define CAMEL_LOG_FULL_DEBUG(args...)
#endif /* CAMEL_LOG_LEVEL_FULL_DEBUG */
extern void camel_log(guint level, const gchar *format, ... );
#endif /* CAMEL_LOG_H */
......@@ -28,7 +28,6 @@
#include "config.h"
#include "camel-log.h"
#include "camel-marshal-utils.h"
#include "camel-arg-collector.c"
......@@ -86,7 +85,6 @@ _collect_params (GtkArg *params,
if (error)
{
failed = TRUE;
CAMEL_LOG_FULL_DEBUG ("CamelMarshall::_collect_params(): %s", error);
g_free (error);
}
}
......@@ -145,7 +143,6 @@ camel_op_new (CamelFuncDef *func_def)
{
CamelOp *op;
CAMEL_LOG_FULL_DEBUG ("Entering CamelOp::new\n");
g_static_mutex_lock (&op_chunk_mutex);
if (!op_chunk)
op_chunk = g_mem_chunk_create (CamelOp,
......@@ -157,7 +154,6 @@ camel_op_new (CamelFuncDef *func_def)
op->func_def = func_def;
op->params = g_new (GtkArg, func_def->n_params);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::new\n");
return op;
}
......@@ -172,10 +168,8 @@ camel_op_new (CamelFuncDef *func_def)
void
camel_op_free (CamelOp *op)
{
CAMEL_LOG_FULL_DEBUG ("Entering CamelOp::free\n");
g_free (op->params);
g_chunk_free (op, op_chunk);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::free\n");
}
......@@ -189,13 +183,11 @@ camel_op_free (CamelOp *op)
void
camel_op_run (CamelOp *op)
{
CAMEL_LOG_FULL_DEBUG ("Entering CamelOp::run\n");
g_assert (op);
g_assert (op->func_def);
g_assert (op->params);
op->func_def->marshal (op->func, op->params);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::run\n");
}
......@@ -211,10 +203,8 @@ camel_op_run (CamelOp *op)
void
camel_op_set_user_data (CamelOp *op, gpointer user_data)
{
CAMEL_LOG_FULL_DEBUG ("Entering CamelOp::set_user_data\n");
g_assert (op);
op->user_data = user_data;
CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::set_user_data\n");
}
......@@ -230,9 +220,7 @@ camel_op_set_user_data (CamelOp *op, gpointer user_data)
gpointer
camel_op_get_user_data (CamelOp *op)
{
CAMEL_LOG_FULL_DEBUG ("Entering CamelOp::get_user_data\n");
g_assert (op);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::get_user_data\n");
return op->user_data;
}
......@@ -248,11 +236,9 @@ void camel_marshal_NONE__POINTER_INT (CamelFunc func,
{
CamelMarshal_NONE__POINTER_INT rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_INT\n");
rfunc = (CamelMarshal_NONE__POINTER_INT) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_INT(args[1]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_INT\n");
}
......@@ -267,12 +253,10 @@ void camel_marshal_NONE__POINTER_INT_POINTER (CamelFunc func,
{
CamelMarshal_NONE__POINTER_INT_POINTER rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_INT_POINTER\n");
rfunc = (CamelMarshal_NONE__POINTER_INT_POINTER) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_INT(args[1]),
GTK_VALUE_POINTER(args[2]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_INT_POINTER\n");
}
......@@ -284,12 +268,10 @@ void camel_marshal_NONE__POINTER_BOOL_POINTER (CamelFunc func,
{
CamelMarshal_NONE__POINTER_BOOL_POINTER rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_BOOL_POINTER\n");
rfunc = (CamelMarshal_NONE__POINTER_BOOL_POINTER) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_BOOL(args[1]),
GTK_VALUE_POINTER(args[2]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_BOOL_POINTER\n");
}
......@@ -302,13 +284,11 @@ void camel_marshal_NONE__POINTER_INT_POINTER_POINTER (CamelFunc func,
{
CamelMarshal_NONE__POINTER_INT_POINTER_POINTER rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_INT_POINTER_POINTER\n");
rfunc = (CamelMarshal_NONE__POINTER_INT_POINTER_POINTER) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_INT(args[1]),
GTK_VALUE_POINTER(args[2]),
GTK_VALUE_POINTER(args[3]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_INT_POINTER_POINTER\n");
}
......@@ -322,13 +302,11 @@ void camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER (CamelFunc func,
{
CamelMarshal_NONE__POINTER_BOOL_POINTER_POINTER rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER\n");
rfunc = (CamelMarshal_NONE__POINTER_BOOL_POINTER_POINTER) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_BOOL(args[1]),
GTK_VALUE_POINTER(args[2]),
GTK_VALUE_POINTER(args[3]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_BOOL_POINTER_POINTER\n");
}
......@@ -341,12 +319,10 @@ void camel_marshal_NONE__POINTER_POINTER_POINTER (CamelFunc func,
{
CamelMarshal_NONE__POINTER_POINTER_POINTER rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__POINTER_POINTER_POINTER\n");
rfunc = (CamelMarshal_NONE__POINTER_POINTER_POINTER) func;
(* rfunc) (GTK_VALUE_POINTER(args[0]),
GTK_VALUE_POINTER(args[1]),
GTK_VALUE_POINTER(args[2]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__POINTER_POINTER_POINTER\n");
}
......@@ -356,10 +332,8 @@ void camel_marshal_NONE__INT (CamelFunc func,
{
CamelMarshal_NONE__INT rfunc;
CAMEL_LOG_FULL_DEBUG ("Entering camel_marshal_NONE__INT\n");
rfunc = (CamelMarshal_NONE__INT) func;
(* rfunc) (GTK_VALUE_INT (args[0]));
CAMEL_LOG_FULL_DEBUG ("Leaving camel_marshal_NONE__INT\n");
}
......
......@@ -138,7 +138,7 @@ add_header (CamelMedium *medium, gchar *header_name, gchar *header_value)
/* FIXME: This only allows each header to occur once. */
if (g_hash_table_lookup_extended (medium->headers, header_name,
&old_name, &old_value)) {
g_hash_table_remove (medium->headers, old_header_name);
g_hash_table_remove (medium->headers, old_name);
g_free (old_name);
g_free (old_value);
}
......
......@@ -26,7 +26,6 @@
*/
#include <config.h>
#include "camel-mime-body-part.h"
#include "camel-log.h"
static void _set_parent (CamelMimeBodyPart *mime_body_part, CamelMultipart *multipart);
......@@ -87,11 +86,8 @@ CamelMimeBodyPart *
camel_mime_body_part_new (void)
{
CamelMimeBodyPart *mime_body_part;
CAMEL_LOG_FULL_DEBUG ("CamelMimeBodyPart:: Entering new()\n");
mime_body_part = (CamelMimeBodyPart *)gtk_type_new (CAMEL_MIME_BODY_PART_TYPE);
CAMEL_LOG_FULL_DEBUG ("CamelMimeBodyPart:: Leaving new()\n");
return mime_body_part;
}
......
......@@ -29,7 +29,6 @@
#include <stdio.h>
#include "gmime-content-field.h"
#include "string-utils.h"
#include "camel-log.h"
#include "gmime-utils.h"
#include "hash-table-utils.h"
......@@ -189,7 +188,6 @@ _finalize (GtkObject *object)
{
CamelMimeMessage *message = CAMEL_MIME_MESSAGE (object);
CAMEL_LOG_FULL_DEBUG ("Entering CamelMimeMessage::finalize\n");
g_free (message->received_date);
g_free (message->sent_date);
g_free (message->subject);
......@@ -204,7 +202,6 @@ _finalize (GtkObject *object)
g_hash_table_destroy(message->flags);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
CAMEL_LOG_FULL_DEBUG ("Leaving CamelMimeMessage::finalize\n");
}
......@@ -238,15 +235,6 @@ _get_field (CamelMimeMessage *mime_message, gchar *name, gchar *variable)
return variable;
}
static gboolean
_check_not_expunged (CamelMimeMessage *mime_message)
{
if (mime_message->expunged) {
CAMEL_LOG_WARNING ("CamelMimeMessage:: An invalid operation has been tempted on an expunged message\n");
}
return (!mime_message->expunged);
}
/* * */
......@@ -260,7 +248,7 @@ void
camel_mime_message_set_received_date (CamelMimeMessage *mime_message, const gchar *received_date)
{
g_assert (mime_message);
g_return_if_fail (_check_not_expunged (mime_message));
g_return_if_fail (!mime_message->expunged);
CMM_CLASS (mime_message)->set_received_date (mime_message, received_date);
}
......@@ -275,7 +263,7 @@ const gchar *
camel_mime_message_get_received_date (CamelMimeMessage *mime_message)
{
g_assert (mime_message);
g_return_val_if_fail (_check_not_expunged (mime_message), NULL);
g_return_val_if_fail (!mime_message->expunged, NULL);
return CMM_CLASS (mime_message)->get_received_date (mime_message);
}
......@@ -290,7 +278,7 @@ const gchar *
camel_mime_message_get_sent_date (CamelMimeMessage *mime_message)
{
g_assert (mime_message);
g_return_val_if_fail (_check_not_expunged (mime_message), NULL);
g_return_val_if_fail (!mime_message->expunged, NULL);
return CMM_CLASS (mime_message)->get_sent_date (mime_message);
}
......@@ -305,7 +293,7 @@ void
camel_mime_message_set_reply_to (CamelMimeMessage *mime_message, const gchar *reply_to)
{
g_assert (mime_message);
g_return_if_fail (_check_not_expunged (mime_message));
g_return_if_fail (!mime_message->expunged);
CMM_CLASS (mime_message)->set_reply_to (mime_message, reply_to);
}
......@@ -320,7 +308,7 @@ const gchar *
camel_mime_message_get_reply_to (CamelMimeMessage *mime_message)
{
g_assert (mime_message);
g_return_val_if_fail (_check_not_expunged (mime_message), NULL);
g_return_val_if_fail (!mime_message->expunged, NULL);
return CMM_CLASS (mime_message)->get_reply_to (mime_message);
}
......@@ -338,7 +326,7 @@ camel_mime_message_set_subject (CamelMimeMessage *mime_message,
const gchar *subject)
{
g_assert (mime_message);
g_return_if_fail (_check_not_expunged (mime_message));
g_return_if_fail (!mime_message->expunged);
CMM_CLASS (mime_message)->set_subject (mime_message, subject);
}
......@@ -353,7 +341,7 @@ const gchar *
camel_mime_message_get_subject (CamelMimeMessage *mime_message)
{
g_assert (mime_message);
g_return_val_if_fail (_check_not_expunged (mime_message), NULL);
g_return_val_if_fail (!mime_message->expunged, NULL);
return CMM_CLASS (mime_message)->get_subject (mime_message);
}
......@@ -370,7 +358,7 @@ void
camel_mime_message_set_from (CamelMimeMessage *mime_message, const gchar *from)
{
g_assert (mime_message);
g_return_if_fail (_check_not_expunged (mime_message));
g_return_if_fail (!mime_message->expunged);