Spaces:
Running
Running
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>PopplerAttachment: Poppler Reference Manual</title> | |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> | |
<link rel="home" href="index.html" title="Poppler Reference Manual"> | |
<link rel="up" href="ch01.html" title="Poppler"> | |
<link rel="prev" href="PopplerAction.html" title="PopplerAction"> | |
<link rel="next" href="PopplerFormField.html" title="PopplerFormField"> | |
<meta name="generator" content="GTK-Doc V1.34.0 (XML mode)"> | |
<link rel="stylesheet" href="style.css" type="text/css"> | |
</head> | |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
<td width="100%" align="left" class="shortcuts"> | |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
<a href="#PopplerAttachment.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
<a href="#PopplerAttachment.object-hierarchy" class="shortcut">Object Hierarchy</a></span> | |
</td> | |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
<td><a accesskey="p" href="PopplerAction.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
<td><a accesskey="n" href="PopplerFormField.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
</tr></table> | |
<div class="refentry"> | |
<a name="PopplerAttachment"></a><div class="titlepage"></div> | |
<div class="refnamediv"><table width="100%"><tr> | |
<td valign="top"> | |
<h2><span class="refentrytitle"><a name="PopplerAttachment.top_of_page"></a>PopplerAttachment</span></h2> | |
<p>PopplerAttachment — Attachments</p> | |
</td> | |
<td class="gallery_image" valign="top" align="right"></td> | |
</tr></table></div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.functions"></a><h2>Functions</h2> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="functions_proto_type"> | |
<col class="functions_proto_name"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">gboolean</span> | |
</td> | |
<td class="function_name"> | |
<span class="c_punctuation">(</span><a class="link" href="PopplerAttachment.html#PopplerAttachmentSaveFunc" title="PopplerAttachmentSaveFunc ()">*PopplerAttachmentSaveFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type">const <span class="returnvalue">GString</span> * | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-checksum" title="poppler_attachment_get_checksum ()">poppler_attachment_get_checksum</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">GDateTime</span> * | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-ctime" title="poppler_attachment_get_ctime ()">poppler_attachment_get_ctime</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type">const <span class="returnvalue">gchar</span> * | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-description" title="poppler_attachment_get_description ()">poppler_attachment_get_description</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">GDateTime</span> * | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-mtime" title="poppler_attachment_get_mtime ()">poppler_attachment_get_mtime</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type">const <span class="returnvalue">gchar</span> * | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-name" title="poppler_attachment_get_name ()">poppler_attachment_get_name</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">gsize</span> | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-size" title="poppler_attachment_get_size ()">poppler_attachment_get_size</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">gboolean</span> | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-save" title="poppler_attachment_save ()">poppler_attachment_save</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">gboolean</span> | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-fd" title="poppler_attachment_save_to_fd ()">poppler_attachment_save_to_fd</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="function_type"> | |
<span class="returnvalue">gboolean</span> | |
</td> | |
<td class="function_name"> | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()">poppler_attachment_save_to_callback</a> <span class="c_punctuation">()</span> | |
</td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.other"></a><h2>Types and Values</h2> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="other_proto_type"> | |
<col class="other_proto_name"> | |
</colgroup> | |
<tbody><tr> | |
<td class="datatype_keyword"> </td> | |
<td class="function_name"><a class="link" href="PopplerAttachment.html#PopplerAttachment-struct" title="PopplerAttachment">PopplerAttachment</a></td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
<pre class="screen"> GObject | |
<span class="lineart">╰──</span> PopplerAttachment | |
</pre> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.includes"></a><h2>Includes</h2> | |
<pre class="synopsis">#include <poppler.h> | |
</pre> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.description"></a><h2>Description</h2> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.functions_details"></a><h2>Functions</h2> | |
<div class="refsect2"> | |
<a name="PopplerAttachmentSaveFunc"></a><h3>PopplerAttachmentSaveFunc ()</h3> | |
<pre class="programlisting"><span class="returnvalue">gboolean</span> | |
<span class="c_punctuation">(</span>*PopplerAttachmentSaveFunc<span class="c_punctuation">)</span> (<em class="parameter"><code>const <span class="type">gchar</span> *buf</code></em>, | |
<em class="parameter"><code><span class="type">gsize</span> count</code></em>, | |
<em class="parameter"><code><span class="type">gpointer</span> data</code></em>, | |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> | |
<p>Specifies the type of the function passed to | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>. It is called once for each block of | |
bytes that is "written" by <a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>. If | |
successful it should return <code class="literal">TRUE</code>. If an error occurs it should set | |
<em class="parameter"><code>error</code></em> | |
and return <code class="literal">FALSE</code>, in which case <a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a> | |
will fail with the same error.</p> | |
<div class="refsect3"> | |
<a name="PopplerAttachmentSaveFunc.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="parameter_name"><p>buf</p></td> | |
<td class="parameter_description"><p>buffer containing | |
bytes to be written. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>count</p></td> | |
<td class="parameter_description"><p>number of bytes in <em class="parameter"><code>buf</code></em> | |
.</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>data</p></td> | |
<td class="parameter_description"><p>user data passed to <a class="link" href="PopplerAttachment.html#poppler-attachment-save-to-callback" title="poppler_attachment_save_to_callback ()"><code class="function">poppler_attachment_save_to_callback()</code></a>. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>error</p></td> | |
<td class="parameter_description"><p>GError to set on error, or <code class="literal">NULL</code></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="PopplerAttachmentSaveFunc.returns"></a><h4>Returns</h4> | |
<p> <code class="literal">TRUE</code> if successful, <code class="literal">FALSE</code> (with <em class="parameter"><code>error</code></em> | |
set) if failed.</p> | |
</div> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-checksum"></a><h3>poppler_attachment_get_checksum ()</h3> | |
<pre class="programlisting">const <span class="returnvalue">GString</span> * | |
poppler_attachment_get_checksum (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-checksum.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-checksum.returns"></a><h4>Returns</h4> | |
<p> The attachment's checksum.</p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-ctime"></a><h3>poppler_attachment_get_ctime ()</h3> | |
<pre class="programlisting"><span class="returnvalue">GDateTime</span> * | |
poppler_attachment_get_ctime (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-ctime.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-ctime.returns"></a><h4>Returns</h4> | |
<p>The attachment's creation date and time | |
as a <span class="type">GDateTime</span>, or <code class="literal">NULL</code> if the creation date and time is not available. </p> | |
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-description"></a><h3>poppler_attachment_get_description ()</h3> | |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * | |
poppler_attachment_get_description (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-description.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-description.returns"></a><h4>Returns</h4> | |
<p> The attachment's descriptive text.</p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-mtime"></a><h3>poppler_attachment_get_mtime ()</h3> | |
<pre class="programlisting"><span class="returnvalue">GDateTime</span> * | |
poppler_attachment_get_mtime (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-mtime.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-mtime.returns"></a><h4>Returns</h4> | |
<p>The attachment's modification date and | |
time as a <span class="type">GDateTime</span>, or <code class="literal">NULL</code> if the modification date and time is not | |
available. </p> | |
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-name"></a><h3>poppler_attachment_get_name ()</h3> | |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * | |
poppler_attachment_get_name (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-name.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-name.returns"></a><h4>Returns</h4> | |
<p> The attachment's name.</p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-get-size"></a><h3>poppler_attachment_get_size ()</h3> | |
<pre class="programlisting"><span class="returnvalue">gsize</span> | |
poppler_attachment_get_size (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>);</pre> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-size.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody><tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>a <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a></p></td> | |
<td class="parameter_annotations"> </td> | |
</tr></tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-get-size.returns"></a><h4>Returns</h4> | |
<p> The attachment's size.</p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-20-09-0.html#api-index-20.09.0">20.09.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-save"></a><h3>poppler_attachment_save ()</h3> | |
<pre class="programlisting"><span class="returnvalue">gboolean</span> | |
poppler_attachment_save (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>, | |
<em class="parameter"><code>const <span class="type">char</span> *filename</code></em>, | |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> | |
<p>Saves <em class="parameter"><code>attachment</code></em> | |
to a file indicated by <em class="parameter"><code>filename</code></em> | |
. If <em class="parameter"><code>error</code></em> | |
is set, <code class="literal">FALSE</code> | |
will be returned. Possible errors include those in the <span class="type">G_FILE_ERROR</span> domain | |
and whatever the save function generates.</p> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>A <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a>.</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>filename</p></td> | |
<td class="parameter_description"><p>name of file to save</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>error</p></td> | |
<td class="parameter_description"><p>return location for error, or <code class="literal">NULL</code>. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save.returns"></a><h4>Returns</h4> | |
<p> <code class="literal">TRUE</code>, if the file successfully saved</p> | |
</div> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-save-to-fd"></a><h3>poppler_attachment_save_to_fd ()</h3> | |
<pre class="programlisting"><span class="returnvalue">gboolean</span> | |
poppler_attachment_save_to_fd (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>, | |
<em class="parameter"><code><span class="type">int</span> fd</code></em>, | |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> | |
<p>Saves <em class="parameter"><code>attachment</code></em> | |
to a file referred to by <em class="parameter"><code>fd</code></em> | |
. If <em class="parameter"><code>error</code></em> | |
is set, <code class="literal">FALSE</code> | |
will be returned. Possible errors include those in the <span class="type">G_FILE_ERROR</span> domain | |
and whatever the save function generates. | |
Note that this function takes ownership of <em class="parameter"><code>fd</code></em> | |
; you must not operate on it | |
again, nor close it.</p> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save-to-fd.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>A <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a>.</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>fd</p></td> | |
<td class="parameter_description"><p>a valid file descriptor open for writing</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>error</p></td> | |
<td class="parameter_description"><p>return location for error, or <code class="literal">NULL</code>. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save-to-fd.returns"></a><h4>Returns</h4> | |
<p> <code class="literal">TRUE</code>, if the file successfully saved</p> | |
</div> | |
<p class="since">Since: <a class="link" href="api-index-21-12-0.html#api-index-21.12.0">21.12.0</a></p> | |
</div> | |
<hr> | |
<div class="refsect2"> | |
<a name="poppler-attachment-save-to-callback"></a><h3>poppler_attachment_save_to_callback ()</h3> | |
<pre class="programlisting"><span class="returnvalue">gboolean</span> | |
poppler_attachment_save_to_callback (<em class="parameter"><code><a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a> *attachment</code></em>, | |
<em class="parameter"><code><a class="link" href="PopplerAttachment.html#PopplerAttachmentSaveFunc" title="PopplerAttachmentSaveFunc ()"><span class="type">PopplerAttachmentSaveFunc</span></a> save_func</code></em>, | |
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, | |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> | |
<p>Saves <em class="parameter"><code>attachment</code></em> | |
by feeding the produced data to <em class="parameter"><code>save_func</code></em> | |
. Can be used | |
when you want to store the attachment to something other than a file, such as | |
an in-memory buffer or a socket. If <em class="parameter"><code>error</code></em> | |
is set, <code class="literal">FALSE</code> will be | |
returned. Possible errors include those in the <span class="type">G_FILE_ERROR</span> domain and | |
whatever the save function generates.</p> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save-to-callback.parameters"></a><h4>Parameters</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="150px" class="parameters_name"> | |
<col class="parameters_description"> | |
<col width="200px" class="parameters_annotations"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="parameter_name"><p>attachment</p></td> | |
<td class="parameter_description"><p>A <a class="link" href="PopplerAttachment.html" title="PopplerAttachment"><span class="type">PopplerAttachment</span></a>.</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>save_func</p></td> | |
<td class="parameter_description"><p>a function that is called to save each block of data that the save routine generates. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>user_data</p></td> | |
<td class="parameter_description"><p>user data to pass to the save function.</p></td> | |
<td class="parameter_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="parameter_name"><p>error</p></td> | |
<td class="parameter_description"><p>return location for error, or <code class="literal">NULL</code>. </p></td> | |
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
<div class="refsect3"> | |
<a name="poppler-attachment-save-to-callback.returns"></a><h4>Returns</h4> | |
<p> <code class="literal">TRUE</code>, if the save successfully completed</p> | |
</div> | |
</div> | |
</div> | |
<div class="refsect1"> | |
<a name="PopplerAttachment.other_details"></a><h2>Types and Values</h2> | |
<div class="refsect2"> | |
<a name="PopplerAttachment-struct"></a><h3>PopplerAttachment</h3> | |
<pre class="programlisting">typedef struct { | |
gchar *name; | |
gchar *description; | |
gsize size; | |
/* GTime is deprecated, but is part of our ABI here (see #715, #765). */ | |
GTime mtime; | |
GTime ctime; | |
GString *checksum; | |
} PopplerAttachment; | |
</pre> | |
<div class="refsect3"> | |
<a name="PopplerAttachment.members"></a><h4>Members</h4> | |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
<colgroup> | |
<col width="300px" class="struct_members_name"> | |
<col class="struct_members_description"> | |
<col width="200px" class="struct_members_annotations"> | |
</colgroup> | |
<tbody> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">gchar</span> *<em class="structfield"><code><a name="PopplerAttachment-struct.name"></a>name</code></em>;</p></td> | |
<td class="struct_member_description"><p>The filename. Deprecated in poppler 20.09.0. Use | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-name" title="poppler_attachment_get_name ()"><code class="function">poppler_attachment_get_name()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">gchar</span> *<em class="structfield"><code><a name="PopplerAttachment-struct.description"></a>description</code></em>;</p></td> | |
<td class="struct_member_description"><p>Descriptive text. Deprecated in poppler 20.09.0. Use | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-description" title="poppler_attachment_get_description ()"><code class="function">poppler_attachment_get_description()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="PopplerAttachment-struct.size"></a>size</code></em>;</p></td> | |
<td class="struct_member_description"><p>The size of the file. Deprecated in poppler 20.09.0. Use | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-size" title="poppler_attachment_get_size ()"><code class="function">poppler_attachment_get_size()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">GTime</span> <em class="structfield"><code><a name="PopplerAttachment-struct.mtime"></a>mtime</code></em>;</p></td> | |
<td class="struct_member_description"><p>The date and time when the file was last modified. Deprecated in | |
poppler 20.09.0. Use <a class="link" href="PopplerAttachment.html#poppler-attachment-get-mtime" title="poppler_attachment_get_mtime ()"><code class="function">poppler_attachment_get_mtime()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">GTime</span> <em class="structfield"><code><a name="PopplerAttachment-struct.ctime"></a>ctime</code></em>;</p></td> | |
<td class="struct_member_description"><p>The date and time when the file was created. Deprecated in poppler | |
20.09.0. Use <a class="link" href="PopplerAttachment.html#poppler-attachment-get-ctime" title="poppler_attachment_get_ctime ()"><code class="function">poppler_attachment_get_ctime()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
<tr> | |
<td class="struct_member_name"><p><span class="type">GString</span> *<em class="structfield"><code><a name="PopplerAttachment-struct.checksum"></a>checksum</code></em>;</p></td> | |
<td class="struct_member_description"><p>A 16-byte checksum of the file. Deprecated in poppler 20.09.0. Use | |
<a class="link" href="PopplerAttachment.html#poppler-attachment-get-checksum" title="poppler_attachment_get_checksum ()"><code class="function">poppler_attachment_get_checksum()</code></a> instead.</p></td> | |
<td class="struct_member_annotations"> </td> | |
</tr> | |
</tbody> | |
</table></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="footer"> | |
<hr>Generated by GTK-Doc V1.34.0</div> | |
</body> | |
</html> |