diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/camel-data-wrapper.c | 22 | ||||
-rw-r--r-- | camel/camel-data-wrapper.h | 4 | ||||
-rw-r--r-- | camel/camel-folder-utils.c | 13 | ||||
-rw-r--r-- | camel/camel-mime-body-part.c | 2 | ||||
-rw-r--r-- | camel/camel-mime-message.c | 4 |
5 files changed, 24 insertions, 21 deletions
diff --git a/camel/camel-data-wrapper.c b/camel/camel-data-wrapper.c index 4b9683b2d1..0489f184c2 100644 --- a/camel/camel-data-wrapper.c +++ b/camel/camel-data-wrapper.c @@ -39,11 +39,11 @@ static GtkObjectClass *parent_class=NULL; static void _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); static CamelStream *_get_input_stream (CamelDataWrapper *data_wrapper); static void _set_output_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); -CamelStream *_get_output_stream (CamelDataWrapper *data_wrapper); +static CamelStream *_get_output_stream (CamelDataWrapper *data_wrapper); static void _construct_from_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); static void _write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); -static void _set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type); +static void _set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type); static gchar *_get_mime_type (CamelDataWrapper *data_wrapper); static GMimeContentField *_get_mime_type_field (CamelDataWrapper *data_wrapper); static void _set_mime_type_field (CamelDataWrapper *data_wrapper, GMimeContentField *mime_type); @@ -130,15 +130,15 @@ _finalize (GtkObject *object) -void +static void _set_input_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { g_assert (data_wrapper); - data_wrapper->input_stream; + data_wrapper->input_stream = stream; } -CamelStream * +static CamelStream * _get_input_stream (CamelDataWrapper *data_wrapper) { g_assert (data_wrapper); @@ -146,15 +146,15 @@ _get_input_stream (CamelDataWrapper *data_wrapper) } -void +static void _set_output_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) { g_assert (data_wrapper); - data_wrapper->output_stream; + data_wrapper->output_stream = stream; } -CamelStream * +static CamelStream * _get_output_stream (CamelDataWrapper *data_wrapper) { g_assert (data_wrapper); @@ -228,7 +228,7 @@ camel_data_wrapper_construct_from_stream (CamelDataWrapper *data_wrapper, CamelS static void -_set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type) +_set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type) { CAMEL_LOG_FULL_DEBUG ( "CamelDataWrapper::set_mime_type Entering\n"); g_assert (mime_type); @@ -237,7 +237,7 @@ _set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type) } void -camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type) +camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type) { CDW_CLASS(data_wrapper)->set_mime_type (data_wrapper, mime_type); } @@ -295,5 +295,5 @@ _get_stream (CamelDataWrapper *data_wrapper) CamelStream * camel_data_wrapper_get_stream (CamelDataWrapper *data_wrapper) { - CDW_CLASS(data_wrapper)->get_stream (data_wrapper); + return CDW_CLASS(data_wrapper)->get_stream (data_wrapper); } diff --git a/camel/camel-data-wrapper.h b/camel/camel-data-wrapper.h index 5035d06f98..d4e86b277d 100644 --- a/camel/camel-data-wrapper.h +++ b/camel/camel-data-wrapper.h @@ -69,7 +69,7 @@ typedef struct { void (*set_output_stream) (CamelDataWrapper *data_wrapper, CamelStream *stream); CamelStream * (*get_output_stream) (CamelDataWrapper *data_wrapper); - void (*set_mime_type) (CamelDataWrapper *data_wrapper, gchar * mime_type); + void (*set_mime_type) (CamelDataWrapper *data_wrapper, const gchar * mime_type); gchar * (*get_mime_type) (CamelDataWrapper *data_wrapper); GMimeContentField * (*get_mime_type_field) (CamelDataWrapper *data_wrapper); void (*set_mime_type_field) (CamelDataWrapper *data_wrapper, GMimeContentField *mime_type_field); @@ -93,7 +93,7 @@ GtkType camel_data_wrapper_get_type (void); void camel_data_wrapper_write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream); -void camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper, gchar *mime_type); +void camel_data_wrapper_set_mime_type (CamelDataWrapper *data_wrapper, const gchar *mime_type); gchar *camel_data_wrapper_get_mime_type (CamelDataWrapper *data_wrapper); GMimeContentField *camel_data_wrapper_get_mime_type_field (CamelDataWrapper *data_wrapper); void camel_data_wrapper_set_mime_type_field (CamelDataWrapper *data_wrapper, GMimeContentField *mime_type); diff --git a/camel/camel-folder-utils.c b/camel/camel-folder-utils.c index 601966ab02..76bc040446 100644 --- a/camel/camel-folder-utils.c +++ b/camel/camel-folder-utils.c @@ -35,7 +35,7 @@ /* Active Message List utilities */ /* */ -gint +static gint camel_mime_message_number_cmp (gconstpointer a, gconstpointer b) { CamelMimeMessage *m_a = CAMEL_MIME_MESSAGE (a); @@ -60,15 +60,14 @@ camel_mime_message_number_cmp (gconstpointer a, gconstpointer b) * * Return value: the list of expunged messages. **/ -GList * +static GList * camel_aml_expunge_messages (GList *aml, CamelFolder *folder) { - CamelMimeMessage *message; - GList *message_node; - GList *next_message_node; - guint nb_expunged = 0; - GList *expunged_messages; + CamelMimeMessage *message = NULL; + GList *message_node = NULL; + GList *next_message_node = NULL; + GList *expunged_messages = NULL; message_node = aml; diff --git a/camel/camel-mime-body-part.c b/camel/camel-mime-body-part.c index 77d245349b..3f3c2cb4a2 100644 --- a/camel/camel-mime-body-part.c +++ b/camel/camel-mime-body-part.c @@ -55,6 +55,7 @@ static void camel_mime_body_part_init (gpointer object, gpointer klass) { CamelMimeBodyPart *camel_mime_body_part = CAMEL_MIME_BODY_PART (object); + camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (object), "mime/body-part"); } @@ -91,6 +92,7 @@ camel_mime_body_part_new () 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; } diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c index 18e407115f..ea7a983331 100644 --- a/camel/camel-mime-message.c +++ b/camel/camel-mime-message.c @@ -144,9 +144,11 @@ camel_mime_message_init (gpointer object, gpointer klass) { CamelMimeMessage *camel_mime_message = CAMEL_MIME_MESSAGE (object); + camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (object), "mime/message"); + camel_mime_message->recipients = camel_recipient_table_new (); camel_mime_message->flags = g_hash_table_new (g_strcase_hash, g_strcase_equal); - + camel_mime_message->received_date = NULL; camel_mime_message->sent_date = NULL; camel_mime_message->subject = NULL; |