<?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="GdkContentSerializer">
<refmeta>
<refentrytitle role="top_of_page" id="GdkContentSerializer.top_of_page">GdkContentSerializer</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GDK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdkContentSerializer</refname>
<refpurpose>Serialize content for transfer</refpurpose>
</refnamediv>

<refsect1 id="GdkContentSerializer.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="GdkContentSerializeFunc">*GdkContentSerializeFunc</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-serializer-get-mime-type">gdk_content_serializer_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-serializer-get-gtype">gdk_content_serializer_get_gtype</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-serializer-get-value">gdk_content_serializer_get_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GOutputStream"><returnvalue>GOutputStream</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gdk-content-serializer-get-output-stream">gdk_content_serializer_get_output_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-serializer-get-priority">gdk_content_serializer_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-serializer-get-cancellable">gdk_content_serializer_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-serializer-get-user-data">gdk_content_serializer_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-serializer-set-task-data">gdk_content_serializer_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-serializer-get-task-data">gdk_content_serializer_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-serializer-return-success">gdk_content_serializer_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-serializer-return-error">gdk_content_serializer_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-serializer">gdk_content_register_serializer</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-serialize-async">gdk_content_serialize_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-serialize-finish">gdk_content_serialize_finish</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkContentSerializer.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="GdkContentSerializer-struct">GdkContentSerializer</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GdkContentSerializer.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> GdkContentSerializer
</screen>
</refsect1>
<refsect1 id="GdkContentSerializer.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GdkContentSerializer implements
 <link linkend="GAsyncResult">GAsyncResult</link>.</para>

</refsect1>

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

<refsect1 id="GdkContentSerializer.description" role="desc">
<title role="desc.title">Description</title>
<para>A GdkContentSerializer is used to serialize content for inter-application
data transfers.</para>

</refsect1>
<refsect1 id="GdkContentSerializer.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="GdkContentSerializeFunc" role="function">
<title>GdkContentSerializeFunc&#160;()</title>
<indexterm zone="GdkContentSerializeFunc"><primary>GdkContentSerializeFunc</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
<phrase role="c_punctuation">(</phrase>*GdkContentSerializeFunc<phrase role="c_punctuation">)</phrase> (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>The type of a function that can be registered with <link linkend="gdk-content-register-serializer"><function>gdk_content_register_serializer()</function></link>.
When the function gets called to operate on content, it can call functions on the
<parameter>serializer</parameter>
 object to obtain the mime type, output stream, user data, etc. for its
operation.</para>
<refsect3 id="GdkContentSerializeFunc.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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-get-mime-type" role="function">
<title>gdk_content_serializer_get_mime_type&#160;()</title>
<indexterm zone="gdk-content-serializer-get-mime-type"><primary>gdk_content_serializer_get_mime_type</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gdk_content_serializer_get_mime_type (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the mime type to serialize to.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-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-serializer-get-gtype" role="function">
<title>gdk_content_serializer_get_gtype&#160;()</title>
<indexterm zone="gdk-content-serializer-get-gtype"><primary>gdk_content_serializer_get_gtype</primary></indexterm>
<programlisting language="C"><link linkend="GType"><returnvalue>GType</returnvalue></link>
gdk_content_serializer_get_gtype (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the GType to of the object to serialize.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-get-gtype.returns" role="returns">
<title>Returns</title>
<para> the GType for the current operation</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-get-value" role="function">
<title>gdk_content_serializer_get_value&#160;()</title>
<indexterm zone="gdk-content-serializer-get-value"><primary>gdk_content_serializer_get_value</primary></indexterm>
<programlisting language="C">const <link linkend="GValue"><returnvalue>GValue</returnvalue></link>&#160;*
gdk_content_serializer_get_value (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the <link linkend="GValue"><type>GValue</type></link> to read the object to serialize from.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-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-serializer-get-output-stream" role="function">
<title>gdk_content_serializer_get_output_stream&#160;()</title>
<indexterm zone="gdk-content-serializer-get-output-stream"><primary>gdk_content_serializer_get_output_stream</primary></indexterm>
<programlisting language="C"><link linkend="GOutputStream"><returnvalue>GOutputStream</returnvalue></link>&#160;*
gdk_content_serializer_get_output_stream
                               (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the output stream that was passed to <link linkend="gdk-content-serialize-async"><function>gdk_content_serialize_async()</function></link>.</para>
<refsect3 id="gdk-content-serializer-get-output-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-get-output-stream.returns" role="returns">
<title>Returns</title>
<para>the output stream for the current operation. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-get-priority" role="function">
<title>gdk_content_serializer_get_priority&#160;()</title>
<indexterm zone="gdk-content-serializer-get-priority"><primary>gdk_content_serializer_get_priority</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
gdk_content_serializer_get_priority (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the io priority that was passed to <link linkend="gdk-content-serialize-async"><function>gdk_content_serialize_async()</function></link>.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-get-priority.returns" role="returns">
<title>Returns</title>
<para> the io priority for the current operation</para>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-get-cancellable" role="function">
<title>gdk_content_serializer_get_cancellable&#160;()</title>
<indexterm zone="gdk-content-serializer-get-cancellable"><primary>gdk_content_serializer_get_cancellable</primary></indexterm>
<programlisting language="C"><link linkend="GCancellable"><returnvalue>GCancellable</returnvalue></link>&#160;*
gdk_content_serializer_get_cancellable
                               (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the cancellable that was passed to <link linkend="gdk-content-serialize-async"><function>gdk_content_serialize_async()</function></link>.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-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-serializer-get-user-data" role="function">
<title>gdk_content_serializer_get_user_data&#160;()</title>
<indexterm zone="gdk-content-serializer-get-user-data"><primary>gdk_content_serializer_get_user_data</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gdk_content_serializer_get_user_data (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the user data that was passed when the serializer was registered.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-get-user-data.returns" role="returns">
<title>Returns</title>
<para>the user data for this serializer. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-set-task-data" role="function">
<title>gdk_content_serializer_set_task_data&#160;()</title>
<indexterm zone="gdk-content-serializer-set-task-data"><primary>gdk_content_serializer_set_task_data</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_serializer_set_task_data (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</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 serialization operation.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</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-serializer-get-task-data" role="function">
<title>gdk_content_serializer_get_task_data&#160;()</title>
<indexterm zone="gdk-content-serializer-get-task-data"><primary>gdk_content_serializer_get_task_data</primary></indexterm>
<programlisting language="C"><link linkend="gpointer"><returnvalue>gpointer</returnvalue></link>
gdk_content_serializer_get_task_data (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Gets the data that was associated with <parameter>serializer</parameter>
 via <link linkend="gdk-content-serializer-set-task-data"><function>gdk_content_serializer_set_task_data()</function></link>.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gdk-content-serializer-get-task-data.returns" role="returns">
<title>Returns</title>
<para>the task data for <parameter>serializer</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-return-success" role="function">
<title>gdk_content_serializer_return_success&#160;()</title>
<indexterm zone="gdk-content-serializer-return-success"><primary>gdk_content_serializer_return_success</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_serializer_return_success (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>);</programlisting>
<para>Indicate that the serialization has been successfully completed.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gdk-content-serializer-return-error" role="function">
<title>gdk_content_serializer_return_error&#160;()</title>
<indexterm zone="gdk-content-serializer-return-error"><primary>gdk_content_serializer_return_error</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_serializer_return_error (<parameter><link linkend="GdkContentSerializer"><type>GdkContentSerializer</type></link> *serializer</parameter>,
                                     <parameter><link linkend="GError"><type>GError</type></link> *error</parameter>);</programlisting>
<para>Indicate that the serialization has ended with an error.
This function consumes <parameter>error</parameter>
.</para>
<refsect3 id="gdk-content-serializer-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>serializer</para></entry>
<entry role="parameter_description"><para>a <link linkend="GdkContentSerializer"><type>GdkContentSerializer</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-serializer" role="function">
<title>gdk_content_register_serializer&#160;()</title>
<indexterm zone="gdk-content-register-serializer"><primary>gdk_content_register_serializer</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_register_serializer (<parameter><link linkend="GType"><type>GType</type></link> type</parameter>,
                                 <parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>,
                                 <parameter><link linkend="GdkContentSerializeFunc"><type>GdkContentSerializeFunc</type></link> serialize</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 convert objects of the given <parameter>type</parameter>
 to
a serialized representation with the given mime type.</para>
<refsect3 id="gdk-content-register-serializer.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>type</para></entry>
<entry role="parameter_description"><para>the type of objects that the function can serialize</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 serialize to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>serialize</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>serialize</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-serialize-async" role="function">
<title>gdk_content_serialize_async&#160;()</title>
<indexterm zone="gdk-content-serialize-async"><primary>gdk_content_serialize_async</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gdk_content_serialize_async (<parameter><link linkend="GOutputStream"><type>GOutputStream</type></link> *stream</parameter>,
                             <parameter>const <link linkend="char"><type>char</type></link> *mime_type</parameter>,
                             <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</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>Serialize content and write it to the given output stream, asynchronously.
When the operation is finished, <parameter>callback</parameter>
 will be called. You can then
call <link linkend="gdk-content-serialize-finish"><function>gdk_content_serialize_finish()</function></link> to get the result of the operation.</para>
<refsect3 id="gdk-content-serialize-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="GOutputStream"><type>GOutputStream</type></link> to write the serialized content to</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 serialize to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the content to serialize</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-serialize-finish" role="function">
<title>gdk_content_serialize_finish&#160;()</title>
<indexterm zone="gdk-content-serialize-finish"><primary>gdk_content_serialize_finish</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gdk_content_serialize_finish (<parameter><link linkend="GAsyncResult"><type>GAsyncResult</type></link> *result</parameter>,
                              <parameter><link linkend="GError"><type>GError</type></link> **error</parameter>);</programlisting>
<para>Finishes a content serialization operation.</para>
<refsect3 id="gdk-content-serialize-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>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-serialize-finish.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the operation was successful, <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="GdkContentSerializer.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GdkContentSerializer-struct" role="struct">
<title>GdkContentSerializer</title>
<indexterm zone="GdkContentSerializer-struct"><primary>GdkContentSerializer</primary></indexterm>
<programlisting language="C">typedef struct _GdkContentSerializer GdkContentSerializer;</programlisting>
<para>Should not be accessed directly.</para>
</refsect2>

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

</refsect1>

</refentry>
