<refentry id="GdaExport">
<refmeta>
<refentrytitle>GdaExport</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGDA-CLIENT Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GdaExport</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>



struct      <link linkend="GdaExportPrivate">GdaExportPrivate</link>;
enum        <link linkend="GdaExportFlags">GdaExportFlags</link>;
<link linkend="GdaExport">GdaExport</link>*  <link linkend="gda-export-new">gda_export_new</link>                  (<link linkend="GdaConnection">GdaConnection</link> *cnc);
void        <link linkend="gda-export-free">gda_export_free</link>                 (<link linkend="GdaExport">GdaExport</link> *exp);
<link linkend="GList">GList</link>*      <link linkend="gda-export-get-tables">gda_export_get_tables</link>           (<link linkend="GdaExport">GdaExport</link> *exp);
<link linkend="GList">GList</link>*      <link linkend="gda-export-get-selected-tables">gda_export_get_selected_tables</link>  (<link linkend="GdaExport">GdaExport</link> *exp);
void        <link linkend="gda-export-select-table">gda_export_select_table</link>         (<link linkend="GdaExport">GdaExport</link> *exp,
                                             const <link linkend="gchar">gchar</link> *table);
void        <link linkend="gda-export-select-table-list">gda_export_select_table_list</link>    (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GList">GList</link> *tables);
void        <link linkend="gda-export-unselect-table">gda_export_unselect_table</link>       (<link linkend="GdaExport">GdaExport</link> *exp,
                                             const <link linkend="gchar">gchar</link> *table);
void        <link linkend="gda-export-run">gda_export_run</link>                  (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GdaExportFlags">GdaExportFlags</link> flags);
void        <link linkend="gda-export-stop">gda_export_stop</link>                 (<link linkend="GdaExport">GdaExport</link> *exp);
<link linkend="GdaConnection">GdaConnection</link>* <link linkend="gda-export-get-connection">gda_export_get_connection</link>    (<link linkend="GdaExport">GdaExport</link> *exp);
void        <link linkend="gda-export-set-connection">gda_export_set_connection</link>       (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GdaConnection">GdaConnection</link> *cnc);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GtkObject">GtkObject</link>
   +----GdaExport
</synopsis>

</refsect1>


<refsect1>
<title>Signal Prototypes</title>
<synopsis>

&quot;<link linkend="GdaExport-object-selected">object-selected</link>&quot;
            void        user_function      (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gint">gint</link> arg1,
                                            <link linkend="gchar">gchar</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GdaExport-object-unselected">object-unselected</link>&quot;
            void        user_function      (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gint">gint</link> arg1,
                                            <link linkend="gchar">gchar</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);
&quot;<link linkend="GdaExport-finished">finished</link>&quot;  void        user_function      (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gpointer">gpointer</link> arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);
</synopsis>
</refsect1>


<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GdaExportPrivate">struct GdaExportPrivate</title>
<programlisting>struct GdaExportPrivate;</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GdaExportFlags">enum GdaExportFlags</title>
<programlisting>typedef enum {
	GDA_EXPORT_FLAGS_TABLE_DATA = 1
} GdaExportFlags;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gda-export-new">gda_export_new ()</title>
<programlisting><link linkend="GdaExport">GdaExport</link>*  gda_export_new                  (<link linkend="GdaConnection">GdaConnection</link> *cnc);</programlisting>
<para>
Create a new <link linkend="GdaExport">GdaExport</link> object, which allows you to easily add
exporting functionality to your programs.
</para>
<para>
It works by first having a <link linkend="GdaConnection">GdaConnection</link> object associated
to it, and then allowing you to retrieve information about all
the objects present in the database, and also to add/remove
those objects from a list of selected objects.
</para>
<para>
When you're done, you just run the export (<link linkend="gda-export-run">gda_export_run</link>), first
connecting to the different signals that will let you be
informed of the export process progress</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>cnc</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaConnection">GdaConnection</link> object
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a newly allocated <link linkend="GdaExport">GdaExport</link> object
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-free">gda_export_free ()</title>
<programlisting>void        gda_export_free                 (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-get-tables">gda_export_get_tables ()</title>
<programlisting><link linkend="GList">GList</link>*      gda_export_get_tables           (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Return a list of all tables that exist in the <link linkend="GdaConnection">GdaConnection</link>
being used. This function is useful when you're building,
for example, a list for the user to select which tables he/she
wants in the export process.
</para>
<para>
You are responsible to free the returned value yourself.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a GList containing the names of all the tables
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-get-selected-tables">gda_export_get_selected_tables ()</title>
<programlisting><link linkend="GList">GList</link>*      gda_export_get_selected_tables  (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Return a list with the names of all the currently selected objects
in the given <link linkend="GdaExport">GdaExport</link> object.
</para>
<para>
You are responsible to free the returned value yourself.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a <link linkend="GList">GList</link> containing the names of the selected tables
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-select-table">gda_export_select_table ()</title>
<programlisting>void        gda_export_select_table         (<link linkend="GdaExport">GdaExport</link> *exp,
                                             const <link linkend="gchar">gchar</link> *table);</programlisting>
<para>
Add the given table to the list of selected tables</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>table</parameter>&nbsp;:</entry>
<entry> name of the table
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-select-table-list">gda_export_select_table_list ()</title>
<programlisting>void        gda_export_select_table_list    (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GList">GList</link> *tables);</programlisting>
<para>
Adds all the tables contained in the given list to the list of
selected tables</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaExport">GdaExport</link> object
</entry></row>
<row><entry align="right"><parameter>tables</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-unselect-table">gda_export_unselect_table ()</title>
<programlisting>void        gda_export_unselect_table       (<link linkend="GdaExport">GdaExport</link> *exp,
                                             const <link linkend="gchar">gchar</link> *table);</programlisting>
<para>
Remove the given table name from the list of selected tables</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry> a <link linkend="GdaExport">GdaExport</link> object
</entry></row>
<row><entry align="right"><parameter>table</parameter>&nbsp;:</entry>
<entry> name of the table
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-run">gda_export_run ()</title>
<programlisting>void        gda_export_run                  (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GdaExportFlags">GdaExportFlags</link> flags);</programlisting>
<para>
Starts the execution of the given export object. This means that, after
calling this function, your application will lose control about the export
process and will only receive notifications via the class signals</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>flags</parameter>&nbsp;:</entry>
<entry> execution flags
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-stop">gda_export_stop ()</title>
<programlisting>void        gda_export_stop                 (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-get-connection">gda_export_get_connection ()</title>
<programlisting><link linkend="GdaConnection">GdaConnection</link>* gda_export_get_connection    (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Return the <link linkend="GdaConnection">GdaConnection</link> object associated with the given
<link linkend="GdaExport">GdaExport</link></para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the <link linkend="GdaConnection">GdaConnection</link> object being used
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gda-export-set-connection">gda_export_set_connection ()</title>
<programlisting>void        gda_export_set_connection       (<link linkend="GdaExport">GdaExport</link> *exp,
                                             <link linkend="GdaConnection">GdaConnection</link> *cnc);</programlisting>
<para>
</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>exp</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>cnc</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>

<refsect1>
<title>Signals</title>
<refsect2><title><anchor id="GdaExport-object-selected">The &quot;object-selected&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gint">gint</link> arg1,
                                            <link linkend="gchar">gchar</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gdaexport</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg2</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GdaExport-object-unselected">The &quot;object-unselected&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gint">gint</link> arg1,
                                            <link linkend="gchar">gchar</link> *arg2,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gdaexport</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>arg2</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GdaExport-finished">The &quot;finished&quot; signal</title>
<programlisting>void        user_function                  (<link linkend="GdaExport">GdaExport</link> *gdaexport,
                                            <link linkend="gpointer">gpointer</link> arg1,
                                            <link linkend="gpointer">gpointer</link> user_data);</programlisting>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>gdaexport</parameter>&nbsp;:</entry>
<entry>the object which received the signal.
</entry></row>
<row><entry align="right"><parameter>arg1</parameter>&nbsp;:</entry>
<entry>

</entry></row>
<row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry>
<entry>user data set when the signal handler was connected.</entry></row>
</tbody></tgroup></informaltable></refsect2>
</refsect1>



</refentry>
