[gmime] Documented API changes between 2.4 and 2.6



commit 229a71f504d81444b8ee3c2e154f270b248db9e9
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sat Feb 6 12:17:48 2010 -0500

    Documented API changes between 2.4 and 2.6

 PORTING                        |   44 ++++++++++++++++++++++++++++++++++++++++
 tools/Makefile.am              |    2 +-
 tools/gmime-port-2-4-to-2-6.sh |   16 ++++++++++++++
 3 files changed, 61 insertions(+), 1 deletions(-)
---
diff --git a/PORTING b/PORTING
index e687f1f..546e24e 100644
--- a/PORTING
+++ b/PORTING
@@ -9,6 +9,50 @@ will attempt to list the main things to watch out for when migrating
 to the new release from the prior version.
 
 
+Porting from GMime 2.4 to GMime 2.6
+-----------------------------------
+
+After releasing GMime 2.4, it was discovered that
+g_mime_stream_length() still returned ssize_t which, on 32bit systems,
+meant that the function was useless if the actual stream was larger
+than 2GB (which could happen if GMime was built with large file
+support).
+
+As I fixed this, I also found some API inconsistencies which I felt I
+might as well fix up since I had to break API/ABI compatibility with
+2.4 anyway.
+
+Most notable in GMime 2.6 is the lack of GMimeSession which has been
+dropped in favor of a much simpler callback
+mechanism. GMimeCipherContexts constructors now take a
+password_request callback function rather than forcing you to subclass
+GMimeSession to get this functionality.
+
+Other API changes include:
+
+- GMimeBestEncoding has been renamed to GMimeEncodingConstraint
+
+- g_mime_signer_get_created() has been renamed to
+  g_mime_signer_get_sig_created().
+
+- g_mime_signer_set_created() has been renamed to
+  g_mime_signer_set_sig_created().
+
+- g_mime_signer_get_expires() has been renamed to
+  g_mime_signer_get_sig_expires().
+
+- g_mime_signer_set_expires() has been renamed to
+  g_mime_signer_set_sig_expires().
+
+- GMimeSigner now has a number of new fields and accessors making it
+  much more complete.
+
+For convenience, GMime 2.6 source packages include a shell-script to
+aid in porting applications using GMime 2.4 to the 2.6 API. You can
+find this script under the tools/ directory, named
+`gmime-port-2-4-to-2-6.sh'.
+
+
 Porting from GMime 2.2 to GMime 2.4
 -----------------------------------
 
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 2c51303..b88d638 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,4 +2,4 @@
 
 SUBDIRS = .
 
-EXTRA_DIST = gmime-port-2-2-to-2-4.sh
+EXTRA_DIST = gmime-port-2-2-to-2-4.sh gmime-port-2-4-to-2-6.sh 
diff --git a/tools/gmime-port-2-4-to-2-6.sh b/tools/gmime-port-2-4-to-2-6.sh
new file mode 100755
index 0000000..86e070e
--- /dev/null
+++ b/tools/gmime-port-2-4-to-2-6.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+for src in `find . -name "*.[c,h]"`
+do
+    echo "Auto-porting '$src' from GMime-2.4 to GMime-2.6..."
+    sed -e "s/GMIME_BEST_ENCODING_7BIT/GMIME_ENCODING_CONSTRAINT_7BIT/g" \
+	-e "s/GMIME_BEST_ENCODING_8BIT/GMIME_ENCODING_CONSTRAINT_8BIT/g" \
+	-e "s/GMIME_BEST_ENCODING_BINARY/GMIME_ENCODING_CONSTRAINT_BINARY/g" \
+	-e "s/GMimeBestEncoding/GMimeEncodingConstraint/g" \
+	-e "s/g_mime_signer_get_created/g_mime_signer_get_sig_created/g" \
+	-e "s/g_mime_signer_set_created/g_mime_signer_set_sig_created/g" \
+	-e "s/g_mime_signer_get_expires/g_mime_signer_get_sig_expires/g" \
+	-e "s/g_mime_signer_set_expires/g_mime_signer_set_sig_expires/g" \
+	< "$src" > "$src.tmp"
+    mv "$src.tmp" "$src"
+done



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]