<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>ZVBI Library: Exporting formatted Teletext and Closed Caption pages</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> </div> <div class="contents"> <h1>Exporting formatted Teletext and Closed Caption pages<br> <small> [<a class="el" href="group__HiDec.html">High Level Decoding</a>]</small> </h1><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structvbi__export__info.html">vbi_export_info</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Information about an export module. <a href="structvbi__export__info.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">union </td><td class="memItemRight" valign="bottom"><a class="el" href="unionvbi__option__value.html">vbi_option_value</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Result of an option query. <a href="unionvbi__option__value.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">union </td><td class="memItemRight" valign="bottom"><a class="el" href="unionvbi__option__value__ptr.html">vbi_option_value_ptr</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Option menu types. <a href="unionvbi__option__value__ptr.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structvbi__option__info.html">vbi_option_info</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Information about an export option. <a href="structvbi__option__info.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Modules</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Exmod.html">Internal export module interface</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Render.html">Teletext and Closed Caption page render functions</a></td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="structvbi__export.html">vbi_export</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g532a30d2d28883cb799e136b03b3e6c7">vbi_export</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Export module instance, an opaque object. <a href="#g532a30d2d28883cb799e136b03b3e6c7"></a><br></td></tr> <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g962c6347c02825825c4dc57cef624e18">vbi_option_type</a> { <br> <a class="el" href="group__Export.html#gg962c6347c02825825c4dc57cef624e18c52bcaa99bba52bb01ca08261fbde02a">VBI_OPTION_BOOL</a> = 1, <br> <a class="el" href="group__Export.html#gg962c6347c02825825c4dc57cef624e18e6270b87e1f1ad504a2f9f4b08831c72">VBI_OPTION_INT</a>, <br> <a class="el" href="group__Export.html#gg962c6347c02825825c4dc57cef624e18a6db7cf160c1028967ee90a6a69de6a9">VBI_OPTION_REAL</a>, <br> <a class="el" href="group__Export.html#gg962c6347c02825825c4dc57cef624e186ae6c1b73bc8ac53169cd947b3840f4e">VBI_OPTION_STRING</a>, <br> <a class="el" href="group__Export.html#gg962c6347c02825825c4dc57cef624e186025de4d3bdf673ca38e727e7978adf3">VBI_OPTION_MENU</a> <br> }</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__export__info.html">vbi_export_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g524ee83f803664cc3c0721e609717d7e">vbi_export_info_enum</a> (int index)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__export__info.html">vbi_export_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#gf272c7809ecfd666e2fb70f44ec4676b">vbi_export_info_keyword</a> (const char *keyword)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__export__info.html">vbi_export_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#ge471bb59f53847d20dffb2b12fde04db">vbi_export_info_export</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__export.html">vbi_export</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new</a> (const char *keyword, char **errstr)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#gd5960004a1f5a038977088afb7f5c587">vbi_export_delete</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__option__info.html">vbi_option_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g700aed0e0a661593d573e26c31920448">vbi_export_option_info_enum</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, int index)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structvbi__option__info.html">vbi_option_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g33ee2f2315315a18cfb54c138354d615">vbi_export_option_info_keyword</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *keyword)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *keyword,...)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g2f7a8994e844a23cf5bf297eaf2701f1">vbi_export_option_get</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *keyword, <a class="el" href="unionvbi__option__value.html">vbi_option_value</a> *value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g3f3ffe1fd0b7b143392076b4bfaef8fa">vbi_export_option_menu_set</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *keyword, int entry)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#ge397ba965b3620b7e58f6be9cf9d439e">vbi_export_option_menu_get</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *keyword, int *entry)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">ssize_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g251d0504db5fdad8791f67ec74c06d46">vbi_export_mem</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *e, void *buffer, size_t buffer_size, const <a class="el" href="structvbi__page.html">vbi_page</a> *pg) _vbi_nonnull((1))</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g95cf3da262787eb882c8bfd419601591">vbi_export_alloc</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *e, void **buffer, size_t *buffer_size, const <a class="el" href="structvbi__page.html">vbi_page</a> *pg) _vbi_nonnull((1))</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g84bf3b96c47294313cca3bce52aea9f9">vbi_export_stdio</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, FILE *fp, <a class="el" href="structvbi__page.html">vbi_page</a> *pg)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">vbi_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g0b1f6473de3ddb01a147db71a8231c3c">vbi_export_file</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *, const char *name, <a class="el" href="structvbi__page.html">vbi_page</a> *pg)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Export.html#g50b2530318c8cc894ca6fa81810758dc">vbi_export_errstr</a> (<a class="el" href="structvbi__export.html">vbi_export</a> *)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Once libzvbi received, decoded and formatted a Teletext or Closed Caption page you will want to render it on screen, print it as text or store it in various formats.<p> Fortunately you don't have to do it all by yourself. libzvbi provides export modules converting a <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> into the desired format or rendering directly into memory.<p> A minimalistic export example:<p> <div class="fragment"><pre class="fragment"> <span class="keyword">static</span> <span class="keywordtype">void</span> export_my_page (<a class="code" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> *pg) { <a class="code" href="structvbi__export.html">vbi_export</a> *ex; <span class="keywordtype">char</span> *errstr; <span class="keywordflow">if</span> (!(ex = <a class="code" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new</a> (<span class="stringliteral">"html"</span>, &errstr))) { fprintf (stderr, <span class="stringliteral">"Cannot export as HTML: %s\n"</span>, errstr); free (errstr); <span class="keywordflow">return</span>; } <span class="keywordflow">if</span> (!<a class="code" href="group__Export.html#g0b1f6473de3ddb01a147db71a8231c3c">vbi_export_file</a> (ex, <span class="stringliteral">"my_page.html"</span>, pg)) puts (<a class="code" href="group__Export.html#g50b2530318c8cc894ca6fa81810758dc">vbi_export_errstr</a> (ex)); <a class="code" href="group__Export.html#gd5960004a1f5a038977088afb7f5c587">vbi_export_delete</a> (ex); } </pre></div> <hr><h2>Typedef Documentation</h2> <a class="anchor" name="g532a30d2d28883cb799e136b03b3e6c7"></a><!-- doxytag: member="export.h::vbi_export" ref="g532a30d2d28883cb799e136b03b3e6c7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="structvbi__export.html">vbi_export</a> <a class="el" href="structvbi__export.html">vbi_export</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Export module instance, an opaque object. <p> Allocate with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>. </div> </div><p> <hr><h2>Enumeration Type Documentation</h2> <a class="anchor" name="g962c6347c02825825c4dc57cef624e18"></a><!-- doxytag: member="export.h::vbi_option_type" ref="g962c6347c02825825c4dc57cef624e18" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="group__Export.html#g962c6347c02825825c4dc57cef624e18">vbi_option_type</a> </td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"><em><a class="anchor" name="gg962c6347c02825825c4dc57cef624e18c52bcaa99bba52bb01ca08261fbde02a"></a><!-- doxytag: member="VBI_OPTION_BOOL" ref="gg962c6347c02825825c4dc57cef624e18c52bcaa99bba52bb01ca08261fbde02a" args="" -->VBI_OPTION_BOOL</em> </td><td> A boolean value, either <code>TRUE</code> (1) or <code>FALSE</code> (0). <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>int </td></tr> <tr> <td>Default:</td><td>vbi_option_info.def.num </td></tr> <tr> <td>Bounds:</td><td>vbi_option_info.min.num (0) ... max.num (1), step.num (1) </td></tr> <tr> <td>Menu:</td><td>NULL </td></tr> </table> </td></tr> <tr><td valign="top"><em><a class="anchor" name="gg962c6347c02825825c4dc57cef624e18e6270b87e1f1ad504a2f9f4b08831c72"></a><!-- doxytag: member="VBI_OPTION_INT" ref="gg962c6347c02825825c4dc57cef624e18e6270b87e1f1ad504a2f9f4b08831c72" args="" -->VBI_OPTION_INT</em> </td><td> A signed integer value. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>int </td></tr> <tr> <td>Default:</td><td>vbi_option_info.def.num </td></tr> <tr> <td>Bounds:</td><td>vbi_option_info.min.num ... max.num, step.num </td></tr> <tr> <td>Menu:</td><td>NULL </td></tr> </table> When only a few discrete values rather than a range of values are permitted <code><a class="el" href="structvbi__option__info.html#faad46a4148a5c8e79ecf3dace748796">vbi_option_info.menu</a></code> points to a vector of integers. However you must still set the option by value, not by menu index. If the value is invalid <a class="el" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set()</a> may fail or pick the closest possible value instead. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>int </td></tr> <tr> <td>Default:</td><td>vbi_option_info.menu.num[vbi_option_info.def.num] </td></tr> <tr> <td>Bounds:</td><td>See vbi_option_info.menu.num[] for valid values </td></tr> <tr> <td>Menu:</td><td>vbi_option_info.menu.num[min.num (0) ... max.num], step.num (1) </td></tr> </table> </td></tr> <tr><td valign="top"><em><a class="anchor" name="gg962c6347c02825825c4dc57cef624e18a6db7cf160c1028967ee90a6a69de6a9"></a><!-- doxytag: member="VBI_OPTION_REAL" ref="gg962c6347c02825825c4dc57cef624e18a6db7cf160c1028967ee90a6a69de6a9" args="" -->VBI_OPTION_REAL</em> </td><td> A real value. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>double </td></tr> <tr> <td>Default:</td><td>vbi_option_info.def.dbl </td></tr> <tr> <td>Bounds:</td><td>vbi_option_info.min.dbl ... max.dbl, step.dbl </td></tr> <tr> <td>Menu:</td><td>NULL </td></tr> </table> As with <code>VBI_OPTION_INT</code> <code><a class="el" href="structvbi__option__info.html#faad46a4148a5c8e79ecf3dace748796">vbi_option_info.menu</a></code> may point to a set of valid values: <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>double </td></tr> <tr> <td>Default:</td><td>vbi_option_info.menu.dbl[vbi_option.info.def.num] </td></tr> <tr> <td>Bounds:</td><td>See vbi_option_info.menu.dbl[] for valid values </td></tr> <tr> <td>Menu:</td><td>vbi_option_info.menu.dbl[min.num (0) ... max.num], step.num (1) </td></tr> </table> </td></tr> <tr><td valign="top"><em><a class="anchor" name="gg962c6347c02825825c4dc57cef624e186ae6c1b73bc8ac53169cd947b3840f4e"></a><!-- doxytag: member="VBI_OPTION_STRING" ref="gg962c6347c02825825c4dc57cef624e186ae6c1b73bc8ac53169cd947b3840f4e" args="" -->VBI_OPTION_STRING</em> </td><td> A null terminated string. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>char * </td></tr> <tr> <td>Default:</td><td>vbi_option_info.def.str </td></tr> <tr> <td>Bounds:</td><td>Not applicable </td></tr> <tr> <td>Menu:</td><td>NULL </td></tr> </table> As with <code>VBI_OPTION_INT</code> <code><a class="el" href="structvbi__option__info.html#faad46a4148a5c8e79ecf3dace748796">vbi_option_info.menu</a></code> may point to a set of valid strings. Note that <a class="el" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set()</a> always expects a string for this kind of option, and it may accept strings which are not in the menu. Contrast this with <code>VBI_OPTION_MENU</code>, where a menu index is expected. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>char * </td></tr> <tr> <td>Default:</td><td>vbi_option_info.menu.str[vbi_option_info.def.num] </td></tr> <tr> <td>Bounds:</td><td>Not applicable </td></tr> <tr> <td>Menu:</td><td>vbi_option_info.menu.str[min.num (0) ... max.num], step.num (1) </td></tr> </table> </td></tr> <tr><td valign="top"><em><a class="anchor" name="gg962c6347c02825825c4dc57cef624e186025de4d3bdf673ca38e727e7978adf3"></a><!-- doxytag: member="VBI_OPTION_MENU" ref="gg962c6347c02825825c4dc57cef624e186025de4d3bdf673ca38e727e7978adf3" args="" -->VBI_OPTION_MENU</em> </td><td> Choice between a number of named options. The value of this kind of option is the menu index. The menu strings can be localized with a dgettext("zvbi", menu.str[n]) call. For details see gettext info file. <table border="1" cellspacing="3" cellpadding="3"> <tr> <td>Type:</td><td>int </td></tr> <tr> <td>Default:</td><td>vbi_option_info.def.num </td></tr> <tr> <td>Bounds:</td><td>vbi_option_info.min.num (0) ... max.num, step.num (1) </td></tr> <tr> <td>Menu:</td><td>vbi_option_info.menu.str[vbi_option_info.min.num ... max.num], step.num (1). </td></tr> </table> </td></tr> </table> </dl> </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="g524ee83f803664cc3c0721e609717d7e"></a><!-- doxytag: member="export.h::vbi_export_info_enum" ref="g524ee83f803664cc3c0721e609717d7e" args="(int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__export__info.html">vbi_export_info</a>* vbi_export_info_enum </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>Index into the export module list, 0 ... n.</td></tr> </table> </dl> Enumerates all available export modules. You should start at index 0, incrementing.<p> Some modules may depend on machine features or the presence of certain libraries, thus the list can vary from session to session.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Static pointer to a <a class="el" href="structvbi__export__info.html" title="Information about an export module.">vbi_export_info</a> structure (no need to be freed), <code>NULL</code> if the index is out of bounds. </dd></dl> </div> </div><p> <a class="anchor" name="gf272c7809ecfd666e2fb70f44ec4676b"></a><!-- doxytag: member="export.h::vbi_export_info_keyword" ref="gf272c7809ecfd666e2fb70f44ec4676b" args="(const char *keyword)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__export__info.html">vbi_export_info</a>* vbi_export_info_keyword </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Export module identifier as in <a class="el" href="structvbi__export__info.html" title="Information about an export module.">vbi_export_info</a> and <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>.</td></tr> </table> </dl> Similar to <a class="el" href="group__Export.html#g524ee83f803664cc3c0721e609717d7e">vbi_export_info_enum()</a>, but this function attempts to find an export module by keyword.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Static pointer to a <a class="el" href="structvbi__export__info.html" title="Information about an export module.">vbi_export_info</a> structure, <code>NULL</code> if the named export module has not been found. </dd></dl> </div> </div><p> <a class="anchor" name="ge471bb59f53847d20dffb2b12fde04db"></a><!-- doxytag: member="export.h::vbi_export_info_export" ref="ge471bb59f53847d20dffb2b12fde04db" args="(vbi_export *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__export__info.html">vbi_export_info</a>* vbi_export_info_export </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a <a class="el" href="structvbi__export.html">vbi_export</a> object previously allocated with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>.</td></tr> </table> </dl> Returns the export module info for the given <em>export</em> object.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>A static <a class="el" href="structvbi__export__info.html" title="Information about an export module.">vbi_export_info</a> pointer or <code>NULL</code> if <em>export</em> is <code>NULL</code>. </dd></dl> </div> </div><p> <a class="anchor" name="g47ed3113ae43980c6bf03d5a9ffa8ed7"></a><!-- doxytag: member="export.h::vbi_export_new" ref="g47ed3113ae43980c6bf03d5a9ffa8ed7" args="(const char *keyword, char **errstr)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__export.html">vbi_export</a>* vbi_export_new </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"> <em>errstr</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Export module identifier as in <a class="el" href="structvbi__export__info.html" title="Information about an export module.">vbi_export_info</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>errstr</em> </td><td>If not <code>NULL</code> this function stores a pointer to an error description here. You must free() this string when no longer needed.</td></tr> </table> </dl> Creates a new export module instance to export a <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> in the respective module format. As a special service you can initialize options by appending to the <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>like this:</td></tr> </table> </dl> <div class="fragment"><pre class="fragment"> <a class="code" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new</a> (<span class="stringliteral">"keyword; quality=75.5, comment=\"example text\""</span>); </pre></div><p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Pointer to a newly allocated <a class="el" href="structvbi__export.html">vbi_export</a> object which must be freed by calling <a class="el" href="group__Export.html#gd5960004a1f5a038977088afb7f5c587">vbi_export_delete()</a>. <code>NULL</code> is returned and the <em>errstr</em> may be set (else <em>NULL</em>) if some problem occurred. </dd></dl> </div> </div><p> <a class="anchor" name="gd5960004a1f5a038977088afb7f5c587"></a><!-- doxytag: member="export.h::vbi_export_delete" ref="gd5960004a1f5a038977088afb7f5c587" args="(vbi_export *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void vbi_export_delete </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a <a class="el" href="structvbi__export.html">vbi_export</a> object previously allocated with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>. Can be <code>NULL</code>.</td></tr> </table> </dl> This function frees all resources associated with the <a class="el" href="structvbi__export.html">vbi_export</a> object. </div> </div><p> <a class="anchor" name="g700aed0e0a661593d573e26c31920448"></a><!-- doxytag: member="export.h::vbi_export_option_info_enum" ref="g700aed0e0a661593d573e26c31920448" args="(vbi_export *, int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__option__info.html">vbi_option_info</a>* vbi_export_option_info_enum </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>index</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>Index in the option table 0 ... n.</td></tr> </table> </dl> Enumerates the options available for the given export module. You should start at index 0, incrementing.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Static pointer to a <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a> structure, <code>NULL</code> if <em>index</em> is out of bounds. </dd></dl> </div> </div><p> <a class="anchor" name="g33ee2f2315315a18cfb54c138354d615"></a><!-- doxytag: member="export.h::vbi_export_option_info_keyword" ref="g33ee2f2315315a18cfb54c138354d615" args="(vbi_export *, const char *keyword)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structvbi__option__info.html">vbi_option_info</a>* vbi_export_option_info_keyword </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Keyword of the option as in <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a>.</td></tr> </table> </dl> Similar to <a class="el" href="group__Export.html#g700aed0e0a661593d573e26c31920448">vbi_export_option_info_enum()</a>, but tries to find the option info based on the given keyword.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>Static pointer to a <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a> structure, <code>NULL</code> if the keyword wasn't found. </dd></dl> </div> </div><p> <a class="anchor" name="g13174a7a199568c96dfcfcf8c9329622"></a><!-- doxytag: member="export.h::vbi_export_option_set" ref="g13174a7a199568c96dfcfcf8c9329622" args="(vbi_export *, const char *keyword,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_option_set </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Keyword identifying the option, as in <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>...</em> </td><td>New value to set.</td></tr> </table> </dl> Sets the value of the named option. Make sure the value is casted to the correct type (int, double, char *).<p> Typical usage of <a class="el" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set()</a>: <div class="fragment"><pre class="fragment"> <a class="code" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set</a> (export, <span class="stringliteral">"quality"</span>, 75.5); </pre></div><p> Mind that options of type <code>VBI_OPTION_MENU</code> must be set by menu entry number (int), all other options by value. If necessary it will be replaced by the closest value possible. Use function <a class="el" href="group__Export.html#g3f3ffe1fd0b7b143392076b4bfaef8fa">vbi_export_option_menu_set()</a> to set options with menu by menu entry.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>TRUE</code> on success, otherwise the option is not changed. </dd></dl> </div> </div><p> <a class="anchor" name="g2f7a8994e844a23cf5bf297eaf2701f1"></a><!-- doxytag: member="export.h::vbi_export_option_get" ref="g2f7a8994e844a23cf5bf297eaf2701f1" args="(vbi_export *, const char *keyword, vbi_option_value *value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_option_get </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="unionvbi__option__value.html">vbi_option_value</a> * </td> <td class="paramname"> <em>value</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Keyword identifying the option, as in <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>A place to store the current option value.</td></tr> </table> </dl> This function queries the current value of the named option. When the option is of type VBI_OPTION_STRING <em>value.str</em> must be freed with free() when you don't need it any longer. When the option is of type VBI_OPTION_MENU then <em>value.num</em> contains the selected entry.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>TRUE</code> on success, otherwise <em>value</em> unchanged. </dd></dl> </div> </div><p> <a class="anchor" name="g3f3ffe1fd0b7b143392076b4bfaef8fa"></a><!-- doxytag: member="export.h::vbi_export_option_menu_set" ref="g3f3ffe1fd0b7b143392076b4bfaef8fa" args="(vbi_export *, const char *keyword, int entry)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_option_menu_set </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Keyword identifying the option, as in <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>entry</em> </td><td>Menu entry to be selected.</td></tr> </table> </dl> Similar to <a class="el" href="group__Export.html#g13174a7a199568c96dfcfcf8c9329622">vbi_export_option_set()</a> this function sets the value of the named option, however it does so by number of the corresponding menu entry. Naturally this must be an option with menu.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>TRUE</code> on success, otherwise the option is not changed. </dd></dl> </div> </div><p> <a class="anchor" name="ge397ba965b3620b7e58f6be9cf9d439e"></a><!-- doxytag: member="export.h::vbi_export_option_menu_get" ref="ge397ba965b3620b7e58f6be9cf9d439e" args="(vbi_export *, const char *keyword, int *entry)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_option_menu_get </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>keyword</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"> <em>entry</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>keyword</em> </td><td>Keyword identifying the option, as in <a class="el" href="structvbi__option__info.html" title="Information about an export option.">vbi_option_info</a>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>entry</em> </td><td>A place to store the current menu entry.</td></tr> </table> </dl> Similar to <a class="el" href="group__Export.html#g2f7a8994e844a23cf5bf297eaf2701f1">vbi_export_option_get()</a> this function queries the current value of the named option, but returns this value as number of the corresponding menu entry. Naturally this must be an option with menu.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>TRUE</code> on success, otherwise <em>value</em> remained unchanged. </dd></dl> </div> </div><p> <a class="anchor" name="g251d0504db5fdad8791f67ec74c06d46"></a><!-- doxytag: member="export.h::vbi_export_mem" ref="g251d0504db5fdad8791f67ec74c06d46" args="(vbi_export *e, void *buffer, size_t buffer_size, const vbi_page *pg) _vbi_nonnull((1))" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ssize_t vbi_export_mem </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"> <em>buffer_size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structvbi__page.html">vbi_page</a> * </td> <td class="paramname"> <em>pg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>Output buffer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer_size</em> </td><td>Size of the output buffer in bytes. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pg</em> </td><td>Page to be exported.</td></tr> </table> </dl> This function writes the <em>pg</em> contents, converted to the format selected with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>, into the <em>buffer</em>.<p> You can call this function repeatedly, it does not change the state of the <a class="el" href="structvbi__export.html">vbi_export</a> or <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> structure.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>On success the function returns the actual number of bytes stored in the buffer. If <em>buffer_size</em> is too small it returns the required size and the buffer contents are undefined. On other errors it returns -1 and the buffer contents are undefined.</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl> </div> </div><p> <a class="anchor" name="g95cf3da262787eb882c8bfd419601591"></a><!-- doxytag: member="export.h::vbi_export_alloc" ref="g95cf3da262787eb882c8bfd419601591" args="(vbi_export *e, void **buffer, size_t *buffer_size, const vbi_page *pg) _vbi_nonnull((1))" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void* vbi_export_alloc </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void ** </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t * </td> <td class="paramname"> <em>buffer_size</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structvbi__page.html">vbi_page</a> * </td> <td class="paramname"> <em>pg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The address of the output buffer will be stored here. <em>buffer</em> can be <code>NULL</code>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buffer_size</em> </td><td>The amount of data stored in the output buffer, in bytes, will be stored here. <em>buffer_size</em> can be <code>NULL</code>. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pg</em> </td><td>Page to be exported.</td></tr> </table> </dl> This function writes the <em>pg</em> contents, converted to the format selected with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>, into a newly allocated buffer. You must free() this buffer when it is no longer needed.<p> You can call this function repeatedly, it does not change the state of the <a class="el" href="structvbi__export.html">vbi_export</a> or <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> structure.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>On success the function returns the address of the allocated buffer. On failure it returns <code>NULL</code>, and <em>buffer</em> and <em>buffer_size</em> remain unmodified.</dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd>0.2.26 </dd></dl> </div> </div><p> <a class="anchor" name="g84bf3b96c47294313cca3bce52aea9f9"></a><!-- doxytag: member="export.h::vbi_export_stdio" ref="g84bf3b96c47294313cca3bce52aea9f9" args="(vbi_export *, FILE *fp, vbi_page *pg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_stdio </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>fp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structvbi__page.html">vbi_page</a> * </td> <td class="paramname"> <em>pg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>fp</em> </td><td>Buffered i/o stream to write to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pg</em> </td><td>Page to be exported.</td></tr> </table> </dl> This function writes the <em>pg</em> contents, converted to the format selected with the <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a> function, into the stream <em>fp</em>. The caller is responsible for opening and closing the stream. Don't forget to check for i/o errors after closing. Note this function may write incomplete files when an error occurs.<p> You can call this function repeatedly, it does not change the state of the <a class="el" href="structvbi__export.html">vbi_export</a> or <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> structure.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure, <code>TRUE</code> on success. </dd></dl> </div> </div><p> <a class="anchor" name="g0b1f6473de3ddb01a147db71a8231c3c"></a><!-- doxytag: member="export.h::vbi_export_file" ref="g0b1f6473de3ddb01a147db71a8231c3c" args="(vbi_export *, const char *name, vbi_page *pg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">vbi_bool vbi_export_file </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>e</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structvbi__page.html">vbi_page</a> * </td> <td class="paramname"> <em>pg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>e</em> </td><td>Initialized <a class="el" href="structvbi__export.html">vbi_export</a> object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>File to be created. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pg</em> </td><td>Page to be exported.</td></tr> </table> </dl> Writes the <em>pg</em> contents, converted to the format selected with <a class="el" href="group__Export.html#g47ed3113ae43980c6bf03d5a9ffa8ed7">vbi_export_new()</a>, into a new file with the given <em>name</em>. When an error occurs after the file was opened, the function deletes the file.<p> You can call this function repeatedly, it does not change the state of the <a class="el" href="structvbi__export.html">vbi_export</a> or <a class="el" href="structvbi__page.html" title="Formatted Teletext or Closed Caption page.">vbi_page</a> structure.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd><code>FALSE</code> on failure, <code>TRUE</code> on success. </dd></dl> </div> </div><p> <a class="anchor" name="g50b2530318c8cc894ca6fa81810758dc"></a><!-- doxytag: member="export.h::vbi_export_errstr" ref="g50b2530318c8cc894ca6fa81810758dc" args="(vbi_export *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char* vbi_export_errstr </td> <td>(</td> <td class="paramtype"><a class="el" href="structvbi__export.html">vbi_export</a> * </td> <td class="paramname"> <em>export</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>export</em> </td><td>Pointer to a initialized <a class="el" href="structvbi__export.html">vbi_export</a> object.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>After an export function failed, this function returns a pointer to a more detailed error description. Do not free this string. It remains valid until the next call of an export function. </dd></dl> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 27 04:47:58 2009 for ZVBI Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>