summaryrefslogtreecommitdiff
path: root/mono/DataWrapper.custom
diff options
context:
space:
mode:
Diffstat (limited to 'mono/DataWrapper.custom')
-rw-r--r--mono/DataWrapper.custom25
1 files changed, 25 insertions, 0 deletions
diff --git a/mono/DataWrapper.custom b/mono/DataWrapper.custom
new file mode 100644
index 0000000..6365f3d
--- /dev/null
+++ b/mono/DataWrapper.custom
@@ -0,0 +1,25 @@
+public StreamWrapper Stream {
+ get {
+ GMime.Stream gmime_stream = GMimeStream;
+ GMime.StreamFilter filtered_stream;
+ FilterBasic filter;
+
+ switch (Encoding) {
+ case ContentEncoding.QuotedPrintable:
+ case ContentEncoding.UuEncode:
+ case ContentEncoding.Base64:
+ filtered_stream = new GMime.StreamFilter (gmime_stream);
+ filter = new FilterBasic (Encoding, false);
+ filtered_stream.Add (filter);
+ gmime_stream.Dispose ();
+ filter.Dispose ();
+
+ gmime_stream = filtered_stream;
+ break;
+ default:
+ break;
+ }
+
+ return new StreamWrapper (gmime_stream);
+ }
+}