Initialize the gmime for upstream
[platform/upstream/gmime.git] / docs / reference / html / GMimeMultipartSigned.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>GMimeMultipartSigned</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="MimeParts.html" title="MIME Messages and Parts">
9 <link rel="prev" href="GMimeMultipartEncrypted.html" title="GMimeMultipartEncrypted">
10 <link rel="next" href="GMimeMessagePart.html" title="GMimeMessagePart">
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">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GMimeMultipartEncrypted.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="MimeParts.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GMime 2.6 Reference Manual</th>
21 <td><a accesskey="n" href="GMimeMessagePart.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GMimeMultipartSigned.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GMimeMultipartSigned.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GMimeMultipartSigned.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry">
32 <a name="GMimeMultipartSigned"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="GMimeMultipartSigned.top_of_page"></a>GMimeMultipartSigned</span></h2>
36 <p>GMimeMultipartSigned — Signed MIME multiparts</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv">
41 <a name="GMimeMultipartSigned.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">struct              <a class="link" href="GMimeMultipartSigned.html#GMimeMultipartSigned-struct" title="struct GMimeMultipartSigned">GMimeMultipartSigned</a>;
43 <a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="returnvalue">GMimeMultipartSigned</span></a> * <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-new" title="g_mime_multipart_signed_new ()">g_mime_multipart_signed_new</a>      (<em class="parameter"><code><span class="type">void</span></code></em>);
44 <span class="returnvalue">int</span>                 <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-sign" title="g_mime_multipart_signed_sign ()">g_mime_multipart_signed_sign</a>        (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
45                                                          <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *content</code></em>,
46                                                          <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
47                                                          <em class="parameter"><code>const <span class="type">char</span> *userid</code></em>,
48                                                          <em class="parameter"><code><a class="link" href="GMimeCertificate.html#GMimeDigestAlgo" title="enum GMimeDigestAlgo"><span class="type">GMimeDigestAlgo</span></a> digest</code></em>,
49                                                          <em class="parameter"><code><span class="type">GError</span> **err</code></em>);
50 <a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="returnvalue">GMimeSignatureList</span></a> * <a class="link" href="GMimeMultipartSigned.html#g-mime-multipart-signed-verify" title="g_mime_multipart_signed_verify ()">g_mime_multipart_signed_verify</a>     (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
51                                                          <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
52                                                          <em class="parameter"><code><span class="type">GError</span> **err</code></em>);
53 </pre>
54 </div>
55 <div class="refsect1">
56 <a name="GMimeMultipartSigned.object-hierarchy"></a><h2>Object Hierarchy</h2>
57 <pre class="synopsis">
58   GObject
59    +----<a class="link" href="GMimeObject.html" title="GMimeObject">GMimeObject</a>
60          +----<a class="link" href="GMimeMultipart.html" title="GMimeMultipart">GMimeMultipart</a>
61                +----GMimeMultipartSigned
62 </pre>
63 </div>
64 <div class="refsect1">
65 <a name="GMimeMultipartSigned.description"></a><h2>Description</h2>
66 <p>
67 A <a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> part is a special subclass of
68 <a class="link" href="GMimeMultipart.html" title="GMimeMultipart"><span class="type">GMimeMultipart</span></a> to make it easier to manipulate the
69 multipart/signed MIME type.
70 </p>
71 </div>
72 <div class="refsect1">
73 <a name="GMimeMultipartSigned.details"></a><h2>Details</h2>
74 <div class="refsect2">
75 <a name="GMimeMultipartSigned-struct"></a><h3>struct GMimeMultipartSigned</h3>
76 <pre class="programlisting">struct GMimeMultipartSigned;</pre>
77 <p>
78 A multipart/signed MIME part.
79 </p>
80 <div class="variablelist"><table border="0">
81 <col align="left" valign="top">
82 <tbody></tbody>
83 </table></div>
84 </div>
85 <hr>
86 <div class="refsect2">
87 <a name="g-mime-multipart-signed-new"></a><h3>g_mime_multipart_signed_new ()</h3>
88 <pre class="programlisting"><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="returnvalue">GMimeMultipartSigned</span></a> * g_mime_multipart_signed_new      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
89 <p>
90 Creates a new MIME multipart/signed object.
91 </p>
92 <div class="variablelist"><table border="0">
93 <col align="left" valign="top">
94 <tbody><tr>
95 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
96 <td>an empty MIME multipart/signed object.</td>
97 </tr></tbody>
98 </table></div>
99 </div>
100 <hr>
101 <div class="refsect2">
102 <a name="g-mime-multipart-signed-sign"></a><h3>g_mime_multipart_signed_sign ()</h3>
103 <pre class="programlisting"><span class="returnvalue">int</span>                 g_mime_multipart_signed_sign        (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
104                                                          <em class="parameter"><code><a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> *content</code></em>,
105                                                          <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
106                                                          <em class="parameter"><code>const <span class="type">char</span> *userid</code></em>,
107                                                          <em class="parameter"><code><a class="link" href="GMimeCertificate.html#GMimeDigestAlgo" title="enum GMimeDigestAlgo"><span class="type">GMimeDigestAlgo</span></a> digest</code></em>,
108                                                          <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
109 <p>
110 Attempts to sign the <em class="parameter"><code>content</code></em> MIME part with <em class="parameter"><code>userid</code></em>'s private key
111 using the <em class="parameter"><code>ctx</code></em> signing context with the <em class="parameter"><code>digest</code></em> algorithm. If
112 successful, the signed <a class="link" href="GMimeObject.html" title="GMimeObject"><span class="type">GMimeObject</span></a> is set as the signed part of
113 the multipart/signed object <em class="parameter"><code>mps</code></em>.
114 </p>
115 <div class="variablelist"><table border="0">
116 <col align="left" valign="top">
117 <tbody>
118 <tr>
119 <td><p><span class="term"><em class="parameter"><code>mps</code></em> :</span></p></td>
120 <td>multipart/signed object</td>
121 </tr>
122 <tr>
123 <td><p><span class="term"><em class="parameter"><code>content</code></em> :</span></p></td>
124 <td>MIME part to sign</td>
125 </tr>
126 <tr>
127 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
128 <td>encryption crypto context</td>
129 </tr>
130 <tr>
131 <td><p><span class="term"><em class="parameter"><code>userid</code></em> :</span></p></td>
132 <td>user id to sign with</td>
133 </tr>
134 <tr>
135 <td><p><span class="term"><em class="parameter"><code>digest</code></em> :</span></p></td>
136 <td>preferred digest algorithm</td>
137 </tr>
138 <tr>
139 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
140 <td>exception</td>
141 </tr>
142 <tr>
143 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
144 <td>
145 <code class="literal">0</code> on success or <code class="literal">-1</code> on fail. If the signing fails, an
146 exception will be set on <em class="parameter"><code>err</code></em> to provide information as to why the
147 failure occured.</td>
148 </tr>
149 </tbody>
150 </table></div>
151 </div>
152 <hr>
153 <div class="refsect2">
154 <a name="g-mime-multipart-signed-verify"></a><h3>g_mime_multipart_signed_verify ()</h3>
155 <pre class="programlisting"><a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="returnvalue">GMimeSignatureList</span></a> * g_mime_multipart_signed_verify     (<em class="parameter"><code><a class="link" href="GMimeMultipartSigned.html" title="GMimeMultipartSigned"><span class="type">GMimeMultipartSigned</span></a> *mps</code></em>,
156                                                          <em class="parameter"><code><a class="link" href="GMimeCryptoContext.html" title="GMimeCryptoContext"><span class="type">GMimeCryptoContext</span></a> *ctx</code></em>,
157                                                          <em class="parameter"><code><span class="type">GError</span> **err</code></em>);</pre>
158 <p>
159 Attempts to verify the signed MIME part contained within the
160 multipart/signed object <em class="parameter"><code>mps</code></em> using the <em class="parameter"><code>ctx</code></em> crypto context.
161 </p>
162 <div class="variablelist"><table border="0">
163 <col align="left" valign="top">
164 <tbody>
165 <tr>
166 <td><p><span class="term"><em class="parameter"><code>mps</code></em> :</span></p></td>
167 <td>multipart/signed object</td>
168 </tr>
169 <tr>
170 <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td>
171 <td>encryption crypto context</td>
172 </tr>
173 <tr>
174 <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td>
175 <td>exception</td>
176 </tr>
177 <tr>
178 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
179 <td>a new <a class="link" href="GMimeSignature.html#GMimeSignatureList"><span class="type">GMimeSignatureList</span></a> object on success or <code class="literal">NULL</code> on fail. If
180 the verification fails, an exception will be set on <em class="parameter"><code>err</code></em> to provide
181 information as to why the failure occured.</td>
182 </tr>
183 </tbody>
184 </table></div>
185 </div>
186 </div>
187 <div class="refsect1">
188 <a name="GMimeMultipartSigned.see-also"></a><h2>See Also</h2>
189 <a class="link" href="GMimeMultipart.html" title="GMimeMultipart"><span class="type">GMimeMultipart</span></a>
190 </div>
191 </div>
192 <div class="footer">
193 <hr>
194           Generated by GTK-Doc V1.18</div>
195 </body>
196 </html>