Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / changes-2.4.sgml
1 <refentry id="gmime-changes-2-4" revision="23 May 2008">
2   <refmeta>
3     <refentrytitle>Changes from 2.2 to 2.4</refentrytitle>
4     <manvolnum>3</manvolnum>
5     <refmiscinfo>Changes from 2.2 to 2.4</refmiscinfo>
6   </refmeta>
7   <refnamediv>
8     <refname>Changes from 2.2 to 2.4</refname>
9     <refpurpose>Changes made between version 2.2 and version 2.4</refpurpose>
10   </refnamediv>
11   <refsect1>
12     <title>Changes from 2.2 to 2.4</title>
13     <para>GMime 2.4 has had a number of API changes since GMime
14 2.2. To start, ALL public APIs that used to use off_t in GMime 2.2 now
15 use gint64 so that the API and ABI do not change based on whether or
16 not large file support is enabled.</para>
17     <para>In addition, all of the functions marked as deprecated in
18 2.0 and 2.2 were removed (usually they had equivalent functionality in
19 a parent class).</para>
20     <para>Many functions have also been renamed for better clarity
21 and/or consistency. For convenience, GMime 2.4 source packages include
22 a shell-script to aid in porting applications using GMime 2.2 (should
23 work for most GMime 2.0 applications as well) to the 2.4 API. You can
24 find this script under the tools/ directory, named
25 `gmime-port-2-2-to-2-4.sh'.</para>
26     <para>This script won't fix everything, but it should help quite a
27 bit.</para>
28     <para>Beyond that, a few methods have changed in other ways:</para>
29     <itemizedlist>
30       <listitem><para><function>g_mime_cipher_context_sign()</function>
31   still returns int, but if the value isn't -1 (failure), then it will
32   represent a GMimeCipherHash that it used for signing. This is
33   useful, for example, when the requested hash was
34   GMIME_CIPHER_HASH_DEFAULT.</para></listitem>
35       <listitem><para><function>g_mime_cipher_context_decrypt()</function>
36   now returns a GMimeSignatureValidty on success and NULL on
37   failure. This is needed in case the encrypted stream was also
38   signed.</para></listitem>
39       <listitem><para><function>g_mime_multipart_encrypted_encrypt()</function>
40   now takes a boolean 'sign' argument to allow the caller to request
41   encrypting and signing in a single pass.</para></listitem>
42     </itemizedlist>
43     <para>Several structs have also been rewritten to subclass GObject like
44 GMimeContentType and GMimeContentDisposition as well as
45 InternetAddress and InternetAddressList.</para>
46     <para>Not only have InternetAddress and InternetAddressList been ported to
47 GObject, but they have also undergone other design
48 changes. InternetAddress is now a base class for
49 InternetAddressMailbox and InternetAddressGroup, meaning that
50 InternetAddress no longer contains a union for group/addr fields.</para>
51     <para>All functions that return a GObject have been changed to not add a ref
52 to the object returned, meaning that it is no longer necessary to call
53 g_object_unref() on MIME parts returned from functions like
54 g_mime_message_get_mime_part() or g_mime_multipart_get_part(). This
55 was done to be more consistent with the Gtk+ API.</para>
56   </refsect1>
57 </refentry>