<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="epiphany-EphyEmbedPersist">
<refmeta>
<refentrytitle role="top_of_page" id="epiphany-EphyEmbedPersist.top_of_page">EphyEmbedPersist</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>EPIPHANY Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>EphyEmbedPersist</refname>
<refpurpose>A class to download files</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="epiphany-EphyEmbedPersist.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-dest">ephy_embed_persist_set_dest</link>         (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-embed">ephy_embed_persist_set_embed</link>        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="EphyEmbed">EphyEmbed</link> *value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-fc-title">ephy_embed_persist_set_fc_title</link>     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-fc-parent">ephy_embed_persist_set_fc_parent</link>    (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="GtkWindow">GtkWindow</link> *value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-flags">ephy_embed_persist_set_flags</link>        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="EphyEmbedPersistFlags">EphyEmbedPersistFlags</link> value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-max-size">ephy_embed_persist_set_max_size</link>     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="gint64">gint64</link> value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-persist-key">ephy_embed_persist_set_persist_key</link>  (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-set-source">ephy_embed_persist_set_source</link>       (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);
const <link linkend="char">char</link>*         <link linkend="ephy-embed-persist-get-dest">ephy_embed_persist_get_dest</link>         (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="EphyEmbed">EphyEmbed</link>*          <link linkend="ephy-embed-persist-get-embed">ephy_embed_persist_get_embed</link>        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
const <link linkend="char">char</link>*         <link linkend="ephy-embed-persist-get-fc-title">ephy_embed_persist_get_fc_title</link>     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="GtkWindow">GtkWindow</link>*          <link linkend="ephy-embed-persist-get-fc-parent">ephy_embed_persist_get_fc_parent</link>    (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="EphyEmbedPersistFlags">EphyEmbedPersistFlags</link> <link linkend="ephy-embed-persist-get-flags">ephy_embed_persist_get_flags</link>      (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="gint64">gint64</link>              <link linkend="ephy-embed-persist-get-max-size">ephy_embed_persist_get_max_size</link>     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
const <link linkend="char">char</link>*         <link linkend="ephy-embed-persist-get-persist-key">ephy_embed_persist_get_persist_key</link>  (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
const <link linkend="char">char</link>*         <link linkend="ephy-embed-persist-get-source">ephy_embed_persist_get_source</link>       (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="gboolean">gboolean</link>            <link linkend="ephy-embed-persist-save">ephy_embed_persist_save</link>             (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="void">void</link>                <link linkend="ephy-embed-persist-cancel">ephy_embed_persist_cancel</link>           (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
<link linkend="char">char</link>*               <link linkend="ephy-embed-persist-to-string">ephy_embed_persist_to_string</link>        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);
</synopsis>
</refsynopsisdiv>









<refsect1 id="epiphany-EphyEmbedPersist.description" role="desc">
<title role="desc.title">Description</title>
<para>
An <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link> is a relatively simple way to save a web page or file to
disk. It is an abstract class, implemented by <link linkend="MozillaEmbedPersist"><type>MozillaEmbedPersist</type></link>.
</para>
<para>
To create an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>, use <link linkend="ephy-embed-factory-new-object"><function>ephy_embed_factory_new_object()</function></link>. Next, call
<link linkend="ephy-embed-persist-set-flags"><function>ephy_embed_persist_set_flags()</function></link> and <link linkend="ephy-embed-persist-set-embed"><function>ephy_embed_persist_set_embed()</function></link>. Depending
on the flags, you may also want to call <link linkend="ephy-embed-persist-set-dest"><function>ephy_embed_persist_set_dest()</function></link> or
<link linkend="ephy-embed-persist-set-source"><function>ephy_embed_persist_set_source()</function></link>. Finally, call <link linkend="ephy-embed-persist-save"><function>ephy_embed_persist_save()</function></link> to
save the file.
</para>
<para>
<example>
<title>Saving the current web page to disk</title>
<programlisting>#<![CDATA[include <epiphany/ephy-embed-persist.h>]]>
#<![CDATA[include <epiphany/ephy-embed.h>

static void
save_source_completed_cb (EphyEmbedPersist *persist,
			  gpointer dummy)
{
	g_print ("Download to %]]><![CDATA[s complete.\n",
		 ephy_embed_persist_get_dest (persist));
}

void
save_page (EphyEmbed *embed,
	   const char *filename)
{
	EphyEmbedPersist *persist;

	persist = EPHY_EMBED_PERSIST
		(ephy_embed_factory_new_object ("EphyEmbedPersist"));

	ephy_embed_persist_set_embed (persist, embed);
	ephy_embed_persist_set_flags (persist, EMBED_PERSIST_NO_VIEW |
					       EMBED_PERSIST_COPY_PAGE);
	ephy_embed_persist_set_dest (persist, filename);

	g_signal_connect (persist, "completed",
			  G_CALLBACK (save_source_completed_cb), NULL);
	
	ephy_embed_persist_save (persist);

	g_object_unref (persist);
}]]>
</programlisting>
</example>
</para>
</refsect1>

<refsect1 id="epiphany-EphyEmbedPersist.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="ephy-embed-persist-set-dest" role="function">
<title>ephy_embed_persist_set_dest ()</title>
<indexterm zone="ephy-embed-persist-set-dest"><primary>ephy_embed_persist_set_dest</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_dest         (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);</programlisting>
<para>
Sets the path to which <parameter>persist</parameter> should save data.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> the path to which <parameter>persist</parameter> should save data
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-embed" role="function">
<title>ephy_embed_persist_set_embed ()</title>
<indexterm zone="ephy-embed-persist-set-embed"><primary>ephy_embed_persist_set_embed</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_embed        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="EphyEmbed">EphyEmbed</link> *value);</programlisting>
<para>
Sets the <link linkend="EphyEmbed"><type>EphyEmbed</type></link> from which <parameter>persist</parameter> will download data.
</para>
<para>
An <link linkend="EphyEmbed"><type>EphyEmbed</type></link> is absolutely required to download if <parameter>persist</parameter>'s
<link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link> include <link linkend="EPHY-EMBED-PERSIST-COPY-PAGE:CAPS"><literal>EPHY_EMBED_PERSIST_COPY_PAGE</literal></link>. Regardless, an
<link linkend="EphyEmbed"><type>EphyEmbed</type></link> should be set for <emphasis>every</emphasis> <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>,
since it determines request information such as the referring page.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> a parent <link linkend="EphyEmbed"><type>EphyEmbed</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-fc-title" role="function">
<title>ephy_embed_persist_set_fc_title ()</title>
<indexterm zone="ephy-embed-persist-set-fc-title"><primary>ephy_embed_persist_set_fc_title</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_fc_title     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);</programlisting>
<para>
Sets the title of the filechooser window. The filechooser will only be
displayed if <link linkend="EPHY-EMBED-PERSIST-ASK-DESTINATION:CAPS"><literal>EPHY_EMBED_PERSIST_ASK_DESTINATION</literal></link> has been set with
<link linkend="ephy-embed-persist-set-flags"><function>ephy_embed_persist_set_flags()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> the title to be displayed by the filechooser
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-fc-parent" role="function">
<title>ephy_embed_persist_set_fc_parent ()</title>
<indexterm zone="ephy-embed-persist-set-fc-parent"><primary>ephy_embed_persist_set_fc_parent</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_fc_parent    (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="GtkWindow">GtkWindow</link> *value);</programlisting>
<para>
Sets the <link linkend="EphyWindow"><type>EphyWindow</type></link> which should be <parameter>persist</parameter>'s filechooser's parent. The
filechooser will only be displayed if <link linkend="EPHY-EMBED-PERSIST-ASK-DESTINATION:CAPS"><literal>EPHY_EMBED_PERSIST_ASK_DESTINATION</literal></link> has been
set with <link linkend="ephy-embed-persist-set-flags"><function>ephy_embed_persist_set_flags()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="EphyWindow"><type>EphyWindow</type></link> which should be the filechooser's parent
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-flags" role="function">
<title>ephy_embed_persist_set_flags ()</title>
<indexterm zone="ephy-embed-persist-set-flags"><primary>ephy_embed_persist_set_flags</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_flags        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="EphyEmbedPersistFlags">EphyEmbedPersistFlags</link> value);</programlisting>
<para>
Sets the flags to be used for <parameter>persist</parameter>'s download.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> the desired <link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-max-size" role="function">
<title>ephy_embed_persist_set_max_size ()</title>
<indexterm zone="ephy-embed-persist-set-max-size"><primary>ephy_embed_persist_set_max_size</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_max_size     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         <link linkend="gint64">gint64</link> value);</programlisting>
<para>
Sets the maximum size of <parameter>persist</parameter>'s download.
</para>
<para>
If the requested file is discovered to be larger than <parameter>value</parameter>, the download
will be aborted. Note that <parameter>persist</parameter> will have to actually begin downloading
before it can abort, since it doesn't know the filesize before the download
starts.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> maximum size of requested download, in bytes
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-persist-key" role="function">
<title>ephy_embed_persist_set_persist_key ()</title>
<indexterm zone="ephy-embed-persist-set-persist-key"><primary>ephy_embed_persist_set_persist_key</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_persist_key  (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);</programlisting>
<para>
Sets the GConf key from which <parameter>persist</parameter> will determine the default download
directory.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> a GConf key
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-set-source" role="function">
<title>ephy_embed_persist_set_source ()</title>
<indexterm zone="ephy-embed-persist-set-source"><primary>ephy_embed_persist_set_source</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_set_source       (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist,
                                                         const <link linkend="char">char</link> *value);</programlisting>
<para>
Sets the URL from which <parameter>persist</parameter> should download. This should be used in
conjunction with <link linkend="ephy-embed-persist-set-embed"><function>ephy_embed_persist_set_embed()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&nbsp;:</term>
<listitem><simpara> the URL from which <parameter>persist</parameter> should download
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-dest" role="function">
<title>ephy_embed_persist_get_dest ()</title>
<indexterm zone="ephy-embed-persist-get-dest"><primary>ephy_embed_persist_get_dest</primary></indexterm><programlisting>const <link linkend="char">char</link>*         ephy_embed_persist_get_dest         (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the destination filename to which <parameter>persist</parameter> will save its download.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>persist</parameter>'s destination filename
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-embed" role="function">
<title>ephy_embed_persist_get_embed ()</title>
<indexterm zone="ephy-embed-persist-get-embed"><primary>ephy_embed_persist_get_embed</primary></indexterm><programlisting><link linkend="EphyEmbed">EphyEmbed</link>*          ephy_embed_persist_get_embed        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the <link linkend="EphyEmbed"><type>EphyEmbed</type></link> from which <parameter>persist</parameter> will download.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="EphyEmbed"><type>EphyEmbed</type></link> from which <parameter>persist</parameter> will download
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-fc-title" role="function">
<title>ephy_embed_persist_get_fc_title ()</title>
<indexterm zone="ephy-embed-persist-get-fc-title"><primary>ephy_embed_persist_get_fc_title</primary></indexterm><programlisting>const <link linkend="char">char</link>*         ephy_embed_persist_get_fc_title     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the title to be displayed in <parameter>persist</parameter>'s filechooser.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the title to be displayed in <parameter>persist</parameter>'s filechooser
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-fc-parent" role="function">
<title>ephy_embed_persist_get_fc_parent ()</title>
<indexterm zone="ephy-embed-persist-get-fc-parent"><primary>ephy_embed_persist_get_fc_parent</primary></indexterm><programlisting><link linkend="GtkWindow">GtkWindow</link>*          ephy_embed_persist_get_fc_parent    (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the <link linkend="EphyWindow"><type>EphyWindow</type></link> which should serve as a parent for <parameter>persist</parameter>'s
filechooser.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="EphyWindow"><type>EphyWindow</type></link> parent for <parameter>persist</parameter>'s filechooser
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-flags" role="function">
<title>ephy_embed_persist_get_flags ()</title>
<indexterm zone="ephy-embed-persist-get-flags"><primary>ephy_embed_persist_get_flags</primary></indexterm><programlisting><link linkend="EphyEmbedPersistFlags">EphyEmbedPersistFlags</link> ephy_embed_persist_get_flags      (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns <parameter>persist</parameter>'s <link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>persist</parameter>'s <link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-max-size" role="function">
<title>ephy_embed_persist_get_max_size ()</title>
<indexterm zone="ephy-embed-persist-get-max-size"><primary>ephy_embed_persist_get_max_size</primary></indexterm><programlisting><link linkend="gint64">gint64</link>              ephy_embed_persist_get_max_size     (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the maximum size of <parameter>persist</parameter>'s requested download, in bytes.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the maximum size of <parameter>persist</parameter>'s requested download, in bytes
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-persist-key" role="function">
<title>ephy_embed_persist_get_persist_key ()</title>
<indexterm zone="ephy-embed-persist-get-persist-key"><primary>ephy_embed_persist_get_persist_key</primary></indexterm><programlisting>const <link linkend="char">char</link>*         ephy_embed_persist_get_persist_key  (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the GConf key which determines Epiphany's default download directory.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the GConf key to the default download directory
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-get-source" role="function">
<title>ephy_embed_persist_get_source ()</title>
<indexterm zone="ephy-embed-persist-get-source"><primary>ephy_embed_persist_get_source</primary></indexterm><programlisting>const <link linkend="char">char</link>*         ephy_embed_persist_get_source       (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the source URL of the file to download.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a source URL
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-save" role="function">
<title>ephy_embed_persist_save ()</title>
<indexterm zone="ephy-embed-persist-save"><primary>ephy_embed_persist_save</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            ephy_embed_persist_save             (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Begins saving the file specified in <parameter>persist</parameter>.
</para>
<para>
If <parameter>persist</parameter>'s <link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link> include <link linkend="EPHY-EMBED-PERSIST-ASK-DESTINATION:CAPS"><literal>EPHY_EMBED_PERSIST_ASK_DESTINATION</literal></link>, a
filechooser dialog will be shown first.
</para>
<para>
The file will continue to download in the background until either the
::completed or the ::cancelled signals are emitted by <parameter>persist</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the download began successfully
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-cancel" role="function">
<title>ephy_embed_persist_cancel ()</title>
<indexterm zone="ephy-embed-persist-cancel"><primary>ephy_embed_persist_cancel</primary></indexterm><programlisting><link linkend="void">void</link>                ephy_embed_persist_cancel           (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Cancels <parameter>persist</parameter>'s download. This will not delete the partially downloaded
file.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="ephy-embed-persist-to-string" role="function">
<title>ephy_embed_persist_to_string ()</title>
<indexterm zone="ephy-embed-persist-to-string"><primary>ephy_embed_persist_to_string</primary></indexterm><programlisting><link linkend="char">char</link>*               ephy_embed_persist_to_string        (<link linkend="EphyEmbedPersist">EphyEmbedPersist</link> *persist);</programlisting>
<para>
Returns the download specified by <parameter>persist</parameter> as a string instead of downloading
it to a file.
</para>
<para>
The download is synchronous. An <link linkend="EphyEmbed"><type>EphyEmbed</type></link> must be specified with
<link linkend="ephy-embed-persist-set-embed"><function>ephy_embed_persist_set_embed()</function></link>. The function implicitly assumes that
<parameter>persist</parameter>'s <link linkend="EphyEmbedPersistFlags"><type>EphyEmbedPersistFlags</type></link> include <link linkend="EPHY-EMBED-PERSIST-COPY-PAGE:CAPS"><literal>EPHY_EMBED_PERSIST_COPY_PAGE</literal></link>. If <parameter>persist</parameter>'s
<link linkend="EphyEmbed"><type>EphyEmbed</type></link> has not finished downloading, this function will only return the
portion of data which has already been downloaded.
</para>
<para>
The document will be modified: it will only include absolute links and it
will be encoded as UTF-8.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>persist</parameter>&nbsp;:</term>
<listitem><simpara> an <link linkend="EphyEmbedPersist"><type>EphyEmbedPersist</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The contents of <parameter>persist</parameter>'s <link linkend="EphyEmbed"><type>EphyEmbed</type></link>'s web page
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
