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
libcamel_la_SOURCES = \
camel.c \
- camel-log.c \
camel-data-wrapper.c \
camel-exception.c \
camel-simple-data-wrapper.c \
libcamelinclude_HEADERS = \
camel.h \
- camel-log.h \
camel-data-wrapper.h \
camel-exception.h \
camel-simple-data-wrapper.h \
#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>
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");
}
*/
#include <config.h>
#include "camel-folder-summary.h"
-#include "camel-log.h"
static GtkObjectClass *parent_class = NULL;
#include <config.h>
#include "camel-folder-utils.h"
-#include "camel-log.h"
#include "camel-mime-message.h"
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;
*/
#include <config.h>
#include "camel-folder.h"
-#include "camel-log.h"
#include "camel-exception.h"
#include "camel-store.h"
#include "string-utils.h"
{
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);
gtk_object_unref (GTK_OBJECT (camel_folder->parent_folder));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::finalize\n");
}
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)));
}
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)));
}
/**
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);
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;
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;
}
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;
}
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;
}
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;
}
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;
}
_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)));
}
/**
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;
}
_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;
}
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;
}
-/* 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;
}
_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)));
}
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;
}
+++ /dev/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);
- }
-}
+++ /dev/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
- */
-
-#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 */
#include "config.h"
-#include "camel-log.h"
#include "camel-marshal-utils.h"
#include "camel-arg-collector.c"
if (error)
{
failed = TRUE;
- CAMEL_LOG_FULL_DEBUG ("CamelMarshall::_collect_params(): %s", error);
g_free (error);
}
}
{
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,
op->func_def = func_def;
op->params = g_new (GtkArg, func_def->n_params);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOp::new\n");
return op;
}
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");
}
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");
}
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");
}
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;
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
{
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");
}
/* 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);
}
*/
#include <config.h>
#include "camel-mime-body-part.h"
-#include "camel-log.h"
static void _set_parent (CamelMimeBodyPart *mime_body_part, CamelMultipart *multipart);
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;
}
#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"
{
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);
g_hash_table_destroy(message->flags);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMimeMessage::finalize\n");
}
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);
-}
-
/* * */
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
CMM_CLASS (mime_message)->set_from (mime_message, from);
}
camel_mime_message_get_from (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_from (mime_message);
}
const gchar *recipient)
{
g_assert (mime_message);
- g_return_if_fail (_check_not_expunged (mime_message));
+ g_return_if_fail (!mime_message->expunged);
CMM_CLASS (mime_message)->add_recipient (mime_message, recipient_type, recipient);
}
const gchar *recipient)
{
g_assert (mime_message);
- g_return_if_fail (_check_not_expunged (mime_message));
+ g_return_if_fail (!mime_message->expunged);
CMM_CLASS (mime_message)->remove_recipient (mime_message, recipient_type, recipient);
}
const gchar *recipient_type)
{
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_recipients (mime_message, recipient_type);
}
camel_mime_message_set_flag (CamelMimeMessage *mime_message, const gchar *flag, gboolean value)
{
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_flag (mime_message, flag, value);
}
camel_mime_message_get_flag (CamelMimeMessage *mime_message, const gchar *flag)
{
g_assert (mime_message);
- g_return_val_if_fail (_check_not_expunged (mime_message), FALSE);
+ g_return_val_if_fail (!mime_message->expunged, FALSE);
return CMM_CLASS (mime_message)->get_flag (mime_message, flag);
}
camel_mime_message_get_flag_list (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_flag_list (mime_message);
}
{
CamelMimeMessage *mm = CAMEL_MIME_MESSAGE (data_wrapper);
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage::write_to_stream\n");
-
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing \"From\"\n");
WHPT (stream, "From", mm->from);
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing \"Reply-To\"\n");
WHPT (stream, "Reply-To", mm->reply_to);
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing recipients\n");
_write_recipients_to_stream (mm, stream);
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing \"Date\"\n");
WHPT (stream, "Date", mm->received_date);
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing \"Subject\"\n");
WHPT (stream, "Subject", mm->subject);
/* FIXME correct to do it here? */
- CAMEL_LOG_FULL_DEBUG ( "CamelMimeMessage:: Writing \"Mime-Version\"\n");
WHPT (stream, "Mime-Version", "1.0");
CAMEL_DATA_WRAPPER_CLASS (parent_class)->write_to_stream (data_wrapper, stream);
{
GList *recipients_list;
- CAMEL_LOG_FULL_DEBUG ("CamelMimeMessage::_set_recipient_list_from_string parsing ##%s##\n", recipients_string);
recipients_list = string_split (
recipients_string, ',', "\t ",
STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING);
switch (header_type) {
case HEADER_FROM:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_FROM : %s\n",
- header_value );
-
camel_mime_message_set_from (message, header_value);
header_handled = TRUE;
break;
case HEADER_REPLY_TO:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_REPLY_YO : %s\n",
- header_value );
-
camel_mime_message_set_reply_to (message, header_value);
header_handled = TRUE;
break;
case HEADER_SUBJECT:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_SUBJECT : %s\n",
- header_value );
-
camel_mime_message_set_subject (message, header_value);
header_handled = TRUE;
break;
case HEADER_TO:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_TO : %s\n",
- header_value );
-
_set_recipient_list_from_string (message, "To", header_value);
header_handled = TRUE;
break;
case HEADER_CC:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_CC : %s\n",
- header_value );
-
_set_recipient_list_from_string (message, "Cc", header_value);
header_handled = TRUE;
break;
case HEADER_BCC:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimeMessage::parse_header_pair found HEADER_BCC : %s\n",
- header_value );
-
_set_recipient_list_from_string (message, "Bcc", header_value);
header_handled = TRUE;
break;
#include <config.h>
#include "gmime-content-field.h"
#include "string-utils.h"
-#include "camel-log.h"
#include "gmime-utils.h"
#include "camel-simple-data-wrapper.h"
#include "data-wrapper-repository.h"
Rfc822Header *cur_header;
int i;
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils:: "
- "Entering _construct_headers_from_stream\n");
g_assert (stream);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream "
- "parsing headers\n");
/*
* parse all header lines
*/
g_array_free (header_array, TRUE);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_headers_from_stream headers parsed. Leaving\n");
}
}
/*
* find content mime type
*/
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream "
- "parsing content\n");
-
content_type = camel_mime_part_get_content_type (mime_part);
/* here we should have a mime type */
if (content_type)
* using text/plain is the default
*/
if (!mime_type) {
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream "
- "content type field not found "
- "using default \"text/plain\"\n");
mime_type = g_strdup ("text/plain");
camel_mime_part_set_content_type (mime_part, mime_type);
}
*/
content_object_type =
data_wrapper_repository_get_data_wrapper_type (mime_type);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream content"
- " type object type used: %s\n",
- gtk_type_name (content_object_type));
g_free (mime_type);
* so unref it here
*/
gtk_object_unref (GTK_OBJECT (content_object));
-
-
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::construct_content_from_stream "
- "content parsed\n");
-
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils:: Leaving _construct_content_from_stream\n");
}
GByteArray *buffer;
#define STREAM_READ_CHUNK_SZ 100
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::store_stream_in_buffer entering\n");
-
if (mime_part->temp_message_buffer == NULL)
mime_part->temp_message_buffer = g_byte_array_new ();
}
g_byte_array_set_size (buffer, nb_bytes_read_total);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePartUtils::store_stream_in_buffer entering\n");
-
}
#include <stdio.h>
#include "gmime-content-field.h"
#include "string-utils.h"
-#include "camel-log.h"
#include "gmime-utils.h"
#include "camel-simple-data-wrapper.h"
#include "hash-table-utils.h"
#warning do something for (mime_part->disposition) which should not be a GMimeContentField
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMimePart::finalize\n");
-
g_free (mime_part->description);
g_free (mime_part->content_id);
g_free (mime_part->content_MD5);
if (mime_part->content_input_stream) gtk_object_unref (GTK_OBJECT (mime_part->content_input_stream));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMimePart::finalize\n");
}
gmime_content_field_unref (mime_part->content_type);
mime_part->content_type = object_content_field;
gmime_content_field_ref (object_content_field);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMimePart::set_content_object\n");
-
}
static CamelDataWrapper *
CamelStream *stream;
CamelStream *decoded_stream;
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_content_object entering\n");
-
if (!medium->content ) {
stream = mime_part->content_input_stream;
decoded_stream = stream;
camel_mime_part_construct_content_from_stream (mime_part, decoded_stream);
- } else {
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_content_object part has a pointer "
- "to a content object\n");
}
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_content_object leaving\n");
-
return parent_class->get_content_object (medium);
}
CamelDataWrapper *content;
- CAMEL_LOG_FULL_DEBUG ( "Entering CamelMimePart::_write_content_to_stream\n");
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::_write_content_to_stream, content=%p\n", content);
-
g_assert (mime_part);
medium = CAMEL_MEDIUM (mime_part);
camel_mime_part_encoding_to_string
(mime_part->encoding));
}
-
- CAMEL_LOG_FULL_DEBUG ( "Leaving CamelMimePart::_write_content_to_stream\n");
}
CamelMimePart *mp = CAMEL_MIME_PART (data_wrapper);
CamelMedium *medium = CAMEL_MEDIUM (data_wrapper);
- CAMEL_LOG_FULL_DEBUG ( "Entering CamelMimePart::write_to_stream\n");
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-disposition\n");
gmime_content_field_write_to_stream(mp->disposition, stream);
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-transfer-encoding\n");
WHPT (stream, "Content-Transfer-Encoding",
camel_mime_part_encoding_to_string (mp->encoding));
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-description\n");
WHPT (stream, "Content-Description", mp->description);
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-MD5\n");
WHPT (stream, "Content-MD5", mp->content_MD5);
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-id\n");
WHPT (stream, "Content-id", mp->content_id);
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-languages\n");
gmime_write_header_with_glist_to_stream (stream, "Content-Language", mp->content_languages,", ");
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing other headers\n");
gmime_write_header_table_to_stream (stream, medium->headers);
-
- CAMEL_LOG_FULL_DEBUG ( "CamelMimePart::write_to_stream writing content-type\n");
gmime_content_field_write_to_stream (mp->content_type, stream);
camel_stream_write_string(stream,"\n");
my_write_content_to_stream (mp, stream);
-
}
switch (header_type) {
case HEADER_DESCRIPTION:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_DESCRIPTION: %s\n",
- header_value );
-
camel_mime_part_set_description (mime_part, header_value);
header_handled = TRUE;
break;
case HEADER_DISPOSITION:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_DISPOSITION: %s\n",
- header_value);
-
camel_mime_part_set_disposition (mime_part, header_value);
header_handled = TRUE;
break;
case HEADER_CONTENT_ID:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_CONTENT_ID: %s\n",
- header_value);
-
CMP_CLASS(mime_part)->set_content_id (mime_part, header_value);
header_handled = TRUE;
break;
case HEADER_ENCODING:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_ENCODING: %s\n",
- header_value);
-
camel_mime_part_set_encoding
(mime_part,
camel_mime_part_encoding_from_string (header_value));
break;
case HEADER_CONTENT_MD5:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_CONTENT_MD5: %s\n",
- header_value );
-
CMP_CLASS(mime_part)->set_content_MD5 (mime_part, header_value);
header_handled = TRUE;
break;
case HEADER_CONTENT_TYPE:
- CAMEL_LOG_FULL_DEBUG (
- "CamelMimePart::parse_header_pair found HEADER_CONTENT_TYPE: %s\n",
- header_value );
-
gmime_content_field_construct_from_string (mime_part->content_type, header_value);
header_handled = TRUE;
break;
CamelMimePart *mime_part = CAMEL_MIME_PART (data_wrapper);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_from_stream entering\n");
camel_mime_part_construct_headers_from_stream (mime_part, stream);
camel_mime_part_store_stream_in_buffer (mime_part, stream);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::construct_from_stream leaving\n");
-
}
guint32 content_stream_inf_bound;
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::set_input_stream entering\n");
-
g_assert (CAMEL_IS_SEEKABLE_STREAM (stream));
seekable_stream = CAMEL_SEEKABLE_STREAM (stream);
content_stream_inf_bound,
-1);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::set_input_stream leaving\n");
-
}
* For the moment, we do not use this routine on
* mime parts. Maybe later.
*/
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_output_stream leaving\n");
input_stream = camel_data_wrapper_get_input_stream (data_wrapper);
if (input_stream == NULL)
return input_stream;
}
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::get_output_stream leaving\n");
-
return NULL;
}
CamelSimpleDataWrapper *simple_data_wrapper;
CamelMedium *medium = CAMEL_MEDIUM (camel_mime_part);
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart:: Entering set_text\n");
- CAMEL_LOG_TRACE ("CamelMimePart::set_text, setting text as a mime part content\n");
- if (medium->content) {
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::set_text unreferencing old content object\n");
+ if (medium->content)
gtk_object_unref (GTK_OBJECT (medium->content));
- }
if (text) {
simple_data_wrapper = camel_simple_data_wrapper_new ();
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart::set_text calling CamelSimpleDataWrapper:set_text with %d chars\n", strlen (text));
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (simple_data_wrapper), "text/plain");
camel_simple_data_wrapper_set_text ( simple_data_wrapper, text);
camel_medium_set_content_object ( CAMEL_MEDIUM (camel_mime_part), CAMEL_DATA_WRAPPER (simple_data_wrapper));
gtk_object_unref (GTK_OBJECT (simple_data_wrapper));
} else medium->content = NULL;
-
- CAMEL_LOG_FULL_DEBUG ("CamelMimePart:: Leaving camel_mime_part_set_text\n");
}
*/
#include <config.h>
-#include "camel-log.h"
#include "gmime-content-field.h"
#include "gmime-utils.h"
#include "camel-stream-mem.h"
{
CamelMultipart *multipart = CAMEL_MULTIPART (object);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMultipart::finalize\n");
-
if (multipart->parent) gtk_object_unref (GTK_OBJECT (multipart->parent));
g_list_foreach (multipart->parts, my_unref_part, NULL);
if (multipart->postface) g_free (multipart->postface);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMultipart::finalize\n");
}
camel_multipart_new (void)
{
CamelMultipart *multipart;
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Entering new()\n");
multipart = (CamelMultipart *)gtk_type_new (CAMEL_MULTIPART_TYPE);
multipart->preface = NULL;
multipart->postface = NULL;
-
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Leaving new()\n");
return multipart;
}
static void
my_remove_part (CamelMultipart *multipart, CamelMimeBodyPart *part)
{
- if (!multipart->parts) {
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::remove_part part list id void\n");
+ if (!multipart->parts)
return;
- }
multipart->parts = g_list_remove (multipart->parts, part);
if (part) gtk_object_unref (GTK_OBJECT (part));
}
GList *part_to_remove;
CamelMimeBodyPart *removed_body_part;
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Entering remove_part_at\n");
- CAMEL_LOG_TRACE ("CamelMultipart::remove_part_at : Removing part number %d\n", index);
-
- if (!(multipart->parts)) {
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::remove_part_at part list is void \n");
+ if (!(multipart->parts))
return NULL;
- }
parts_list = multipart->parts;
part_to_remove = g_list_nth (parts_list, index);
if (!part_to_remove) {
- CAMEL_LOG_WARNING ("CamelMultipart::remove_part_at : part to remove is NULL\n");
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::remove_part_at : index = %d, number of parts=%d\n",
- index, g_list_length (parts_list));
+ g_warning ("CamelMultipart::remove_part_at: "
+ "part to remove is NULL\n");
return NULL;
}
removed_body_part = CAMEL_MIME_BODY_PART (part_to_remove->data);
if (part_to_remove->data) gtk_object_unref (GTK_OBJECT (part_to_remove->data));
g_list_free_1 (part_to_remove);
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Leaving remove_part_at\n");
return removed_body_part;
}
my_get_part (CamelMultipart *multipart, guint index)
{
GList *part;
- if (!(multipart->parts)) {
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::get_part part list is void \n");
+ if (!(multipart->parts))
return NULL;
- }
part = g_list_nth (multipart->parts, index);
if (part) return CAMEL_MIME_BODY_PART (part->data);
- else {
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::get_part part number %d not found\n", index);
+ else
return NULL;
- }
}
CamelMimeBodyPart *
my_get_boundary (CamelMultipart *multipart)
{
const gchar *boundary;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMultipart::_get_boundary\n");
if (!CAMEL_DATA_WRAPPER (multipart)->mime_type) {
- CAMEL_LOG_WARNING ("CamelMultipart::_get_boundary CAMEL_DATA_WRAPPER (multipart)->mime_type is NULL\n");
+ g_warning ("CamelMultipart::_get_boundary CAMEL_DATA_WRAPPER "
+ "(multipart)->mime_type is NULL\n");
return NULL;
}
boundary = gmime_content_field_get_parameter (CAMEL_DATA_WRAPPER (multipart)->mime_type, "boundary");
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMultipart::boundary found : \"%s\"\n", boundary);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMultipart::_get_boundary\n");
return boundary;
}
struct my_print_part_user_data ud;
const gchar *boundary;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMultipart::_write_to_stream entering\n");
-
/* get the bundary text */
boundary = camel_multipart_get_boundary (multipart);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMultipart::_write_to_stream, boundary = %s\n", boundary);
/* we cannot write a multipart without a boundary string */
g_return_if_fail (boundary);
/* and finally the postface */
if (multipart->postface) camel_stream_write_strings (stream, multipart->postface, NULL);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMultipart::_write_to_stream leaving \n");
}
* element, the program should not think it will find the last boundary,
* and in particular, the message could have been damaged during
* transport, the parsing should still be OK */
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Entering my_localize_part\n");
g_assert (CAMEL_IS_SEEKABLE_STREAM (stream));
*end_position = last_position;
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart:: Leaving my_localize_part\n");
return (last_part);
}
guint32 saved_stream_pos;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMultipart::_set_input_stream\n");
-
/* call parent class implementation */
parent_class->set_input_stream (data_wrapper, stream);
/* determine the position of the begining of the part */
part_begining = camel_seekable_stream_get_current_position (seekable_stream);
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::set_input_stream, detected a new part\n");
body_part = camel_mime_body_part_new ();
end_of_multipart = my_localize_part (stream,
camel_seekable_substream_new_with_seekable_stream_and_bounds (seekable_stream,
part_begining,
part_end));
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::set_input_stream, use a substream,\n"
- "\tbegining = %d\n"
- "\tend = %d\n",part_begining, part_end);
/* the seekable substream may change the position of the stream
so we must save it before calling set_input_stream */
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (body_part),
CAMEL_STREAM (body_part_input_stream));
- CAMEL_LOG_FULL_DEBUG ("CamelMultipart::set_input_stream,"
- "new body part has input stream : %p\n", body_part_input_stream);
/* restore the stream position */
camel_seekable_stream_seek (seekable_stream, saved_stream_pos, CAMEL_STREAM_SET);
g_free (real_boundary_line);
g_free (end_boundary_line);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMultipart::_set_input_stream\n");
}
#include <config.h>
-#include "camel-log.h"
#include "camel-op-queue.h"
static GStaticMutex op_queue_mutex = G_STATIC_MUTEX_INIT;
{
CamelOpQueue *op_queue;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::new\n");
-
op_queue = g_new (CamelOpQueue, 1);
op_queue->ops_tail = NULL;
op_queue->ops_head = NULL;
op_queue->service_available = TRUE;
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::new\n");
return op_queue;
}
void
camel_op_queue_free (CamelOpQueue *op_queue)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::free\n");
g_list_free (op_queue->ops_head);
g_free (op_queue);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::free\n");
}
/**
void
camel_op_queue_push_op (CamelOpQueue *queue, CamelOp *op)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::push_op\n");
g_assert (queue);
g_static_mutex_lock (&op_queue_mutex);
if (!queue->ops_tail) {
- CAMEL_LOG_FULL_DEBUG ("CamelOpQueue::push_op queue does not exists yet. "
- "Creating it\n");
queue->ops_head = g_list_prepend (NULL, op);
queue->ops_tail = queue->ops_head;
} else
queue->ops_head = g_list_prepend (queue->ops_head, op);
g_static_mutex_unlock (&op_queue_mutex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::push_op\n");
}
GList *op_list;
CamelOp *op;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::pop_op\n");
g_assert (queue);
g_static_mutex_lock (&op_queue_mutex);
op = (CamelOp *)op_list->data;
g_static_mutex_unlock (&op_queue_mutex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::pop_op\n");
return op;
}
{
CamelOp *op;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::run_next_op\n");
op = camel_op_queue_pop_op (queue);
if (!op) return FALSE;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::run_next_op\n");
return FALSE;
}
void
camel_op_queue_set_service_availability (CamelOpQueue *queue, gboolean available)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::set_service_availability\n");
g_static_mutex_lock (&op_queue_mutex);
queue->service_available = available;
g_static_mutex_unlock (&op_queue_mutex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::set_service_availability\n");
}
/**
{
gboolean available;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelOpQueue::get_service_availability\n");
g_static_mutex_lock (&op_queue_mutex);
available = queue->service_available;
g_static_mutex_unlock (&op_queue_mutex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelOpQueue::get_service_availability\n");
return available;
}
#include "config.h"
#include "camel-provider.h"
-#include "camel-log.h"
#include <dirent.h>
#include <string.h>
CamelProvider * (*camel_provider_module_init) ();
gboolean has_module_init;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelProvider::register_as_module\n");
-
g_return_val_if_fail (module_path, NULL);
if (!g_module_supported ()) {
- CAMEL_LOG_WARNING ("CamelProvider::register_as_module module loading not supported on this system\n");
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n");
+ g_warning ("CamelProvider::register_as_module: module "
+ "loading not supported on this system\n");
return NULL;
}
new_module = g_module_open (module_path, 0);
if (!new_module) {
printf ("g_module_open reports: %s\n", g_module_error ());
- CAMEL_LOG_WARNING ("CamelProvider::register_as_module Unable to load module %s\n", module_path);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n");
+ g_warning ("CamelProvider::register_as_module: Unable to "
+ "load module %s\n", module_path);
return NULL;
}
has_module_init = g_module_symbol (new_module, "camel_provider_module_init", (gpointer *)&camel_provider_module_init);
if (!has_module_init){
- CAMEL_LOG_WARNING ("CamelProvider::register_as_module loading of module %s failed,\n"
- "\t Symbol camel_provider_module_init not defined in it\n", module_path);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n");
+ g_warning ("CamelProvider::register_as_module loading "
+ "of module %s failed,\n\tSymbol "
+ "camel_provider_module_init not defined in it\n",
+ module_path);
return NULL;
}
new_provider->gmodule = new_module;
camel_provider_register (new_provider);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelProvider::register_as_module\n");
return new_provider;
-
-
}
/**
#include <config.h>
#include "camel-seekable-stream.h"
-#include "camel-log.h"
static CamelStreamClass *parent_class=NULL;
*/
#include <config.h>
#include "camel-seekable-substream.h"
-#include "camel-log.h"
static CamelSeekableStreamClass *parent_class=NULL;
static void
_destroy (GtkObject *object)
{
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelSeekableSubstream::destroy\n");
-
/* does nothing for the moment */
GTK_OBJECT_CLASS (parent_class)->destroy (object);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelSeekableSubstream::destroy\n");
}
{
CamelSeekableStream *seekable_stream;
CamelSeekableSubstream *seekable_substream;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelSeekableSubstream::finalize\n");
seekable_stream = CAMEL_SEEKABLE_STREAM (object);
seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (object);
gtk_object_unref (GTK_OBJECT (seekable_substream->parent_stream));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelSeekableSubstream::finalize\n");
}
static void
_set_bounds (CamelSeekableSubstream *seekable_substream, guint32 inf_bound, gint64 sup_bound)
{
- CAMEL_LOG_FULL_DEBUG ("CamelSeekableSubstream::_set_bounds entering\n");
-
g_assert (seekable_substream);
g_assert (seekable_substream->parent_stream);
seekable_substream->cur_pos = 0;
seekable_substream->eos = FALSE;
-
- CAMEL_LOG_FULL_DEBUG ("In CamelSeekableSubstream::_set_bounds (%p), "
- "setting inf bound to %lu, "
- "sup bound to %lld, current position to %lu from %lu\n"
- "Parent stream = %p\n",
- seekable_substream,
- seekable_substream->inf_bound, seekable_substream->sup_bound,
- seekable_substream->cur_pos, inf_bound,
- seekable_substream->parent_stream);
-
- CAMEL_LOG_FULL_DEBUG ("CamelSeekableSubstream::_set_bounds Leaving\n");
}
static void
/* if the return value is negative, an error occured,
we must do something FIXME : handle exception */
- if (v<0)
- CAMEL_LOG_FULL_DEBUG ("CamelSeekableSubstream::read v=%d\n", v);
- else
+ if (v>0)
seekable_stream->cur_pos += v;
{
/* NOT VALID ON SEEKABLE SUBSTREAM */
g_warning ("CamelSeekableSubstream:: seekable substream don't have a write method\n");
- CAMEL_LOG_WARNING ( "CamelSeekableSubstream:: seekable substream don't have a write method\n");
return -1;
}
{
/* NOT VALID ON SEEKABLE SUBSTREAM */
g_warning ("CamelSeekableSubstream:: seekable substream don't have a flush method\n");
- CAMEL_LOG_WARNING ( "CamelSeekableSubstream:: seekable substream don't have a flush method\n");
}
*/
#include <config.h>
#include "camel-service.h"
-#include "camel-log.h"
#include "camel-exception.h"
#include <ctype.h>
{
CamelService *camel_service = CAMEL_SERVICE (object);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelService::finalize\n");
-
if (camel_service->url)
camel_url_free (camel_service->url);
if (camel_service->session)
gtk_object_unref (GTK_OBJECT (camel_service->session));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelService::finalize\n");
}
#include "camel-store.h"
#include "camel-folder.h"
#include "camel-exception.h"
-#include "camel-log.h"
static CamelServiceClass *parent_class = NULL;
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-#include "camel-log.h"
static CamelStreamBufferClass *parent_class=NULL;
{
CamelStreamBuffer *stream_buffer = CAMEL_STREAM_BUFFER (object);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamBuffer::destroy\n");
-
/* NOP to remove warnings */
stream_buffer->buf = stream_buffer->buf;
-
GTK_OBJECT_CLASS (parent_class)->destroy (object);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamBuffer::destroy\n");
}
{
CamelStreamBuffer *sbf = CAMEL_STREAM_BUFFER (object);
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamBuffer::finalize\n");
-
if (!(sbf->flags & BUF_USER)) {
g_free(sbf->buf);
}
gtk_object_unref(GTK_OBJECT(sbf->stream));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamBuffer::finalize\n");
}
static void
#undef BUFFER_SIZE
}
-static CamelStream *
-get_stream (CamelDataWrapper *data_wrapper)
-{
- CamelStreamDataWrapper *stream_data_wrapper;
-
- stream_data_wrapper = CAMEL_STREAM_DATA_WRAPPER (data_wrapper);
- return stream_data_wrapper->stream;
-}
-
\f
/* GtkObject methods. */
data_wrapper_class = CAMEL_DATA_WRAPPER_CLASS (class);
data_wrapper_class->write_to_stream = write_to_stream;
- data_wrapper_class->get_stream = get_stream;
parent_class = gtk_type_class (camel_data_wrapper_get_type ());
}
#include <fcntl.h>
#include <errno.h>
#include <string.h>
-#include "camel-log.h"
static CamelSeekableStreamClass *parent_class=NULL;
CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
gint close_error;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamFs::destroy\n");
-
close_error = close (stream_fs->fd);
if (close_error) {
- CAMEL_LOG_FULL_DEBUG ("CamelStreamFs::destroy Error while closing file descriptor\n");
- CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
+ g_warning ("CamelStreamFs::destroy Error while closing "
+ "file descriptor\n Full error text is : %s\n",
+ strerror (errno));
}
GTK_OBJECT_CLASS (parent_class)->destroy (object);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamFs::destroy\n");
}
{
CamelStreamFs *stream_fs = CAMEL_STREAM_FS (object);
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelStreamFs::finalize\n");
-
g_free (stream_fs->name);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelStreamFs::finalize\n");
}
lseek (stream_fs->fd, inf_bound, SEEK_SET);
CAMEL_SEEKABLE_STREAM (stream_fs)->cur_pos = 0;
-
- CAMEL_LOG_FULL_DEBUG ("In CamelStreamFs::_set_bounds (%p), "
- "setting inf bound to %u, "
- "sup bound to %ld, current postion to %u from %u\n",
- stream_fs,
- stream_fs->inf_bound, stream_fs->sup_bound,
- CAMEL_SEEKABLE_STREAM (stream_fs)->cur_pos, inf_bound);
-
}
int flags;
g_assert (name);
- CAMEL_LOG_FULL_DEBUG ( "Entering CamelStream::new_with_name, name=\"%s\", mode=%d\n", name, mode);
-
v = stat (name, &s);
fd = open (name, flags, 0600);
if (fd==-1) {
- CAMEL_LOG_WARNING ( "CamelStreamFs::new_with_name can not obtain fd for file \"%s\"\n", name);
- CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
+ g_warning ("CamelStreamFs::new_with_name can not obtain "
+ "fd for file \"%s\"\n", name);
return;
}
{
CSFS_CLASS (stream_fs)->init_with_name (stream_fs, name, mode);
_set_bounds (stream_fs, inf_bound, (gint32)sup_bound);
- CAMEL_LOG_FULL_DEBUG ("In CamelStreamFs::init_with_name_and_bounds, "
- "setting inf bound to %u, "
- "sup bound to %ld, current postion to %u\n",
- stream_fs->inf_bound, stream_fs->sup_bound,
- CAMEL_SEEKABLE_STREAM (stream_fs)->cur_pos);
}
{
CamelStreamFs *stream_fs;
- CAMEL_LOG_FULL_DEBUG ( "Entering CamelStream::new_with_fd fd=%d\n",fd);
stream_fs = gtk_type_new (camel_stream_fs_get_type ());
CSFS_CLASS (stream_fs)->init_with_fd (stream_fs, fd);
-
return CAMEL_STREAM (stream_fs);
}
{
CamelStreamFs *stream_fs;
- CAMEL_LOG_FULL_DEBUG ( "Entering CamelStream::new_with_fd fd=%d\n",fd);
stream_fs = gtk_type_new (camel_stream_fs_get_type ());
CSFS_CLASS (stream_fs)->init_with_fd_and_bounds (stream_fs, fd, inf_bound, sup_bound);
v = read ( (CAMEL_STREAM_FS (stream))->fd, buffer, nb_to_read);
} while (v == -1 && errno == EINTR);
- if (v<0)
- CAMEL_LOG_FULL_DEBUG ("CamelStreamFs::read v=%d\n", v);
- else
+ if (v>0)
CAMEL_SEEKABLE_STREAM (stream)->cur_pos += v;
if (v == 0)
g_assert (stream);
g_assert (stream_fs->fd);
- CAMEL_LOG_FULL_DEBUG ( "CamelStreamFs:: entering write. n=%d\n", n);
/* we do not take the end bounds into account as it does not
really make any sense in the case of a write operation */
if (v>0) nb_bytes_written += v;
} while (v == -1 && errno == EINTR);
-#if HARD_LOG_LEVEL >= FULL_DEBUG
- if (v==-1) {
- perror("");
- CAMEL_LOG_FULL_DEBUG ( "CamelStreamFs::write could not write bytes in stream\n");
- }
-#endif
-
if (nb_bytes_written>0)
CAMEL_SEEKABLE_STREAM (stream)->cur_pos += nb_bytes_written;
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
-#include "camel-log.h"
static CamelStreamClass *parent_class=NULL;
#include <config.h>
-#include "camel-log.h"
#include "camel-marshal-utils.h"
#include "camel-thread-proxy.h"
#include <pthread.h>
{
CamelThreadProxy *proxy;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::new\n");
-
proxy = g_new (CamelThreadProxy, 1);
if (!proxy)
return NULL;
g_free (proxy);
return NULL;
}
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::new\n");
return proxy;
}
void
camel_thread_proxy_free (CamelThreadProxy *proxy)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::free\n");
-
g_cond_free (proxy->signal_data_cond);
g_mutex_free (proxy->signal_data_mutex);
camel_op_queue_free (proxy->server_op_queue);
camel_op_queue_free (proxy->client_op_queue);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::free\n");
}
{
CamelThreadProxy *th_proxy;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_op_run_free_and_notify\n");
-
camel_op_run (op);
camel_op_free (op);
th_proxy = camel_op_get_user_data (op);
_notify_availability (th_proxy, 'a');
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_op_run_free_and_notify\n");
}
CamelOpQueue *server_op_queue;
pthread_t thread;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_run_next_op_in_thread\n");
-
server_op_queue = proxy->server_op_queue;
/* get the next pending operation */
op = camel_op_queue_pop_op (server_op_queue);
/* run the operation in a child thread */
pthread_create (&thread, NULL, (thread_call_func) _op_run_free_and_notify, op);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_run_next_op_in_thread\n");
}
{
CamelOpQueue *server_op_queue;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::camel_thread_proxy_push_op\n");
-
g_assert (proxy);
server_op_queue = proxy->server_op_queue;
*/
_run_next_op_in_thread (proxy);
}
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::camel_thread_proxy_push_op\n");
}
/**
* _op_run_and_free: Run an operation and free it
static void
_op_run_and_free (CamelOp *op)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_op_run_and_free\n");
camel_op_run (op);
camel_op_free (op);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_op_run_and_free\n");
}
CamelOp *op;
CamelOpQueue *client_op_queue;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_run_next_cb\n");
client_op_queue = proxy->client_op_queue;
/* get the next pending operation */
/* run the operation in the main thread */
_op_run_and_free (op);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_run_next_cb\n");
}
{
CamelOpQueue *client_op_queue;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::camel_thread_proxy_push_cb\n");
client_op_queue = proxy->client_op_queue;
/* put the proxy object in the user data
/* tell the main thread a new callback is there */
_notify_availability (proxy, 'c');
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::camel_thread_proxy_push_cb\n");
}
{
int filedes[2];
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_init_notify_system\n");
-
/* set up the notification channel */
if (pipe (filedes) < 0) {
- CAMEL_LOG_WARNING ("could not create pipe in CamelThreadProxy::_init_notify_system\n");
- CAMEL_LOG_FULL_DEBUG ("Full error message : %s\n", strerror(errno));
+ g_warning ("could not create pipe in "
+ "CamelThreadProxy::_init_notify_system\n");
return -1;
}
_thread_notification_catch,
proxy);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_init_notify_system\n");
return 1;
}
GIOChannel *notification_channel;
guint bytes_written;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_notify_availability\n");
-
notification_channel = proxy->notify_channel;
do {
1,
&bytes_written);
} while (bytes_written < 1);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_notify_availability\n");
}
CamelThreadProxy *proxy;
guint signal_id;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_signal_marshaller_server_side\n");
proxy = CAMEL_THREAD_PROXY (gtk_object_get_data (object, "__proxy__"));
signal_id = (guint)data;
g_assert (proxy);
/* tell the main thread there is a signal pending */
_notify_availability (proxy, 's');
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_signal_marshaller_server_side\n");
}
g_mutex_lock (proxy->signal_data_mutex);
g_assert (proxy->signal_data.args);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_signal_marshaller_client_side\n");
/* emit the pending signal */
gtk_signal_emitv (GTK_OBJECT (proxy),
proxy->signal_data.signal_id,
*/
g_cond_signal (proxy->signal_data_cond);
g_mutex_unlock (proxy->signal_data_mutex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_signal_marshaller_client_side\n");
}
{
guint i;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::camel_thread_proxy_init_signals\n");
-
for (i=0; signal_to_proxy[i]; i++) {
/* connect the signal to the signal marshaller
* user_data is the signal id */
TRUE,
FALSE);
}
-
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::camel_thread_proxy_init_signals\n");
-
-
}
/**** catch notification from child thread ****/
guint bytes_read;
GIOError error;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelThreadProxy::_thread_notification_catch\n");
-
-
error = g_io_channel_read (source,
&op_name,
1,
}
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelThreadProxy::_thread_notification_catch\n");
-
/* do not remove the io watch */
return TRUE;
}
#include <config.h>
#include "camel-transport.h"
#include "camel-exception.h"
-#include "camel-log.h"
/* Returns the class for a CamelTransport */
#define CT_CLASS(so) CAMEL_TRANSPORT_CLASS (GTK_OBJECT(so)->klass)
#include <gtk/gtk.h>
#include <camel/data-wrapper-repository.h>
#include <camel/data-wrapper-repository.h>
-#include <camel/camel-log.h>
#include <camel/camel-exception.h>
#include <camel/camel-data-wrapper.h>
#include <camel/camel-simple-data-wrapper.h>
#include <config.h>
#include "gmime-content-field.h"
#include "string-utils.h"
-#include "camel-log.h"
#include <string.h>
#include "hash-table-utils.h"
gboolean attribute_exists;
gchar *old_attribute;
gchar *old_value;
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField:: Entering set_parameter\n");
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField:: set_parameter content_field=%p name=%s, value=%s\n", content_field, attribute, value);
attribute_exists = g_hash_table_lookup_extended (content_field->parameters,
attribute,
(gpointer *) &old_attribute,
}
g_hash_table_insert (content_field->parameters, g_strdup (attribute), g_strdup (value));
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField:: Leaving set_parameter\n");
}
/* print all parameters */
g_hash_table_foreach (content_field->parameters, _print_parameter, stream);
camel_stream_write_string (stream, "\n");
- } else CAMEL_LOG_FULL_DEBUG ("GMimeContentField::write_to_stream no mime type found\n");
+ }
}
/**
const gchar *old_name;
gboolean parameter_exists;
- CAMEL_LOG_FULL_DEBUG ("Entering GMimeContentField::get_parameter content_field =%p\n", content_field);
g_assert (content_field->parameters);
g_assert (name);
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField::get_parameter looking for parameter \"%s\"\n", name);
/* parameter = (const gchar *)g_hash_table_lookup (content_field->parameters, name); */
parameter_exists = g_hash_table_lookup_extended (content_field->parameters,
name,
(gpointer *) &old_name,
(gpointer *) ¶meter);
if (!parameter_exists) {
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField::get_parameter, parameter not found\n");
g_hash_table_foreach (content_field->parameters, ___debug_print_parameter, NULL);
return NULL;
}
- CAMEL_LOG_FULL_DEBUG ("Leaving GMimeContentField::get_parameter\n");
return parameter;
}
gchar *param_name, *param_value;
gboolean param_end;
- CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, entering\n");
g_assert (string);
g_assert (content_field);
first = 0;
len = strlen (string);
- if (!len) {
- CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string, leaving\n");
+ if (!len)
return;
- }
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField::construct_from_string, All checks done\n");
- CAMEL_LOG_FULL_DEBUG ("GMimeContentField::construct_from_string the complete header is\n"
- "-------------------\n%s\n-------------------\n", string);
+
/* find the type */
while ( (i<len) && (!strchr ("/;", string[i])) ) i++;
- if (i == 0) {
- CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string, leaving\n");
+ if (i == 0)
return;
- }
type = g_strndup (string, i);
string_trim (type, " \t\"", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING);
content_field->type = type;
- CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime type : \"%s\"\n", type);
if (i >= len-1) {
content_field->subtype = NULL;
-
- CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string only found the type leaving\n");
return;
}
subtype = g_strndup (string+first, i-first);
string_trim (subtype, " \t\"", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING);
content_field->subtype = subtype;
- CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime subtype: \"%s\"\n", subtype);
- if (i >= len-1) {
- CAMEL_LOG_FULL_DEBUG ( "GMimeContentField::construct_from_string found the subtype but no parameter, leaving\n");
+ if (i >= len-1)
return;
- }
}
}
first = i+1;
while ( (i<len) && (string[i] != ';') ) i++;
if (i != first) param_value = g_strndup (string+first, i-first);
else param_value = g_strdup ("");
- CAMEL_LOG_TRACE ( "GMimeContentField::construct_from_string, Found mime parameter \"%s\"=\"%s\"\n", param_name, param_value);
string_trim (param_value, " \t\"", STRING_TRIM_STRIP_TRAILING | STRING_TRIM_STRIP_LEADING);
gmime_content_field_set_parameter (content_field, param_name, param_value);
g_free (param_name);
#include <string.h>
#include "gmime-utils.h"
#include "string-utils.h"
-#include "camel-log.h"
#include "camel-stream.h"
void
gchar *strtmp;
- CAMEL_LOG_FULL_DEBUG ( "gmime_write_header_pair_to_stream:: Entering\n");
g_assert(name);
if (!value) return;
strtmp = g_strdup_printf ("%s: %s\n", name, value);
camel_stream_write_string (stream, strtmp);
- CAMEL_LOG_FULL_DEBUG ( "gmime_write_header_pair_to_stream:\n writing %s\n", strtmp);
g_free (strtmp);
- CAMEL_LOG_FULL_DEBUG ( "gmime_write_header_pair_to_stream:: Leaving\n");
-
}
gchar *header_value = (gchar *)value;
CamelStream *stream = (CamelStream *)user_data;
- CAMEL_LOG_FULL_DEBUG ( "_write_one_header_to_stream:: Entering\n");
if ((header_name) && (header_value))
gmime_write_header_pair_to_stream (stream, header_name, header_value);
- CAMEL_LOG_FULL_DEBUG ( "_write_one_header_to_stream:: Leaving\n");
}
void
gmime_write_header_table_to_stream (CamelStream *stream, GHashTable *header_table)
{
- CAMEL_LOG_FULL_DEBUG ( "write_header_table_to_stream:: Entering\n");
g_hash_table_foreach (header_table,
_write_one_header_to_stream,
(gpointer)stream);
- CAMEL_LOG_FULL_DEBUG ( "write_header_table_to_stream:: Leaving\n");
}
gchar *current;
- CAMEL_LOG_FULL_DEBUG ( "write_header_with_glist_to_stream:: entering\n");
- CAMEL_LOG_FULL_DEBUG ( "\theader name : %s\n", header_name);
if ( (header_name) && (header_values) )
{
gboolean first;
first = TRUE;
while (header_values) {
current = (gchar *)header_values->data;
- CAMEL_LOG_FULL_DEBUG ( "write_header_with_glist_to_stream:: writing value : %s\n", current);
if (current) {
if (!first) camel_stream_write_string (stream, separator);
else first = FALSE;
}
camel_stream_write (stream, "\n", 1);
}
- CAMEL_LOG_FULL_DEBUG ("write_header_with_glist_to_stream:: leaving\n");
-
}
#endif
Rfc822Header header;
- CAMEL_LOG_FULL_DEBUG ( "_store_header_pair_from_string:: Entering\n");
-
g_assert (header_array);
g_return_if_fail (header_line);
&header_name, &header_value,
STRING_DICHOTOMY_NONE);
if (dich_result != 'o') {
- CAMEL_LOG_WARNING (
- "** WARNING **\n"
- "store_header_pair_from_string : dichotomy result is '%c'\n"
- "header line is :\n--\n%s\n--\n"
- "** \n", dich_result, header_line);
+ g_warning ("** WARNING **\n"
+ "store_header_pair_from_string : "
+ "dichotomy result is '%c'\n"
+ "header line is :\n--\n%s\n--\n"
+ "** \n", dich_result, header_line);
if (header_name)
g_free (header_name);
if (header_value)
}
#endif
}
- CAMEL_LOG_FULL_DEBUG ( "_store_header_pair_from_string:: Leaving\n");
-
}
GArray *header_array;
- CAMEL_LOG_FULL_DEBUG ( "gmime-utils:: Entering get_header_table_from_stream\n");
header_array = g_array_new (FALSE, FALSE, sizeof (Rfc822Header));
nb_char_read = camel_stream_read (stream, &next_char, 1);
if (nb_char_read>0) {
switch (next_char) {
- case '\r': CAMEL_LOG_FULL_DEBUG ( "gmime-utils::get_header_table_from_stream "
- "****** FOUND A \\r******* \n");
+ case '\r':
case '\n': /* a blank line means end of headers */
if (crlf) {
end_of_headers=TRUE;
} while ( (!end_of_headers) && (!end_of_file) );
- CAMEL_LOG_FULL_DEBUG ( "gmime-utils:: Leaving get_header_table_from_stream\n");
return header_array;
}
#include <config.h>
#include "gstring-util.h"
-#include "camel-log.h"
#include <string.h>
/**
gchar *str, *tmp;
gint pos, len, first;
- CAMEL_LOG_FULL_DEBUG (\
- "Entering string_dichotomy: \n\tseparator=%c \n\tprefix=%p \n\tsuffix=%p \n\toptions=%ld\n",\
- sep, prefix, suffix, options);
g_assert (tmp=string->str);
len = strlen (tmp);
if (!len) {
*prefix=NULL;
if (suffix)
*suffix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: string is empty\n");
return 'n';
}
first = 0;
if (first==len) {
if (prefix) *prefix=NULL;
if (suffix) *suffix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: after stripping, string is empty\n");
return 'n';
}
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator not found\n");
return 'n';
}
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator is last character\n");
return 'l';
}
/* if we have stripped leading separators, we should */
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator is first character\n");
return 'l';
}
last--;
- CAMEL_LOG_FULL_DEBUG ("g_string_split:: trim options: %d\n", trim_options);
-
while (first<=last) {
pos = first;
/* find next separator */
guint length;
gchar *str;
- CAMEL_LOG_FULL_DEBUG ("**\nentering g_string_trim::\n");
-
if ((!string) || (!string->str))
return;
str = string->str;
first_ok = 0;
last_ok = length - 1;
- CAMEL_LOG_FULL_DEBUG ("g_string_trim:: trim_options:%d\n", options);
if (options & GSTRING_TRIM_STRIP_LEADING)
while ( (first_ok <= last_ok) && (strchr (chars, str[first_ok])) )
first_ok++;
if (options & GSTRING_TRIM_STRIP_TRAILING)
while ( (first_ok <= last_ok) && (strchr (chars, str[last_ok])) )
last_ok++;
- CAMEL_LOG_FULL_DEBUG ("g_string_trim::\n\t\"%s\":first ok:%d last_ok:%d\n",
- string->str, first_ok, last_ok);
if (first_ok > 0)
g_string_erase (string, 0, first_ok);
#include "camel-mbox-folder.h"
#include "camel-mbox-store.h"
#include "string-utils.h"
-#include "camel-log.h"
#include "camel-stream-fs.h"
#include "camel-mbox-summary.h"
#include "camel-mbox-parser.h"
{
CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (object);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelFolder::finalize\n");
-
-
g_free (mbox_folder->folder_file_path);
g_free (mbox_folder->folder_dir_path);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::finalize\n");
}
CamelFolder *parent_folder, const gchar *name, gchar separator,
CamelException *ex)
{
-
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::init_with_store\n");
-
/* call parent method */
parent_class->init (folder, parent_store, parent_folder,
name, separator, ex);
folder->has_uid_capability = TRUE;
folder->has_search_capability = TRUE;
folder->summary = NULL;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::init_with_store\n");
}
CamelMboxFolder *mbox_folder = CAMEL_MBOX_FOLDER (folder);
const gchar *root_dir_path;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::set_name\n");
-
/* call default implementation */
parent_class->set_name (folder, name, ex);
if (camel_exception_get_id (ex)) return;
root_dir_path = camel_mbox_store_get_toplevel_dir (CAMEL_MBOX_STORE(folder->parent_store));
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name full_name is %s\n", folder->full_name);
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name root_dir_path is %s\n", root_dir_path);
-
mbox_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, folder->full_name);
mbox_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->full_name);
mbox_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, folder->full_name);
mbox_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, folder->full_name);
-
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name mbox_folder->folder_file_path is %s\n",
- mbox_folder->folder_file_path);
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::set_name mbox_folder->folder_dir_path is %s\n",
- mbox_folder->folder_dir_path);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::set_name\n");
}
g_assert(folder != NULL);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::exists\n");
-
mbox_folder = CAMEL_MBOX_FOLDER (folder);
/* check if the mbox file path is determined */
/* check if the mbox directory exists */
access_result = access (mbox_folder->folder_dir_path, F_OK);
if (access_result < 0) {
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::exists errot when executing access on %s\n",
- mbox_folder->folder_dir_path);
- CAMEL_LOG_FULL_DEBUG (" Full error text is : %s\n", strerror(errno));
camel_exception_set (ex,
CAMEL_EXCEPTION_SYSTEM,
strerror(errno));
}
stat_error = stat (mbox_folder->folder_dir_path, &stat_buf);
if (stat_error == -1) {
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::exists when executing stat on %s, stat_error = %d\n",
- mbox_folder->folder_dir_path, stat_error);
- CAMEL_LOG_FULL_DEBUG (" Full error text is : %s\n", strerror(errno));
camel_exception_set (ex,
CAMEL_EXCEPTION_SYSTEM,
strerror(errno));
exists = S_ISREG (stat_buf.st_mode);
/* we should check the rights here */
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::exists\n");
return exists;
}
/* exception handling for io errors */
io_error :
-
- CAMEL_LOG_WARNING ("CamelMboxFolder::create, error when creating %s and %s\n",
- folder_dir_path, folder_file_path);
- CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
-
if (errno == EACCES) {
camel_exception_set (ex,
CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
/* physically delete the directory */
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::delete removing directory %s\n", folder_dir_path);
rmdir_error = rmdir (folder_dir_path);
if (rmdir_error == -1)
switch (errno) {
/* exception handling for io errors */
io_error :
-
- CAMEL_LOG_WARNING ("CamelMboxFolder::create, error when deleting files %s\n",
- folder_file_path);
- CAMEL_LOG_FULL_DEBUG ( " Full error text is : %s\n", strerror(errno));
-
if (errno == EACCES) {
camel_exception_set (ex,
CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
if ((stat_error != -1) && S_ISDIR (stat_buf.st_mode)) {
/* yes, add it to the list */
if (entry_name[0] != '.') {
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::list_subfolders adding "
- "%s\n", entry_name);
-
/* if the folder is a netscape folder, remove the
".sdb" from the name */
real_folder_name = string_prefix (entry_name, ".sdb", &folder_suffix_found);
message_count = CAMEL_MBOX_SUMMARY (folder->summary)->nb_message;
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::get_message_count found %d messages\n", message_count);
return message_count;
}
gint fd1, fd2;
int i;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::append_message\n");
-
tmp_message_filename = g_strdup_printf ("%s.tmp",
mbox_folder->folder_file_path);
unlink (tmp_message_filename);
g_free (tmp_message_filename);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::append_message\n");
}
GList *uid_list = NULL;
int i;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::get_uid_list\n");
-
message_info_array =
CAMEL_MBOX_SUMMARY (folder->summary)->message_info;
uid_list = g_list_prepend (uid_list, g_strdup_printf ("%u", message_info->uid));
}
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::get_uid_list\n");
-
return uid_list;
}
CamelMimeMessage *message = NULL;
CamelStore *parent_store;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxFolder::get_message_by_uid\n");
-
searched_uid = strtoul (uid, NULL, 10);
message_info_array =
CAMEL_EXCEPTION_FOLDER_INVALID_UID,
"uid %s not found in the folder",
uid);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::get_uid_list\n");
return NULL;
}
message = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (message), message_stream);
-
-
-
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxFolder::get_uid_list\n");
return message;
}
#include <config.h>
#include "camel-mbox-parser.h"
#include "camel-mbox-utils.h"
-#include "camel-log.h"
#include "camel-exception.h"
#include <sys/types.h>
#include <unistd.h>
clear_message_info (CamelMboxParserMessageInfo *preparsing_info)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::clear_message_info\n");
-
preparsing_info->message_position = 0;
preparsing_info->size = 0;
preparsing_info->from = NULL;
preparsing_info->x_evolution_offset = 0;
preparsing_info->status = 0;
preparsing_info->uid = 0;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::clear_message_info\n");
}
{
CamelMboxPreParser *parser;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::ew_parser\n");
-
parser = g_new0 (CamelMboxPreParser, 1);
parser->fd = fd;
parser->tmp_string = g_string_sized_new (1000);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::ew_parser\n");
-
return parser;
}
static void
parser_free (CamelMboxPreParser *parser)
{
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::parser_free\n");
-
g_free (parser->buffer);
g_free (parser->message_delimiter);
g_string_free (parser->tmp_string, TRUE);
g_free (parser);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::parser_free\n");
}
gint seek_res;
gint buf_nb_read;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::intialize_buffer\n");
-
g_assert (parser);
/* set the search start position */
parser->last_position = MIN (buf_nb_read + parser->left_chunk_size + 1,
MBOX_PARSER_BUF_SIZE - parser->left_chunk_size);
parser->current_position = parser->left_chunk_size;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::intialize_buffer\n");
-
}
g_assert (parser);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::intialize_buffer\n");
-
/* read the next chunk of data in the folder file : */
/* - first, copy the last bytes from the previous
chunk at the begining of the new one. */
MBOX_PARSER_BUF_SIZE - parser->left_chunk_size);
parser->current_position = 0;
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::intialize_buffer\n");
-
}
gint position_to_the_end;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::advnce_n_chars\n");
-
position_to_the_end = parser->last_position - parser->current_position;
if (n < position_to_the_end)
}
parser->real_position += n;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::advance_n_chars\n");
}
gchar c;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::new_message_detected\n");
-
/* if we were filling a message information
save it in the message information array */
- CAMEL_LOG_FULL_DEBUG (" Message position : %d\n", parser->real_position);
if (parser->is_pending_message) {
parser->current_message_info.size =
parser->real_position - parser->current_message_info.message_position;
(parser->current_message_info).message_position = parser->real_position;
parser->is_pending_message = TRUE;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::new_message_detected\n");
}
gchar *buffer;
gchar c;
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::read_header\n");
-
g_assert (parser);
/* reset the header buffer string */
/* copy the buffer in the preparsing information structure */
*header_content = g_strndup (parser->tmp_string->str, parser->tmp_string->len);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::read_header\n");
-
}
guint nb_line = 0;
g_assert (parser);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::read_message_begining\n");
-
/* reset the header buffer string */
parser->tmp_string = g_string_truncate (parser->tmp_string, 0);
*message_summary = g_strndup (parser->tmp_string->str, parser->tmp_string->len);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxParser::read_message_begining\n");
-
return new_message;
}
g_assert (next_uid);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::parse_file\n");
-
/* get file size */
fstat_result = fstat (fd, &stat_buf);
if (fstat_result == -1) {
/* free the parser */
parser_free (parser);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxParser::parse_file\n");
-
return return_value;
}
*/
#include <glib.h>
-#include "camel-log.h"
#include "camel-exception.h"
#include "config.h"
#include "camel-mbox-store.h"
#include "camel-provider.h"
-#include "camel-log.h"
static CamelProvider _mbox_provider = {
#include <camel/gmime-utils.h>
-#include <camel/camel-log.h>
#include "camel/camel-mime-message.h"
#include "camel/camel-mime-part.h"
#include "camel/camel-stream.h"
#include <config.h>
-#include "camel-log.h"
#include "camel-mbox-store.h"
#include "camel-mbox-folder.h"
CamelMboxFolder *new_mbox_folder;
CamelFolder *new_folder;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelMboxStore::get_folder\n");
new_mbox_folder = gtk_type_new (CAMEL_MBOX_FOLDER_TYPE);
new_folder = CAMEL_FOLDER (new_mbox_folder);
CF_CLASS (new_folder)->init (new_folder, store, NULL,
folder_name, '/', ex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelMboxStore::get_folder\n");
-
return new_folder;
}
#include <config.h>
-#include "camel-log.h"
#include "camel-exception.h"
#include "camel-mbox-folder.h"
#include "camel-mbox-summary.h"
gint write_result; /* XXX use this */
guint32 data;
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::save_summary entering \n");
-
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR);
if (fd == -1) {
}
close (fd);
-
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::save_summary leaving \n");
}
gint read_result;
guint32 data;
- CAMEL_LOG_FULL_DEBUG ("CamelMboxFolder::save_summary entering \n");
-
fd = open (filename, O_RDONLY);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
#include "camel-nntp-summary.h"
#include "string-utils.h"
-#include "camel-log.h"
#include "camel-stream-mem.h"
#include "camel-stream-buffer.h"
#include "gmime-utils.h"
{
CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (object);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelFolder::finalize\n");
-
-
g_free (nntp_folder->summary_file_path);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelFolder::finalize\n");
}
CamelFolder *parent_folder, const gchar *name, gchar separator,
CamelException *ex)
{
-
-
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::init_with_store\n");
-
/* call parent method */
parent_class->init (folder, parent_store, parent_folder,
name, separator, ex);
folder->has_uid_capability = TRUE;
folder->has_search_capability = FALSE;
folder->summary = NULL;
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::init_with_store\n");
}
CamelNNTPFolder *nntp_folder = CAMEL_NNTP_FOLDER (folder);
const gchar *root_dir_path;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::set_name\n");
-
/* call default implementation */
parent_class->set_name (folder, name, ex);
if (camel_exception_get_id (ex)) return;
root_dir_path = camel_nntp_store_get_toplevel_dir (CAMEL_NNTP_STORE(folder->parent_store));
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::set_name full_name is %s\n", folder->full_name);
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::set_name root_dir_path is %s\n", root_dir_path);
-
nntp_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->name);
-
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::set_name\n");
}
g_assert(folder != NULL);
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::exists\n");
-
nntp_folder = CAMEL_NNTP_FOLDER (folder);
/* check if the nntp summary path is determined */
exists = S_ISREG (stat_buf.st_mode);
/* we should check the rights here */
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::exists\n");
return exists;
#endif
return TRUE;
message_count = CAMEL_NNTP_SUMMARY (folder->summary)->nb_message;
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::get_message_count found %d messages\n", message_count);
return message_count;
}
gint fd1, fd2;
int i;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::append_message\n");
-
/* write the message itself */
output_stream = camel_stream_fs_new_with_name (tmp_message_filename,
CAMEL_STREAM_FS_WRITE);
unlink (tmp_message_filename);
g_free (tmp_message_filename);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::append_message\n");
}
#endif
GList *uid_list = NULL;
int i;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::get_uid_list\n");
-
message_info_array =
CAMEL_NNTP_SUMMARY (folder->summary)->message_info;
uid_list = g_list_prepend (uid_list, g_strdup (message_info->headers.uid));
}
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::get_uid_list\n");
-
return uid_list;
}
int status;
gboolean done;
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPFolder::get_message_by_uid\n");
-
/* get the parent store */
parent_store = camel_folder_get_parent_store (folder, ex);
if (camel_exception_get_id (ex)) {
CAMEL_EXCEPTION_FOLDER_INVALID_UID,
"message %s not found.",
uid);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::get_message_by_uid\n");
return NULL;
}
message = camel_mime_message_new ();
camel_data_wrapper_set_input_stream (CAMEL_DATA_WRAPPER (message), message_stream);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPFolder::get_message_by_uid\n");
return message;
}
#include "config.h"
#include "camel-nntp-store.h"
#include "camel-provider.h"
-#include "camel-log.h"
static CamelProvider _nntp_provider = {
#include <string.h>
#include <unistd.h>
-#include "camel-log.h"
-
#include "libgnome/libgnome.h"
#include "camel-nntp-store.h"
/* call the standard routine for that when */
/* it is done ... */
- CAMEL_LOG_FULL_DEBUG ("Entering CamelNNTPStore::get_folder\n");
new_nntp_folder = gtk_type_new (CAMEL_NNTP_FOLDER_TYPE);
new_folder = CAMEL_FOLDER (new_nntp_folder);
CF_CLASS (new_folder)->init (new_folder, store, NULL,
folder_name, '/', ex);
- CAMEL_LOG_FULL_DEBUG ("Leaving CamelNNTPStore::get_folder\n");
-
return new_folder;
}
#include <config.h>
-#include "camel-log.h"
#include "camel-exception.h"
#include "camel-nntp-folder.h"
#include "camel-nntp-summary.h"
gint write_result; /* XXX use this */
guint32 data;
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::save_summary entering \n");
-
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR);
if (fd == -1) {
}
close (fd);
-
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::save_summary leaving \n");
}
gint read_result;
guint32 data;
- CAMEL_LOG_FULL_DEBUG ("CamelNNTPFolder::save_summary entering \n");
-
fd = open (filename, O_RDONLY);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INSUFFICIENT_PERMISSION,
#include "config.h"
#include "camel-pop3-store.h"
#include "camel-provider.h"
-#include "camel-log.h"
static CamelProvider _pop3_provider = {
#include "config.h"
#include "camel-smtp-transport.h"
#include "camel-provider.h"
-#include "camel-log.h"
static CamelProvider _smtp_provider = {
#include <config.h>
#include "string-utils.h"
-#include "camel-log.h"
#include "string.h"
gint sep_pos, first, last, len;
g_assert (string);
- CAMEL_LOG_FULL_DEBUG (\
- "string_dichotomy:: string=\"%s\"\n\tseparator=\"%c\" \n\tprefix=%p \n\tsuffix=%p \n\toptions=%ld\n",\
- string, sep, prefix, suffix, options);
len = strlen (string);
if (!len) {
if (prefix)
*prefix=NULL;
if (suffix)
*suffix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy:: input string is empty\n");
return 'n';
}
first = 0;
if (first==last) {
if (prefix) *prefix=NULL;
if (suffix) *suffix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: after stripping, string is empty\n");
return 'n';
}
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator not found\n");
return 'n';
}
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator is last character\n");
return 'l';
}
/* if we have stripped leading separators, we should */
{
if (suffix) *suffix=NULL;
if (prefix) *prefix=NULL;
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator is first character\n");
return 'l';
}
- CAMEL_LOG_FULL_DEBUG ("string_dichotomy: separator found at :%d\n", sep_pos);
- if (prefix) { /* return the prefix */
+ if (prefix)
*prefix = g_strndup (string+first,sep_pos-first);
- CAMEL_LOG_FULL_DEBUG ( "string_dichotomy:: prefix:\"%s\"\n", *prefix);
- }
- if (suffix) { /* return the suffix */
+ if (suffix)
*suffix = g_strndup (string+sep_pos+1, last-sep_pos);
- CAMEL_LOG_FULL_DEBUG ( "string_dichotomy:: suffix:\"%s\"\n", *suffix);
- }
return 'o';
}
last--;
- CAMEL_LOG_FULL_DEBUG ("string_split:: trim options: %d\n", trim_options);
-
while (first<=last) {
pos = first;
/* find next separator */
gint last_ok;
guint length;
- CAMEL_LOG_FULL_DEBUG ("string-utils:: Entering string_trim::\n");
- CAMEL_LOG_FULL_DEBUG ("string_trim:: trim_chars:\"%s\"", trim_chars);
- CAMEL_LOG_FULL_DEBUG ("string_trim:: trim_options:%d\n", options);
-
g_return_if_fail (string);
length = strlen (string);
if (length==0)
if (options & STRING_TRIM_STRIP_TRAILING)
while ( (first_ok <= last_ok) && (strchr (trim_chars, string[last_ok])!=NULL) )
last_ok--;
- CAMEL_LOG_FULL_DEBUG ("string_trim::\n\t\"%s\":first ok:%d last_ok:%d\n",
- string, first_ok, last_ok);
if (first_ok > 0)
memmove (string, string+first_ok, last_ok - first_ok + 1);