aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/tnef-attachments
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tnef-attachments')
-rw-r--r--plugins/tnef-attachments/ChangeLog74
-rw-r--r--plugins/tnef-attachments/tnef-plugin.c34
2 files changed, 14 insertions, 94 deletions
diff --git a/plugins/tnef-attachments/ChangeLog b/plugins/tnef-attachments/ChangeLog
deleted file mode 100644
index b90faf0bf8..0000000000
--- a/plugins/tnef-attachments/ChangeLog
+++ /dev/null
@@ -1,74 +0,0 @@
-2009-01-28 Tor Lillqvist <tml@novell.com>
-
- * Makefile.am: Use -no-undefined and link with more libraries on
- Windows.
-
- * tnef-plugin.c: Remove unused <sys/wait.h>.
-
-2008-09-24 Philip Withnall <philip@tecnocode.co.uk>
-
- ** Fixes bug #553479
-
- * org-gnome-tnef-attachments.eplug.xml: String capitalisation
- improvements.
-
-2008-09-03 Sankar P <psankar@novell.com>
-
- * plugins/tnef-attachments/tnef-plugin.c:
- Assign copyrights to Randall Hand.
-
-2008-08-27 Sankar P <psankar@novell.com>
-
-License Changes
-
- * tnef-plugin.c:
-
-2008-03-31 Frederic Crozat <fcrozat@mandriva.com>
-
- ** Fix for bug #501885
-
- * Makefile.am: Specify locale directory correctly.
-
-2008-03-17 Paul Bolle <pebolle@tiscali.nl>
-
- ** Fix for bug #519421
-
- * Makefile.am:
- * tnef-plugin.c: Also allow <libytnef/tnef.h> header file.
-
-2008-02-07 Paul Bolle <pebolle@tiscali.nl>
-
- ** Fix for bug #514736
-
- * org-gnome-tnef-attachments.eplug.xml: Added 'application/ms-tnef'
- MIME type for TNEF attachment decoding.
-
-2008-02-07 Paul Bolle <pebolle@tiscali.nl>
-
- ** Fix for bug #514771
-
- * tnef-plugin.c: (saveVCalendar): Fixed a crasher while decoding
- TNEF attachments.
-
-2007-08-27 Srinivasa Ragavan <sragavan@novell.com>
-
- * tnef-plugin.c: (e_plugin_lib_enable): Avoid reentrancy in enable.
-
-2007-07-09 Srinivasa Ragavan <sragavan@novell.com>
-
- * org-gnome-tnef-attachments.eplug.xml: Fixed bugs where the .so wasn't
- reffered rightly.
-
-2007-07-09 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Cleanups from Lucky Wankhede
-
- * org-gnome-tnef-attachments.eplug.xml:
- * tnef-plugin.c: (org_gnome_format_tnef), (processTnef),
- (saveVCard), (printRrule), (saveVCalendar), (saveVTask),
- (fprintProperty), (fprintUserProp):
-
-2007-06-07 Lucky Wankhede <wlakke@novell.com>
- * New implementation for tnef
- * For reading "winmail.dat" kind of attachements
- * using libytnef
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index 074ec635fb..8bb5341998 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -40,12 +40,6 @@
#include <libytnef/ytnef.h>
#endif
-#include <camel/camel-mime-part.h>
-#include <camel/camel-folder.h>
-#include <camel/camel-exception.h>
-#include <camel/camel-multipart.h>
-#include <camel/camel-stream-fs.h>
-
#include <em-format/em-format.h>
#include <mail/em-format-hook.h>
#include <mail/em-utils.h>
@@ -95,15 +89,15 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
out = camel_stream_fs_new_with_name(name, O_RDWR|O_CREAT, 0666);
if (out == NULL)
goto fail;
- content = camel_medium_get_content_object((CamelMedium *)t->part);
+ content = camel_medium_get_content ((CamelMedium *)t->part);
if (content == NULL)
goto fail;
if (camel_data_wrapper_decode_to_stream(content, out) == -1
|| camel_stream_close(out) == -1) {
- camel_object_unref(out);
+ g_object_unref (out);
goto fail;
}
- camel_object_unref(out);
+ g_object_unref (out);
/* Extracting the winmail.dat */
TNEFInitialize(&tnef);
@@ -126,7 +120,7 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
camel_data_wrapper_set_mime_type((CamelDataWrapper *)mp, "multipart/mixed");
camel_multipart_set_boundary(mp, NULL);
- camel_medium_set_content_object((CamelMedium *)mainpart, (CamelDataWrapper *)mp);
+ camel_medium_set_content ((CamelMedium *)mainpart, (CamelDataWrapper *)mp);
while ((d = readdir(dir))) {
CamelMimePart *part;
@@ -145,13 +139,13 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
stream = camel_stream_fs_new_with_name(path, O_RDONLY, 0);
content = camel_data_wrapper_new();
camel_data_wrapper_construct_from_stream(content, stream);
- camel_object_unref(stream);
+ g_object_unref (stream);
part = camel_mime_part_new();
camel_mime_part_set_encoding(part, CAMEL_TRANSFER_ENCODING_BINARY);
- camel_medium_set_content_object((CamelMedium *)part, content);
- camel_object_unref(content);
+ camel_medium_set_content ((CamelMedium *)part, content);
+ g_object_unref (content);
type = em_format_snoop_type(part);
if (type)
@@ -162,7 +156,7 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
g_free(path);
camel_multipart_add_part(mp, part);
- camel_object_unref(part);
+ g_object_unref (part);
}
closedir(dir);
@@ -173,17 +167,17 @@ org_gnome_format_tnef(gpointer ep, EMFormatHookTarget *t)
if (camel_multipart_get_number(mp) > 0)
em_format_part_as(t->format, t->stream, mainpart, "multipart/mixed");
else if (t->item->handler.old)
- t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old);
+ t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old, FALSE);
g_string_truncate(t->format->part_id, len);
- camel_object_unref(mp);
- camel_object_unref(mainpart);
+ g_object_unref (mp);
+ g_object_unref (mainpart);
goto ok;
fail:
if (t->item->handler.old)
- t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old);
+ t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old, FALSE);
ok:
g_free(name);
g_free(tmpdir);
@@ -333,10 +327,10 @@ void processTnef(TNEFStruct *tnef, const gchar *tmpdir) {
/* Ok, it's not an embedded stream, so now we */
/* process it. */
if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(30,0x3707)))
+ PROP_TAG(PT_STRING8, PR_ATTACH_LONG_FILENAME)))
== MAPI_UNDEFINED) {
if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(30,0x3001)))
+ PROP_TAG(PT_STRING8, PR_DISPLAY_NAME)))
== MAPI_UNDEFINED) {
filename = &(p->Title);
}