1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
|
<refentry id="libgda-GdaExport">
<refmeta>
<refentrytitle role="top_of_page" id="libgda-GdaExport.top_of_page">GdaExport</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBGDA Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GdaExport</refname>
<refpurpose>Exporting of databases</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsynopsisdiv id="libgda-GdaExport.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>
<synopsis>
<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);
<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);
<link linkend="void">void</link> <link linkend="gda-export-select-table">gda_export_select_table</link> (<link linkend="GdaExport">GdaExport</link> *exp,
const <link linkend="gchar">gchar</link> *table);
<link linkend="void">void</link> <link linkend="gda-export-select-table-list">gda_export_select_table_list</link> (<link linkend="GdaExport">GdaExport</link> *exp,
<link linkend="GList">GList</link> *list);
<link linkend="void">void</link> <link linkend="gda-export-unselect-table">gda_export_unselect_table</link> (<link linkend="GdaExport">GdaExport</link> *exp,
const <link linkend="gchar">gchar</link> *table);
<link linkend="void">void</link> <link linkend="gda-export-run">gda_export_run</link> (<link linkend="GdaExport">GdaExport</link> *exp,
<link linkend="GdaExportFlags">GdaExportFlags</link> flags);
<link linkend="void">void</link> <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);
<link linkend="void">void</link> <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 id="libgda-GdaExport.description" role="desc">
<title role="desc.title">Description</title>
<para>
</para>
</refsect1>
<refsect1 id="libgda-GdaExport.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GdaExportPrivate" role="struct">
<title>GdaExportPrivate</title>
<indexterm zone="GdaExportPrivate"><primary>GdaExportPrivate</primary></indexterm><programlisting>typedef struct _GdaExportPrivate GdaExportPrivate;</programlisting>
<para>
</para></refsect2>
<refsect2 id="GdaExportFlags" role="enum">
<title>enum GdaExportFlags</title>
<indexterm zone="GdaExportFlags"><primary>GdaExportFlags</primary></indexterm><programlisting>typedef enum {
GDA_EXPORT_FLAGS_TABLE_DATA = 1
} GdaExportFlags;
</programlisting>
<para>
</para></refsect2>
<refsect2 id="gda-export-new" role="function">
<title>gda_export_new ()</title>
<indexterm zone="gda-export-new"><primary>gda_export_new</primary></indexterm><programlisting><link linkend="GdaExport">GdaExport</link>* gda_export_new (<link linkend="GdaConnection">GdaConnection</link> *cnc);</programlisting>
<para>
Creates a new <link linkend="GdaExport"><type>GdaExport</type></link> object, which allows you to easily add
exporting functionality to your programs.
</para>
<para>
It works by first having a <link linkend="GdaConnection"><type>GdaConnection</type></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"><type>gda_export_run</type></link>), first
connecting to the different signals that will let you be
informed of the export process progress.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>cnc</parameter> :</term>
<listitem><simpara> a <link linkend="GdaConnection"><type>GdaConnection</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a newly allocated <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-get-tables" role="function">
<title>gda_export_get_tables ()</title>
<indexterm zone="gda-export-get-tables"><primary>gda_export_get_tables</primary></indexterm><programlisting><link linkend="GList">GList</link>* gda_export_get_tables (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Returns a list of all tables that exist in the <link linkend="GdaConnection"><type>GdaConnection</type></link>
being used by the given <link linkend="GdaExport"><type>GdaExport</type></link> object. 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><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a GList containing the names of all the tables.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-get-selected-tables" role="function">
<title>gda_export_get_selected_tables ()</title>
<indexterm zone="gda-export-get-selected-tables"><primary>gda_export_get_selected_tables</primary></indexterm><programlisting><link linkend="GList">GList</link>* gda_export_get_selected_tables (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Returns a list with the names of all the currently selected objects
in the given <link linkend="GdaExport"><type>GdaExport</type></link> object.
</para>
<para>
You are responsible to free the returned value yourself.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> containing the names of the selected tables.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-select-table" role="function">
<title>gda_export_select_table ()</title>
<indexterm zone="gda-export-select-table"><primary>gda_export_select_table</primary></indexterm><programlisting><link linkend="void">void</link> gda_export_select_table (<link linkend="GdaExport">GdaExport</link> *exp,
const <link linkend="gchar">gchar</link> *table);</programlisting>
<para>
Adds the given <parameter>table</parameter> to the list of selected tables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table</parameter> :</term>
<listitem><simpara> name of the table.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-select-table-list" role="function">
<title>gda_export_select_table_list ()</title>
<indexterm zone="gda-export-select-table-list"><primary>gda_export_select_table_list</primary></indexterm><programlisting><link linkend="void">void</link> gda_export_select_table_list (<link linkend="GdaExport">GdaExport</link> *exp,
<link linkend="GList">GList</link> *list);</programlisting>
<para>
Adds all the tables contained in the given <parameter>list</parameter> to the list of
selected tables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>list</parameter> :</term>
<listitem><simpara> list of tables to be selected.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-unselect-table" role="function">
<title>gda_export_unselect_table ()</title>
<indexterm zone="gda-export-unselect-table"><primary>gda_export_unselect_table</primary></indexterm><programlisting><link linkend="void">void</link> gda_export_unselect_table (<link linkend="GdaExport">GdaExport</link> *exp,
const <link linkend="gchar">gchar</link> *table);</programlisting>
<para>
Removes the given table name from the list of selected tables.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table</parameter> :</term>
<listitem><simpara> name of the table.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-run" role="function">
<title>gda_export_run ()</title>
<indexterm zone="gda-export-run"><primary>gda_export_run</primary></indexterm><programlisting><link linkend="void">void</link> 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><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>flags</parameter> :</term>
<listitem><simpara> execution flags.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-stop" role="function">
<title>gda_export_stop ()</title>
<indexterm zone="gda-export-stop"><primary>gda_export_stop</primary></indexterm><programlisting><link linkend="void">void</link> gda_export_stop (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
Stops execution of the given export object.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-get-connection" role="function">
<title>gda_export_get_connection ()</title>
<indexterm zone="gda-export-get-connection"><primary>gda_export_get_connection</primary></indexterm><programlisting><link linkend="GdaConnection">GdaConnection</link>* gda_export_get_connection (<link linkend="GdaExport">GdaExport</link> *exp);</programlisting>
<para>
</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the <link linkend="GdaConnection"><type>GdaConnection</type></link> object associated with the given <link linkend="GdaExport"><type>GdaExport</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gda-export-set-connection" role="function">
<title>gda_export_set_connection ()</title>
<indexterm zone="gda-export-set-connection"><primary>gda_export_set_connection</primary></indexterm><programlisting><link linkend="void">void</link> gda_export_set_connection (<link linkend="GdaExport">GdaExport</link> *exp,
<link linkend="GdaConnection">GdaConnection</link> *cnc);</programlisting>
<para>
Associates the given <link linkend="GdaConnection"><type>GdaConnection</type></link> with the given <link linkend="GdaExport"><type>GdaExport</type></link>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>exp</parameter> :</term>
<listitem><simpara> a <link linkend="GdaExport"><type>GdaExport</type></link> object.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cnc</parameter> :</term>
<listitem><simpara> a <link linkend="GdaConnection"><type>GdaConnection</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
</refsect1>
</refentry>
|