<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="GdkContentDeserializer">
<refmeta>
<refentrytitle role="top_of_page" id="GdkContentDeserializer.top_of_page">GdkContentDeserializer</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkContentDeserializer</refname>
<refpurpose>Deserialize content for transfer</refpurpose>
</refnamediv>

<refsect1 id="GdkContentDeserializer.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><phrase role="c_punctuation">(</phrase><link linkend="GdkContentDeserializeFunc">*GdkContentDeserializeFunc</link><phrase role="c_punctuation">)</phrase>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-mime-type">gdk_content_deserializer_get_mime_type</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GType"><returnvalue>GType</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-gtype">gdk_content_deserializer_get_gtype</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-value">gdk_content_deserializer_get_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GInputStream"><returnvalue>GInputStream</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-input-stream">gdk_content_deserializer_get_input_stream</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-priority">gdk_content_deserializer_get_priority</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GCancellable"><returnvalue>GCancellable</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-cancellable">gdk_content_deserializer_get_cancellable</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-user-data">gdk_content_deserializer_get_user_data</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-set-task-data">gdk_content_deserializer_set_task_data</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-get-task-data">gdk_content_deserializer_get_task_data</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-return-success">gdk_content_deserializer_return_success</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserializer-return-error">gdk_content_deserializer_return_error</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-register-deserializer">gdk_content_register_deserializer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserialize-async">gdk_content_deserialize_async</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gdk-content-deserialize-finish">gdk_content_deserialize_finish</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkContentDeserializer.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GdkContentDeserializer-struct">GdkContentDeserializer</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkContentDeserializer.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GdkContentDeserializer
</screen>
</refsect1>
<refsect1 id="GdkContentDeserializer.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GdkContentDeserializer implements
 <link linkend="GAsyncResult">GAsyncResult</link>.</para>

</refsect1>

<refsect1 id="GdkContentDeserializer.includes"><title>Includes</title><synopsis>#include &lt;gdk/gdk.h&gt;
</synopsis></refsect1>

<refsect1 id="GdkContentDeserializer.description" role="desc">
<title role="desc.title">Description</title>
<para>A GdkContentDeserializer is used to deserialize content received via
inter-application data transfers.</para>

</refsect1>
<refsect1 id="GdkContentDeserializer.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GdkContentDeserializeFunc" role="function">
<title>GdkContentDeserializeFunc&#160;()</title>
<indexterm zone="GdkContentDeserializeFunc"><primary>GdkContentDeserializeFunc</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GdkContentDeserializeFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>The type of a function that can be registered with <link linkend="gdk-content-register-deserializer"><function>gdk_content_register_deserializer()</function></link>.
When the function gets called to operate on content, it can call functions on the
<parameter>deserializer</parameter>
 object to obtain the mime type, input stream, user data, etc. for its
operation.</para>
<refsect3 id="GdkContentDeserializeFunc.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-mime-type" role="function">
<title>gdk_content_deserializer_get_mime_type&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-mime-type"><primary>gdk_content_deserializer_get_mime_type</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_content_deserializer_get_mime_type
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the mime type to deserialize from.</para>
<refsect3 id="gdk-content-deserializer-get-mime-type.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-mime-type.returns" role="returns">
<title>Returns</title>
<para>the mime type for the current operation. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-gtype" role="function">
<title>gdk_content_deserializer_get_gtype&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-gtype"><primary>gdk_content_deserializer_get_gtype</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
gdk_content_deserializer_get_gtype (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the GType to create an instance of.</para>
<refsect3 id="gdk-content-deserializer-get-gtype.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-gtype.returns" role="returns">
<title>Returns</title>
<para> the GType for the current operation</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-value" role="function">
<title>gdk_content_deserializer_get_value&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-value"><primary>gdk_content_deserializer_get_value</primary></indexterm>
<programlisting language="C"><link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
gdk_content_deserializer_get_value (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the <link linkend="GValue"><type>GValue</type></link> to store the deserialized object in.</para>
<refsect3 id="gdk-content-deserializer-get-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-value.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GValue"><type>GValue</type></link> for the current operation. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-input-stream" role="function">
<title>gdk_content_deserializer_get_input_stream&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-input-stream"><primary>gdk_content_deserializer_get_input_stream</primary></indexterm>
<programlisting language="C"><link linkend="GInputStream"><returnvalue>GInputStream</returnvalue></link>&#160;*
gdk_content_deserializer_get_input_stream
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the input stream that was passed to <link linkend="gdk-content-deserialize-async"><function>gdk_content_deserialize_async()</function></link>.</para>
<refsect3 id="gdk-content-deserializer-get-input-stream.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-input-stream.returns" role="returns">
<title>Returns</title>
<para>the input stream for the current operation. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-priority" role="function">
<title>gdk_content_deserializer_get_priority&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-priority"><primary>gdk_content_deserializer_get_priority</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gdk_content_deserializer_get_priority (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the io priority that was passed to <link linkend="gdk-content-deserialize-async"><function>gdk_content_deserialize_async()</function></link>.</para>
<refsect3 id="gdk-content-deserializer-get-priority.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-priority.returns" role="returns">
<title>Returns</title>
<para> the io priority for the current operation</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-cancellable" role="function">
<title>gdk_content_deserializer_get_cancellable&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-cancellable"><primary>gdk_content_deserializer_get_cancellable</primary></indexterm>
<programlisting language="C"><link linkend="GCancellable"><returnvalue>GCancellable</returnvalue></link>&#160;*
gdk_content_deserializer_get_cancellable
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the cancellable that was passed to <link linkend="gdk-content-deserialize-async"><function>gdk_content_deserialize_async()</function></link>.</para>
<refsect3 id="gdk-content-deserializer-get-cancellable.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-cancellable.returns" role="returns">
<title>Returns</title>
<para>the cancellable for the current operation. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-user-data" role="function">
<title>gdk_content_deserializer_get_user_data&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-user-data"><primary>gdk_content_deserializer_get_user_data</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gdk_content_deserializer_get_user_data
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the user data that was passed when the deserializer was registered.</para>
<refsect3 id="gdk-content-deserializer-get-user-data.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-user-data.returns" role="returns">
<title>Returns</title>
<para>the user data for this deserializer. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-set-task-data" role="function">
<title>gdk_content_deserializer_set_task_data&#160;()</title>
<indexterm zone="gdk-content-deserializer-set-task-data"><primary>gdk_content_deserializer_set_task_data</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_deserializer_set_task_data
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>,
                                <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>,
                                <parameter><link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> notify</parameter>);</programlisting>
<para>Associate data with the current deserialization operation.</para>
<refsect3 id="gdk-content-deserializer-set-task-data.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>data to associate with this operation</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>notify</para></entry>
<entry role="parameter_description"><para>destroy notify for <parameter>data</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-get-task-data" role="function">
<title>gdk_content_deserializer_get_task_data&#160;()</title>
<indexterm zone="gdk-content-deserializer-get-task-data"><primary>gdk_content_deserializer_get_task_data</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gdk_content_deserializer_get_task_data
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Gets the data that was associated with <parameter>deserializer</parameter>
 via <link linkend="gdk-content-deserializer-set-task-data"><function>gdk_content_deserializer_set_task_data()</function></link>.</para>
<refsect3 id="gdk-content-deserializer-get-task-data.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserializer-get-task-data.returns" role="returns">
<title>Returns</title>
<para>the task data for <parameter>deserializer</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-return-success" role="function">
<title>gdk_content_deserializer_return_success&#160;()</title>
<indexterm zone="gdk-content-deserializer-return-success"><primary>gdk_content_deserializer_return_success</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_deserializer_return_success
                               (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>);</programlisting>
<para>Indicate that the deserialization has been successfully completed.</para>
<refsect3 id="gdk-content-deserializer-return-success.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserializer-return-error" role="function">
<title>gdk_content_deserializer_return_error&#160;()</title>
<indexterm zone="gdk-content-deserializer-return-error"><primary>gdk_content_deserializer_return_error</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_deserializer_return_error (<parameter><link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link> *deserializer</parameter>,
                                       <parameter><link linkend="GError"><type>GError</type></link> *error</parameter>);</programlisting>
<para>Indicate that the deserialization has ended with an error.
This function consumes <parameter>error</parameter>
.</para>
<refsect3 id="gdk-content-deserializer-return-error.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>deserializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentDeserializer"><type>GdkContentDeserializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>a <link linkend="GError"><type>GError</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-register-deserializer" role="function">
<title>gdk_content_register_deserializer&#160;()</title>
<indexterm zone="gdk-content-register-deserializer"><primary>gdk_content_register_deserializer</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_register_deserializer (<parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>,
                                   <parameter><link linkend="GType"><type>GType</type></link> type</parameter>,
                                   <parameter><link linkend="GdkContentDeserializeFunc"><type>GdkContentDeserializeFunc</type></link> deserialize</parameter>,
                                   <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>,
                                   <parameter><link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> notify</parameter>);</programlisting>
<para>Registers a function to create objects of a given <parameter>type</parameter>
 from
a serialized representation with the given mime type.</para>
<refsect3 id="gdk-content-register-deserializer.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>mime_type</para></entry>
<entry role="parameter_description"><para>the mime type which the function can deserialize from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>the type of objects that the function creates</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>deserialize</para></entry>
<entry role="parameter_description"><para>the callback</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>data that <parameter>deserialize</parameter>
can access</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>notify</para></entry>
<entry role="parameter_description"><para>destroy notify for <parameter>data</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserialize-async" role="function">
<title>gdk_content_deserialize_async&#160;()</title>
<indexterm zone="gdk-content-deserialize-async"><primary>gdk_content_deserialize_async</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_deserialize_async (<parameter><link linkend="GInputStream"><type>GInputStream</type></link> *stream</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>,
                               <parameter><link linkend="GType"><type>GType</type></link> type</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> io_priority</parameter>,
                               <parameter><link linkend="GCancellable"><type>GCancellable</type></link> *cancellable</parameter>,
                               <parameter><link linkend="GAsyncReadyCallback"><type>GAsyncReadyCallback</type></link> callback</parameter>,
                               <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting>
<para>Read content from the given input stream and deserialize it, asynchronously.
When the operation is finished, <parameter>callback</parameter>
 will be called. You can then
call <link linkend="gdk-content-deserialize-finish"><function>gdk_content_deserialize_finish()</function></link> to get the result of the operation.</para>
<refsect3 id="gdk-content-deserialize-async.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>stream</para></entry>
<entry role="parameter_description"><para>a <link linkend="GInputStream"><type>GInputStream</type></link> to read the serialized content from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>mime_type</para></entry>
<entry role="parameter_description"><para>the mime type to deserialize from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>type</para></entry>
<entry role="parameter_description"><para>the GType to deserialize from</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>io_priority</para></entry>
<entry role="parameter_description"><para>the io priority of the operation</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>cancellable</para></entry>
<entry role="parameter_description"><para>optional <link linkend="GCancellable"><type>GCancellable</type></link> object. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>callback</para></entry>
<entry role="parameter_description"><para>callback to call when the operation is done. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>scope async</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>user_data</para></entry>
<entry role="parameter_description"><para>data to pass to the callback function. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>closure</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-deserialize-finish" role="function">
<title>gdk_content_deserialize_finish&#160;()</title>
<indexterm zone="gdk-content-deserialize-finish"><primary>gdk_content_deserialize_finish</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_content_deserialize_finish (<parameter><link linkend="GAsyncResult"><type>GAsyncResult</type></link> *result</parameter>,
                                <parameter><link linkend="GValue"><type>GValue</type></link> *value</parameter>,
                                <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Finishes a content deserialization operation.</para>
<refsect3 id="gdk-content-deserialize-finish.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>result</para></entry>
<entry role="parameter_description"><para>the <link linkend="GAsyncResult"><type>GAsyncResult</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>return location for the result of the operation</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>error</para></entry>
<entry role="parameter_description"><para>return location for an error</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-deserialize-finish.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the operation was successful. In this case, <parameter>value</parameter>
is set.
<link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if an error occurred. In this case, <parameter>error</parameter>
is set</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GdkContentDeserializer.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkContentDeserializer-struct" role="struct">
<title>GdkContentDeserializer</title>
<indexterm zone="GdkContentDeserializer-struct"><primary>GdkContentDeserializer</primary></indexterm>
<programlisting language="C">typedef struct _GdkContentDeserializer GdkContentDeserializer;</programlisting>
<para>Should not be accessed directly.</para>
</refsect2>

</refsect1>
<refsect1 id="GdkContentDeserializer.see-also">
<title>See Also</title>
<para><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para>

</refsect1>

</refentry>
