[gmime] Updated porting documentation and script



commit 8b07e954b30e1ee8a7db377fb79af82ffbc4a091
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri Mar 18 10:10:35 2011 -0400

    Updated porting documentation and script

 PORTING                         |   25 +++++++++++--------------
 docs/reference/changes-2.6.sgml |   37 +++++++++++++++++++++++++++++--------
 tools/gmime-port-2-4-to-2-6.sh  |   37 +++++++++++++++++++++++++++++--------
 3 files changed, 69 insertions(+), 30 deletions(-)
---
diff --git a/PORTING b/PORTING
index dd160b4..102dddb 100644
--- a/PORTING
+++ b/PORTING
@@ -32,20 +32,12 @@ 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().
+- GMimeSignatureValidity has been dropped in favor of
+  GMimeSignatureList which is simply a collection of signatures.
 
-- 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.
+- GMimeSigner has been replaced by GMimeSignature and GMimeCertificate
+  which added a number of new fields and accessors making it much more
+  complete.
 
 - GMimeCipherContext has been renamed to GMimeCryptoContext and the
   method names for this class have also been renamed in a similar
@@ -58,8 +50,13 @@ Other API changes include:
   algorithm argument which it passes along to
   g_mime_crypto_context_encrypt().
 
+- g_mime_crypto_context_decrypt() now returns a GMimeDecryptResult
+  which contains a list of signatures (if signed), a list of
+  recipients that the stream had been encrypted to, and also the
+  cipher and digest algorithms used.
+
 - g_mime_multipart_encrypted_decrypt() no longer caches the decrypted
-  part and also now takes a GMimeSignatureValidity** output argument
+  part and also now takes a GMimeSignatureList** output argument
   which it sets in place of having to call
   g_mime_multipart_encrypted_get_signature_validity() afterward.
 
diff --git a/docs/reference/changes-2.6.sgml b/docs/reference/changes-2.6.sgml
index eee6a66..4443e9e 100644
--- a/docs/reference/changes-2.6.sgml
+++ b/docs/reference/changes-2.6.sgml
@@ -27,17 +27,38 @@ GMimeSession to get this functionality.</para>
     <itemizedlist>
       <listitem><para>GMimeBestEncoding has been renamed to
       GMimeEncodingConstraint</para></listitem>
-      <listitem><para><function>g_mime_signer_get_created()</function>
-  has been renamed to <function>g_mime_signer_get_sig_created()</function>.
+      <listitem><para>GMimeSignatureValidity has been dropped in favor
+      of GMimeSignatureList which is simply a collection of
+      signatures.
       </para></listitem>
-      <listitem><para><function>g_mime_signer_set_created()</function>
-  has been renamed to <function>g_mime_signer_set_sig_created()</function>.
+      <listitem><para>GMimeSigner has been replaced by GMimeSignature
+      and GMimeCertificate which added a number of new fields and
+      accessors making it much more complete.
       </para></listitem>
-      <listitem><para><function>g_mime_signer_get_expires()</function>
-  has been renamed to <function>g_mime_signer_get_sig_expires()</function>.
+      <listitem><para>GMimeCipherContext has been renamed to
+      GMimeCryptoContext and the method names for this class have also
+      been renamed in a similar fashion.
       </para></listitem>
-      <listitem><para><function>g_mime_signer_set_expires()</function>
-  has been renamed to <function>g_mime_signer_set_sig_expires()</function>.
+      <listitem><para><function>g_mime_crypto_context_encrypt()</function>
+      now takes a digest algorithm argument which is used when the
+      'sign' argument is TRUE.
+      </para></listitem>
+      <listitem><para><function>g_mime_multipart_encrypted_encrypt()</function>
+      also now takes a digest algorithm argument which it passes along
+      to <function>g_mime_crypto_context_encrypt()</function>.
+      </para></listitem>
+      <listitem><para><function>g_mime_crypto_context_decrypt()</function>
+      now returns a GMimeDecryptResult which contains a list of
+      signatures (if signed), a list of recipients that the stream had
+      been encrypted to, and also the cipher and digest algorithms
+      used.
+      </para></listitem>
+      <listitem><para><function>g_mime_multipart_encrypted_decrypt()</function>
+      no longer caches the decrypted part and also now takes a
+      GMimeSignatureList** output argument which it sets in place of
+      having to call
+      <function>g_mime_multipart_encrypted_get_signature_validity()</function>
+      afterward.
       </para></listitem>
     </itemizedlist>
   </refsect1>
diff --git a/tools/gmime-port-2-4-to-2-6.sh b/tools/gmime-port-2-4-to-2-6.sh
index 56792a2..3b032c0 100755
--- a/tools/gmime-port-2-4-to-2-6.sh
+++ b/tools/gmime-port-2-4-to-2-6.sh
@@ -7,16 +7,37 @@ do
 	-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/GMimeCipher/GMimeCrypto/g" \
-	-e "s/GMIME_CIPHER_/GMIME_CRYPTO_/g" \
-	-e "s/GMIME_IS_CIPHER_/GMIME_IS_CRYPTO_/g" \
-	-e "s/g_mime_cipher_/g_mime_crypto_/g" \
+	-e "s/GMimeCryptoHash/GMimeDigestAlgo/g" \
+	-e "s/GMIME_CRYPTO_HASH_/GMIME_DIGEST_ALGO_/g" \
+	-e "s/GMimeCipherContext/GMimeCryptoContext/g" \
+	-e "s/GMIME_CIPHER_CONTEXT/GMIME_CRYPTO_CONTEXT/g" \
+	-e "s/GMIME_IS_CIPHER_CONTEXT/GMIME_IS_CRYPTO_CONTEXT/g" \
+	-e "s/g_mime_cipher_context/g_mime_crypto_context/g" \
 	-e "s/gmime-cipher-context.h/gmime-crypto-context.h/g" \
 	-e "s/GMIME_TYPE_CIPHER_CONTEXT/GMIME_TYPE_CRYPTO_CONTEXT/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" \
+	-e "s/GMimeSignatureValidity/GMimeSignatureList/g" \
+	-e "s/g_mime_signature_validity_free/g_object_unref/g" \
+	-e "s/GMimeSignerTrust/GMimeCertificateTrust/g" \
+	-e "s/GMIME_SIGNER_TRUST_/GMIME_CERTIFICATE_TRUST_/g" \
+	-e "s/GMimeSignerStatus/GMimeSignatureStatus/g" \
+	-e "s/GMIME_SIGNER_STATUS_/GMIME_SIGNATURE_STATUS_/g" \
+	-e "s/GMimeSignerError/GMimeSignatureError/g" \
+	-e "s/GMIME_SIGNER_ERROR_/GMIME_SIGNATURE_ERROR_/g" \
+	-e "s/GMimeSigner/GMimeSignature/g" \
+	-e "s/g_mime_signer_get_fingerprint/g_mime_certificate_get_fingerprint/g" \
+	-e "s/g_mime_signer_set_fingerprint/g_mime_certificate_set_fingerprint/g" \
+	-e "s/g_mime_signer_get_created/g_mime_signature_get_created/g" \
+	-e "s/g_mime_signer_set_created/g_mime_signature_set_created/g" \
+	-e "s/g_mime_signer_get_expires/g_mime_signature_get_expires/g" \
+	-e "s/g_mime_signer_set_expires/g_mime_signature_set_expires/g" \
+	-e "s/g_mime_signer_get_key_id/g_mime_certificate_get_key_id/g" \
+	-e "s/g_mime_signer_set_key_id/g_mime_certificate_set_key_id/g" \
+	-e "s/g_mime_signer_get_status/g_mime_signature_get_status/g" \
+	-e "s/g_mime_signer_set_status/g_mime_signature_set_status/g" \
+	-e "s/g_mime_signer_get_errors/g_mime_signature_get_errors/g" \
+	-e "s/g_mime_signer_set_errors/g_mime_signature_set_errors/g" \
+	-e "s/g_mime_signer_get_name/g_mime_certificate_get_name/g" \
+	-e "s/g_mime_signer_set_name/g_mime_certificate_set_name/g" \
 	< "$src" > "$src.tmp"
     mv "$src.tmp" "$src"
 done



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