Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / html / gmime-changes-2-4.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Changes from 2.2 to 2.4</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GMime 2.6 Reference Manual">
8 <link rel="up" href="gmime.html" title="Part I. GMime Overview">
9 <link rel="prev" href="gmime-changes-2-2.html" title="Changes from 2.0 to 2.2">
10 <link rel="next" href="gmime-changes-2-6.html" title="Changes from 2.4 to 2.6">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16 <td><a accesskey="p" href="gmime-changes-2-2.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="gmime.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
20 <td><a accesskey="n" href="gmime-changes-2-6.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr></table>
22 <div class="refentry">
23 <a name="gmime-changes-2-4"></a><div class="titlepage"></div>
24 <div class="refnamediv"><table width="100%"><tr>
25 <td valign="top">
26 <h2><span class="refentrytitle">Changes from 2.2 to 2.4</span></h2>
27 <p>Changes from 2.2 to 2.4 — Changes made between version 2.2 and version 2.4</p>
28 </td>
29 <td valign="top" align="right"></td>
30 </tr></table></div>
31 <div class="refsect1">
32 <a name="idp5083696"></a><h2>Changes from 2.2 to 2.4</h2>
33 <p>GMime 2.4 has had a number of API changes since GMime
34 2.2. To start, ALL public APIs that used to use off_t in GMime 2.2 now
35 use gint64 so that the API and ABI do not change based on whether or
36 not large file support is enabled.</p>
37 <p>In addition, all of the functions marked as deprecated in
38 2.0 and 2.2 were removed (usually they had equivalent functionality in
39 a parent class).</p>
40 <p>Many functions have also been renamed for better clarity
41 and/or consistency. For convenience, GMime 2.4 source packages include
42 a shell-script to aid in porting applications using GMime 2.2 (should
43 work for most GMime 2.0 applications as well) to the 2.4 API. You can
44 find this script under the tools/ directory, named
45 `gmime-port-2-2-to-2-4.sh'.</p>
46 <p>This script won't fix everything, but it should help quite a
47 bit.</p>
48 <p>Beyond that, a few methods have changed in other ways:</p>
49 <div class="itemizedlist"><ul class="itemizedlist" type="disc">
50 <li class="listitem"><p><code class="function">g_mime_cipher_context_sign()</code>
51   still returns int, but if the value isn't -1 (failure), then it will
52   represent a GMimeCipherHash that it used for signing. This is
53   useful, for example, when the requested hash was
54   GMIME_CIPHER_HASH_DEFAULT.</p></li>
55 <li class="listitem"><p><code class="function">g_mime_cipher_context_decrypt()</code>
56   now returns a GMimeSignatureValidty on success and NULL on
57   failure. This is needed in case the encrypted stream was also
58   signed.</p></li>
59 <li class="listitem"><p><code class="function">g_mime_multipart_encrypted_encrypt()</code>
60   now takes a boolean 'sign' argument to allow the caller to request
61   encrypting and signing in a single pass.</p></li>
62 </ul></div>
63 <p>Several structs have also been rewritten to subclass GObject like
64 GMimeContentType and GMimeContentDisposition as well as
65 InternetAddress and InternetAddressList.</p>
66 <p>Not only have InternetAddress and InternetAddressList been ported to
67 GObject, but they have also undergone other design
68 changes. InternetAddress is now a base class for
69 InternetAddressMailbox and InternetAddressGroup, meaning that
70 InternetAddress no longer contains a union for group/addr fields.</p>
71 <p>All functions that return a GObject have been changed to not add a ref
72 to the object returned, meaning that it is no longer necessary to call
73 g_object_unref() on MIME parts returned from functions like
74 g_mime_message_get_mime_part() or g_mime_multipart_get_part(). This
75 was done to be more consistent with the Gtk+ API.</p>
76 </div>
77 </div>
78 <div class="footer">
79 <hr>
80           Generated by GTK-Doc V1.18</div>
81 </body>
82 </html>