MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/local/ssl/share/gtk-doc/html/gsf/gsf-blobs.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GsfBlob</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="GSF Reference Manual">
<link rel="up" href="parsers.html" title="Stream Parsers">
<link rel="prev" href="gsf-OASIS-Open-Document.html" title="OASIS Open Document">
<link rel="next" href="GsfClipData.html" title="GsfClipData">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="intro.html" title="Part&#160;I.&#160;GSF: Introduction">
<link rel="part" href="history.html" title="Part&#160;II.&#160;GSF: History">
<link rel="part" href="dependencies.html" title="Part&#160;III.&#160;GSF: Dependencies">
<link rel="part" href="gsf-users.html" title="Part&#160;IV.&#160;Projects using GSF">
<link rel="part" href="api.html" title="Part&#160;V.&#160;API Reference">
<link rel="chapter" href="io.html" title="Basic Input/Output">
<link rel="chapter" href="sources.html" title="Stream Sources">
<link rel="chapter" href="parsers.html" title="Stream Parsers">
<link rel="chapter" href="misc.html" title="Miscellaneous">
<link rel="index" href="ix01.html" title="Index">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="gsf-OASIS-Open-Document.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="parsers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GSF Reference Manual</th>
<td><a accesskey="n" href="GsfClipData.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gsf-blobs"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>GsfBlob</span></h2>
<p>GsfBlob &#8212; </p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<a name="GsfBlob"></a><a name="GsfStructuredBlob"></a><pre class="synopsis">



            <a href="gsf-blobs.html#GsfBlob-struct">GsfBlob</a>;
            <a href="gsf-blobs.html#GsfBlobClass">GsfBlobClass</a>;
            <a href="gsf-blobs.html#GsfStructuredBlob-struct">GsfStructuredBlob</a>;
<a href="gsf-blobs.html#GsfBlob">GsfBlob</a>*    <a href="gsf-blobs.html#gsf-blob-new">gsf_blob_new</a>                    (gsize size,
                                             gconstpointer data_to_copy,
                                             GError **error);
gsize       <a href="gsf-blobs.html#gsf-blob-get-size">gsf_blob_get_size</a>               (<a href="gsf-blobs.html#GsfBlob">GsfBlob</a> *blob);
gconstpointer <a href="gsf-blobs.html#gsf-blob-peek-data">gsf_blob_peek_data</a>            (<a href="gsf-blobs.html#GsfBlob">GsfBlob</a> *blob);
gboolean    <a href="gsf-blobs.html#gsf-structured-blob-write">gsf_structured_blob_write</a>       (<a href="gsf-blobs.html#GsfStructuredBlob">GsfStructuredBlob</a> *blob,
                                             <a href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> *container);
<a href="gsf-blobs.html#GsfStructuredBlob">GsfStructuredBlob</a>* <a href="gsf-blobs.html#gsf-structured-blob-read">gsf_structured_blob_read</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2576627"></a><h3>
<a name="GsfBlob-struct"></a>GsfBlob</h3>
<a class="indexterm" name="id2576638"></a><pre class="programlisting">typedef struct _GsfBlob GsfBlob;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2576653"></a><h3>
<a name="GsfBlobClass"></a>GsfBlobClass</h3>
<a class="indexterm" name="id2576666"></a><pre class="programlisting">typedef struct {
	GObjectClass parent_class;
} GsfBlobClass;
</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2576682"></a><h3>
<a name="GsfStructuredBlob-struct"></a>GsfStructuredBlob</h3>
<a class="indexterm" name="id2576696"></a><pre class="programlisting">typedef struct _GsfStructuredBlob GsfStructuredBlob;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2576711"></a><h3>
<a name="gsf-blob-new"></a>gsf_blob_new ()</h3>
<a class="indexterm" name="id2576724"></a><pre class="programlisting"><a href="gsf-blobs.html#GsfBlob">GsfBlob</a>*    gsf_blob_new                    (gsize size,
                                             gconstpointer data_to_copy,
                                             GError **error);</pre>
<p>
Creates a new <a href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a> object to hold the specified data.  The blob can then
be used as a facility for reference-counting for the data.  The data is
copied internally, so the blob does not hold references to external chunks
of memory.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>size</code></em>&#160;:</span></td>
<td> Size of the data in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>data_to_copy</code></em>&#160;:</span></td>
<td> Data which will be copied into the blob, or <code class="literal">NULL</code> if <em class="parameter"><code>size</code></em> is zero.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
<td> location to store error, or <code class="literal">NULL</code>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> A newly-created <a href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a>, or <code class="literal">NULL</code> if the data could not be copied.

Error domain: <a href="gsf-utils.html#GSF-ERROR:CAPS"><span class="type">GSF_ERROR</span></a>

Possible errors: <span class="type">GSF_ERROR_OUT_OF_MEMORY</span> if the <em class="parameter"><code>data_to_copy</code></em> could not be copied.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2576912"></a><h3>
<a name="gsf-blob-get-size"></a>gsf_blob_get_size ()</h3>
<a class="indexterm" name="id2576926"></a><pre class="programlisting">gsize       gsf_blob_get_size               (<a href="gsf-blobs.html#GsfBlob">GsfBlob</a> *blob);</pre>
<p>
Queries the size in bytes of the data stored in the blob.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>blob</code></em>&#160;:</span></td>
<td> A <a href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Size in bytes, or 0 if the data is <code class="literal">NULL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2577004"></a><h3>
<a name="gsf-blob-peek-data"></a>gsf_blob_peek_data ()</h3>
<a class="indexterm" name="id2577018"></a><pre class="programlisting">gconstpointer gsf_blob_peek_data            (<a href="gsf-blobs.html#GsfBlob">GsfBlob</a> *blob);</pre>
<p>
Queries a pointer to the data stored in the blob.  This does not copy the data
for you; it returns a pointer to the actual buffer which the blob uses internally,
so you should not free this buffer on your own.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>blob</code></em>&#160;:</span></td>
<td> A <a href="gsf-blobs.html#GsfBlob"><span class="type">GsfBlob</span></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> Pointer to the data stored in the blob, or <code class="literal">NULL</code> if the size
of the data is zero.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2577099"></a><h3>
<a name="gsf-structured-blob-write"></a>gsf_structured_blob_write ()</h3>
<a class="indexterm" name="id2577113"></a><pre class="programlisting">gboolean    gsf_structured_blob_write       (<a href="gsf-blobs.html#GsfStructuredBlob">GsfStructuredBlob</a> *blob,
                                             <a href="gsf-Outfile-writing-structed-files.html#GsfOutfile">GsfOutfile</a> *container);</pre>
<p>
Dumps structured blob <em class="parameter"><code>blob</code></em> onto the <em class="parameter"><code>container</code></em>.  Will fail if the output is
not an Outfile and blob has multiple streams.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>blob</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>container</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> TRUE on success.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2577208"></a><h3>
<a name="gsf-structured-blob-read"></a>gsf_structured_blob_read ()</h3>
<a class="indexterm" name="id2577220"></a><pre class="programlisting"><a href="gsf-blobs.html#GsfStructuredBlob">GsfStructuredBlob</a>* gsf_structured_blob_read (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
<p>
</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>input</code></em>&#160;:</span></td>
<td> An input (potentially a GsfInfile) holding the blob
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a freshly created tree of blobs
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>