Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f2ccf6b0630b8c81810a0107f1c7ff67 > files > 44

eet-devel-1.3.2-1.fc14.i686.rpm

<html>
<head>
    <title>Eet: Eet File Main Functions</title>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <meta name="author" content="Andres Blanc" >
    
    <link rel="icon" href="img/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="img/favicon.png" type="image/x-icon">
    <link rel="icon" href="img/favicon.png" type="image/ico">
    <link rel="shortcut icon" href="img/favicon.png" type="image/ico">

    <link rel="stylesheet" type="text/css" media="screen" href="e.css">
    <link rel="stylesheet" type="text/css" media="screen" href="edoxy.css">
</head>

<body>

<div id="container">

<div id="header">
<div class="layout">
    
    <h1><span>Enlightenment</span></h1>
    <h2><span>Beauty at your fingertips</span></h2>

    <div class="menu-container">
        <div class="menu">
            <ul>
	        <li class="current"><a href="http://web.enlightenment.org/p.php?p=docs">Docs</a></li>
                <li><a href="http://trac.enlightenment.org/e">Tracker</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=contact">Contact</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=contribute">Contribute</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=support">Support</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=download">Download</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=about">About</a></li>
                <li><a href="http://www.enlightenment.org/p.php?p=news">News</a></li>
                <li><a href="http://www.enlightenment.org/">Home</a></li>
            </ul>
        </div>
    </div>

    <div class="doxytitle">
        Eet Documentation <small>at 2 Jul 2010</small>
    </div>

    <div class="menu-container">
        <div class="submenu">
            <ul class="current">
                <li><a href="Examples.html">Examples</a></li>
                <li><a href="files.html">Files</a></li>
                <li><a href="modules.html">Modules</a></li>
                <li><a href="globals.html">Globals</a></li>
                <li><a href="pages.html">Related Pages</a></li>
	        <li class="current"><a href="index.html">Main Page</a></li>
            </ul>
        </div>
    </div>


    <div class="clear"></div>
</div>
</div>

<div id="content">
<div class="layout">
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="contents">
<h1>Eet File Main Functions</h1>
<p>Functions to create, destroy and do basic manipulation of <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7" title="Opaque handle that defines an Eet file (or memory).">Eet_File</a> handles.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Cipher__Group.html">Eet File Ciphered Main Functions</a></td></tr>

<p><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Most of the <a class="el" href="group__Eet__File__Group.html">Eet File Main Functions</a> have alternative versions that accounts for ciphers to protect their content. </p>
<br/></td></tr>
</p>
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="group__Eet__File__Group.html#gaa8e1a7af50fefaf15eb2f69543d24998">_Eet_File_Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Modes that a file can be opened.  <a href="#gace4c717b4aadfe603183524c18951572"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct _Eet_File&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opaque handle that defines an Eet file (or memory).  <a href="#ga8d9779184a9870c1a225f1f40c76e8a7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf0984c8280699ca5a3c4966f5580324c"></a><!-- doxytag: member="Eet_File_Group::Eet_Dictionary" ref="gaf0984c8280699ca5a3c4966f5580324c" args="" -->
typedef struct _Eet_Dictionary&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gaf0984c8280699ca5a3c4966f5580324c">Eet_Dictionary</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opaque handle that defines a file-backed (mmaped) dictionary of strings. <br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gaa8e1a7af50fefaf15eb2f69543d24998">_Eet_File_Mode</a> { , <br/>
&nbsp;&nbsp;<a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81">EET_FILE_MODE_READ</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9">EET_FILE_MODE_WRITE</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a763d29c19960a4e0d4eb7bc7bb512481">EET_FILE_MODE_READ_WRITE</a>
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Modes that a file can be opened. </p>
 <a href="group__Eet__File__Group.html#gaa8e1a7af50fefaf15eb2f69543d24998">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga5f55956b860aa2c77af9b1a880c4c256">eet_open</a> (const char *file, <a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a> mode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open an eet file on disk, and returns a handle to it.  <a href="#ga5f55956b860aa2c77af9b1a880c4c256"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gac514fa1812cfe27f0b7c0ff5fc13af45">eet_memopen_read</a> (const void *data, size_t size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open an eet file directly from a memory location.  <a href="#gac514fa1812cfe27f0b7c0ff5fc13af45"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga806f64e7ad3463cd40337c5022c7e83c">eet_mode_get</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the mode an Eet_File was opened with.  <a href="#ga806f64e7ad3463cd40337c5022c7e83c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__Group.html#gab002b16c58e2a62fc7981581647a0092">Eet_Error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga1675fef1f6012c1e02ae313d13dc3e03">eet_close</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close an eet file handle and flush and writes pending.  <a href="#ga1675fef1f6012c1e02ae313d13dc3e03"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__Group.html#gab002b16c58e2a62fc7981581647a0092">Eet_Error</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gaf343f344180955ed898aa86b90ebefda">eet_sync</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sync content of an eet file handle, flushing pending writes.  <a href="#gaf343f344180955ed898aa86b90ebefda"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI <a class="el" href="group__Eet__File__Group.html#gaf0984c8280699ca5a3c4966f5580324c">Eet_Dictionary</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gab45ad39596d2fb54a88fda93e7fa0b0f">eet_dictionary_get</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the shared string dictionary of the Eet file.  <a href="#gab45ad39596d2fb54a88fda93e7fa0b0f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga53290da52edb929b85e51f25e79d27c8">eet_dictionary_string_check</a> (<a class="el" href="group__Eet__File__Group.html#gaf0984c8280699ca5a3c4966f5580324c">Eet_Dictionary</a> *ed, const char *string)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if a given string comes from a given dictionary.  <a href="#ga53290da52edb929b85e51f25e79d27c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gac13cdf7782d1e513f5b1abcc529962f4">eet_read</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *name, int *size_ret)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a specified entry from an eet file and return data.  <a href="#gac13cdf7782d1e513f5b1abcc529962f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI const void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga73852ab3d1276c2913715b3716cf4a04">eet_read_direct</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *name, int *size_ret)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a specified entry from an eet file and return data.  <a href="#ga73852ab3d1276c2913715b3716cf4a04"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga682d04715f0e11380c460814c4a9bd21">eet_write</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *name, const void *data, int size, int compress)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write a specified entry to an eet file handle.  <a href="#ga682d04715f0e11380c460814c4a9bd21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#gaa8a980d684123dfbaf12e7efefdb57f5">eet_delete</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *name)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a specified entry from an Eet file being written or re-written.  <a href="#gaa8a980d684123dfbaf12e7efefdb57f5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI char **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga6700a425f59086e7c8a945d6923874d3">eet_list</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *glob, int *count_ret)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">List all entries in eet file matching shell glob.  <a href="#ga6700a425f59086e7c8a945d6923874d3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">EAPI int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Eet__File__Group.html#ga53bf1cf96267787aa93a99a0fe7ba8f7">eet_num_entries</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the number of entries in the specified eet file.  <a href="#ga53bf1cf96267787aa93a99a0fe7ba8f7"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Functions to create, destroy and do basic manipulation of <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7" title="Opaque handle that defines an Eet file (or memory).">Eet_File</a> handles. </p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ga8d9779184a9870c1a225f1f40c76e8a7"></a><!-- doxytag: member="Eet.h::Eet_File" ref="ga8d9779184a9870c1a225f1f40c76e8a7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Opaque handle that defines an Eet file (or memory). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Eet__File__Group.html#ga5f55956b860aa2c77af9b1a880c4c256" title="Open an eet file on disk, and returns a handle to it.">eet_open()</a> </dd>
<dd>
<a class="el" href="group__Eet__File__Group.html#gac514fa1812cfe27f0b7c0ff5fc13af45" title="Open an eet file directly from a memory location.">eet_memopen_read()</a> </dd>
<dd>
<a class="el" href="group__Eet__File__Group.html#ga1675fef1f6012c1e02ae313d13dc3e03" title="Close an eet file handle and flush and writes pending.">eet_close()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gace4c717b4aadfe603183524c18951572"></a><!-- doxytag: member="Eet.h::Eet_File_Mode" ref="gace4c717b4aadfe603183524c18951572" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="group__Eet__File__Group.html#gaa8e1a7af50fefaf15eb2f69543d24998">_Eet_File_Mode</a>  <a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modes that a file can be opened. </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gaa8e1a7af50fefaf15eb2f69543d24998"></a><!-- doxytag: member="Eet.h::_Eet_File_Mode" ref="gaa8e1a7af50fefaf15eb2f69543d24998" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__Eet__File__Group.html#gaa8e1a7af50fefaf15eb2f69543d24998">_Eet_File_Mode</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modes that a file can be opened. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81"></a><!-- doxytag: member="EET_FILE_MODE_READ" ref="ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81" args="" -->EET_FILE_MODE_READ</em>&nbsp;</td><td>
<p>File is read-only. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9"></a><!-- doxytag: member="EET_FILE_MODE_WRITE" ref="ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9" args="" -->EET_FILE_MODE_WRITE</em>&nbsp;</td><td>
<p>File is write-only. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa8e1a7af50fefaf15eb2f69543d24998a763d29c19960a4e0d4eb7bc7bb512481"></a><!-- doxytag: member="EET_FILE_MODE_READ_WRITE" ref="ggaa8e1a7af50fefaf15eb2f69543d24998a763d29c19960a4e0d4eb7bc7bb512481" args="" -->EET_FILE_MODE_READ_WRITE</em>&nbsp;</td><td>
<p>File is for both read and write. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga1675fef1f6012c1e02ae313d13dc3e03"></a><!-- doxytag: member="Eet.h::eet_close" ref="ga1675fef1f6012c1e02ae313d13dc3e03" args="(Eet_File *ef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__Group.html#gab002b16c58e2a62fc7981581647a0092">Eet_Error</a> eet_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Close an eet file handle and flush and writes pending. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will flush any pending writes to disk if the eet file was opened for write, and free all data associated with the file handle and file, and close the file.</p>
<p>If the eet file handle is not valid nothing will be done.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

</div>
</div>
<a class="anchor" id="gaa8a980d684123dfbaf12e7efefdb57f5"></a><!-- doxytag: member="Eet.h::eet_delete" ref="gaa8a980d684123dfbaf12e7efefdb57f5" args="(Eet_File *ef, const char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int eet_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Delete a specified entry from an Eet file being written or re-written. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle opened for writing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name of the entry. eg: "/base/file_i_want". </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Success or failure of the delete.</dd></dl>
<p>This function will delete the specified chunk of data from the eet file and return greater than 0 on success. 0 will be returned on failure.</p>
<p>The eet file handle must be a valid file handle for an eet file opened for writing. If it is not, 0 will be returned and no action will be performed.</p>
<p>Name, must not be NULL, otherwise 0 will be returned.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>.</p>

</div>
</div>
<a class="anchor" id="gab45ad39596d2fb54a88fda93e7fa0b0f"></a><!-- doxytag: member="Eet.h::eet_dictionary_get" ref="gab45ad39596d2fb54a88fda93e7fa0b0f" args="(Eet_File *ef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__File__Group.html#gaf0984c8280699ca5a3c4966f5580324c">Eet_Dictionary</a>* eet_dictionary_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a handle to the shared string dictionary of the Eet file. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A handle to the dictionary of the file</dd></dl>
<p>This function returns a handle to the dictionary of an Eet file whose handle is <code>ef</code>, if a dictionary exists. NULL is returned otherwise or if the file handle is known to be invalid.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Eet__File__Group.html#ga53290da52edb929b85e51f25e79d27c8" title="Check if a given string comes from a given dictionary.">eet_dictionary_string_check()</a> to know if given string came from the dictionary or it was dynamically allocated using the <a class="el" href="group__Eet__Data__Group.html#gace5d1ff83e06ad08d15aadef3916082f" title="Instructs Eet about memory management for different needs under serialization and...">Eet_Data_Descriptor_Class</a> instructrions.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>Referenced by <a class="el" href="eet__data_8c_source.html#l03487">eet_data_dump_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l01570">eet_data_node_read_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l03764">eet_data_node_write_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l01541">eet_data_read_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l03619">eet_data_undump_cipher()</a>, and <a class="el" href="eet__data_8c_source.html#l01605">eet_data_write_cipher()</a>.</p>

</div>
</div>
<a class="anchor" id="ga53290da52edb929b85e51f25e79d27c8"></a><!-- doxytag: member="Eet.h::eet_dictionary_string_check" ref="ga53290da52edb929b85e51f25e79d27c8" args="(Eet_Dictionary *ed, const char *string)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int eet_dictionary_string_check </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#gaf0984c8280699ca5a3c4966f5580324c">Eet_Dictionary</a> *&nbsp;</td>
          <td class="paramname"> <em>ed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>string</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if a given string comes from a given dictionary. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ed</em>&nbsp;</td><td>A valid dictionary handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>A valid 0 byte terminated C string </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>1 if it is in the dictionary, 0 otherwise</dd></dl>
<p>This checks the given dictionary to see if the given string is actually inside that dictionary (i.e. comes from it) and returns 1 if it does. If the dictionary handle is invlide, the string is NULL or the string is not in the dictionary, 0 is returned.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ga6700a425f59086e7c8a945d6923874d3"></a><!-- doxytag: member="Eet.h::eet_list" ref="ga6700a425f59086e7c8a945d6923874d3" args="(Eet_File *ef, const char *glob, int *count_ret)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI char** eet_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>glob</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count_ret</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>List all entries in eet file matching shell glob. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>glob</em>&nbsp;</td><td>A shell glob to match against. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count_ret</em>&nbsp;</td><td>Number of entries found to match. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Pointer to an array of strings.</dd></dl>
<p>This function will list all entries in the eet file matching the supplied shell glob and return an allocated list of their names, if there are any, and if no memory errors occur.</p>
<p>The eet file handle must be valid and glob must not be NULL, or NULL will be returned and count_ret will be filled with 0.</p>
<p>The calling program must call free() on the array returned, but NOT on the string pointers in the array. They are taken as read-only internals from the eet file handle. They are only valid as long as the file handle is not closed. When it is closed those pointers in the array are now not valid and should not be used.</p>
<p>On success the array returned will have a list of string pointers that are the names of the entries that matched, and count_ret will have the number of entries in this array placed in it.</p>
<p>Hint: an easy way to list all entries in an eet file is to use a glob value of "*".</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>, and <a class="el" href="Eet_8h_source.html#l00171">EET_FILE_MODE_READ_WRITE</a>.</p>

</div>
</div>
<a class="anchor" id="gac514fa1812cfe27f0b7c0ff5fc13af45"></a><!-- doxytag: member="Eet.h::eet_memopen_read" ref="gac514fa1812cfe27f0b7c0ff5fc13af45" args="(const void *data, size_t size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a>* eet_memopen_read </td>
          <td>(</td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open an eet file directly from a memory location. </p>
<p>The data are not copied, so you must keep them around as long as the eet file is open. Their is currently no cache for this kind of Eet_File, so it's reopen every time you do use eet_memopen_read.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.1.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>.</p>

</div>
</div>
<a class="anchor" id="ga806f64e7ad3463cd40337c5022c7e83c"></a><!-- doxytag: member="Eet.h::eet_mode_get" ref="ga806f64e7ad3463cd40337c5022c7e83c" args="(Eet_File *ef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a> eet_mode_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the mode an Eet_File was opened with. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The mode ef was opened with.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ga53bf1cf96267787aa93a99a0fe7ba8f7"></a><!-- doxytag: member="Eet.h::eet_num_entries" ref="ga53bf1cf96267787aa93a99a0fe7ba8f7" args="(Eet_File *ef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int eet_num_entries </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return the number of entries in the specified eet file. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Number of entries in ef or -1 if the number of entries cannot be read due to open mode restrictions.</dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>, and <a class="el" href="Eet_8h_source.html#l00171">EET_FILE_MODE_READ_WRITE</a>.</p>

</div>
</div>
<a class="anchor" id="ga5f55956b860aa2c77af9b1a880c4c256"></a><!-- doxytag: member="Eet.h::eet_open" ref="ga5f55956b860aa2c77af9b1a880c4c256" args="(const char *file, Eet_File_Mode mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a>* eet_open </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#gace4c717b4aadfe603183524c18951572">Eet_File_Mode</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open an eet file on disk, and returns a handle to it. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>file</em>&nbsp;</td><td>The file path to the eet file. eg: <code>"/tmp/file.eet"</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>The mode for opening. Either <a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81" title="File is read-only.">EET_FILE_MODE_READ</a>, <a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9" title="File is write-only.">EET_FILE_MODE_WRITE</a> or <a class="el" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a763d29c19960a4e0d4eb7bc7bb512481" title="File is for both read and write.">EET_FILE_MODE_READ_WRITE</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>An opened eet file handle.</dd></dl>
<p>This function will open an exiting eet file for reading, and build the directory table in memory and return a handle to the file, if it exists and can be read, and no memory errors occur on the way, otherwise NULL will be returned.</p>
<p>It will also open an eet file for writing. This will, if successful, delete the original file and replace it with a new empty file, till the eet file handle is closed or flushed. If it cannot be opened for writing or a memory error occurs, NULL is returned.</p>
<p>You can also open the file for read/write. If you then write a key that does not exist it will be created, if the key exists it will be replaced by the new data.</p>
<p>Example: </p>
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include &lt;<a class="code" href="Eet_8h.html" title="The file that provides the eet functions.">Eet.h</a>&gt;</span>
<span class="preprocessor"> #include &lt;stdio.h&gt;</span>
<span class="preprocessor"> #include &lt;string.h&gt;</span>

 <span class="keywordtype">int</span>
 main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
 {
   <a class="code" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7" title="Opaque handle that defines an Eet file (or memory).">Eet_File</a> *ef;
   <span class="keywordtype">char</span> buf[1024], *ret, **list;
   <span class="keywordtype">int</span> size, num, i;

   <a class="code" href="group__Eet__Group.html#ga9903687bfa20fe9a9e59d4c1d213e89a" title="Initialize the EET library.">eet_init</a>();

   strcpy(buf, <span class="stringliteral">&quot;Here is a string of data to save!&quot;</span>);

   ef = <a class="code" href="group__Eet__File__Group.html#ga5f55956b860aa2c77af9b1a880c4c256" title="Open an eet file on disk, and returns a handle to it.">eet_open</a>(<span class="stringliteral">&quot;/tmp/my_file.eet&quot;</span>, <a class="code" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a8f395f56fba48be007c65be51d799ee9" title="File is write-only.">EET_FILE_MODE_WRITE</a>);
   <span class="keywordflow">if</span> (!ef) <span class="keywordflow">return</span> -1;
   <span class="keywordflow">if</span> (!<a class="code" href="group__Eet__File__Group.html#ga682d04715f0e11380c460814c4a9bd21" title="Write a specified entry to an eet file handle.">eet_write</a>(ef, <span class="stringliteral">&quot;/key/to_store/at&quot;</span>, buf, 1024, 1))
     fprintf(stderr, <span class="stringliteral">&quot;Error writing data!\n&quot;</span>);
   <a class="code" href="group__Eet__File__Group.html#ga1675fef1f6012c1e02ae313d13dc3e03" title="Close an eet file handle and flush and writes pending.">eet_close</a>(ef);

   ef = <a class="code" href="group__Eet__File__Group.html#ga5f55956b860aa2c77af9b1a880c4c256" title="Open an eet file on disk, and returns a handle to it.">eet_open</a>(<span class="stringliteral">&quot;/tmp/my_file.eet&quot;</span>, <a class="code" href="group__Eet__File__Group.html#ggaa8e1a7af50fefaf15eb2f69543d24998a416f7e9a76b8131a44bbeedb13060c81" title="File is read-only.">EET_FILE_MODE_READ</a>);
   <span class="keywordflow">if</span> (!ef) <span class="keywordflow">return</span> -1;
   list = <a class="code" href="group__Eet__File__Group.html#ga6700a425f59086e7c8a945d6923874d3" title="List all entries in eet file matching shell glob.">eet_list</a>(ef, <span class="stringliteral">&quot;*&quot;</span>, &amp;num);
   <span class="keywordflow">if</span> (list)
     {
       <span class="keywordflow">for</span> (i = 0; i &lt; num; i++)
         printf(<span class="stringliteral">&quot;Key stored: %s\n&quot;</span>, list[i]);
       free(list);
     }
   ret = <a class="code" href="group__Eet__File__Group.html#gac13cdf7782d1e513f5b1abcc529962f4" title="Read a specified entry from an eet file and return data.">eet_read</a>(ef, <span class="stringliteral">&quot;/key/to_store/at&quot;</span>, &amp;size);
   <span class="keywordflow">if</span> (ret)
     {
       printf(<span class="stringliteral">&quot;Data read (%i bytes):\n%s\n&quot;</span>, size, ret);
       free(ret);
     }
   <a class="code" href="group__Eet__File__Group.html#ga1675fef1f6012c1e02ae313d13dc3e03" title="Close an eet file handle and flush and writes pending.">eet_close</a>(ef);

   <a class="code" href="group__Eet__Group.html#gacbc7583179399d3b3e7b003e911f866f" title="Shut down the EET library.">eet_shutdown</a>();

   <span class="keywordflow">return</span> 0;
 }
</pre></div><dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>, <a class="el" href="Eet_8h_source.html#l00171">EET_FILE_MODE_READ_WRITE</a>, <a class="el" href="Eet_8h_source.html#l00170">EET_FILE_MODE_WRITE</a>, and <a class="el" href="eet__lib_8c_source.html#l00726">eet_sync()</a>.</p>

</div>
</div>
<a class="anchor" id="gac13cdf7782d1e513f5b1abcc529962f4"></a><!-- doxytag: member="Eet.h::eet_read" ref="gac13cdf7782d1e513f5b1abcc529962f4" args="(Eet_File *ef, const char *name, int *size_ret)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI void* eet_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>size_ret</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a specified entry from an eet file and return data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle opened for reading. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name of the entry. eg: "/base/file_i_want". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size_ret</em>&nbsp;</td><td>Number of bytes read from entry and returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The data stored in that entry in the eet file.</dd></dl>
<p>This function finds an entry in the eet file that is stored under the name specified, and returns that data, decompressed, if successful. NULL is returned if the lookup fails or if memory errors are encountered. It is the job of the calling program to call free() on the returned data. The number of bytes in the returned data chunk are placed in size_ret.</p>
<p>If the eet file handle is not valid NULL is returned and size_ret is filled with 0.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Eet__File__Cipher__Group.html#gafde124ec4aa3d6ad934e7cc43c24ae3a" title="Read a specified entry from an eet file and return data using a cipher.">eet_read_cipher()</a></dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="eet__lib_8c_source.html#l01571">eet_read_cipher()</a>.</p>

</div>
</div>
<a class="anchor" id="ga73852ab3d1276c2913715b3716cf4a04"></a><!-- doxytag: member="Eet.h::eet_read_direct" ref="ga73852ab3d1276c2913715b3716cf4a04" args="(Eet_File *ef, const char *name, int *size_ret)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI const void* eet_read_direct </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>size_ret</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read a specified entry from an eet file and return data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle opened for reading. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name of the entry. eg: "/base/file_i_want". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size_ret</em>&nbsp;</td><td>Number of bytes read from entry and returned. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The data stored in that entry in the eet file.</dd></dl>
<p>This function finds an entry in the eet file that is stored under the name specified, and returns that data if not compressed and successful. NULL is returned if the lookup fails or if memory errors are encountered or if the data is comrpessed. The calling program must never call free() on the returned data. The number of bytes in the returned data chunk are placed in size_ret.</p>
<p>If the eet file handle is not valid NULL is returned and size_ret is filled with 0.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00169">EET_FILE_MODE_READ</a>, and <a class="el" href="Eet_8h_source.html#l00171">EET_FILE_MODE_READ_WRITE</a>.</p>

<p>Referenced by <a class="el" href="eet__data_8c_source.html#l03487">eet_data_dump_cipher()</a>, <a class="el" href="eet__image_8c_source.html#l01011">eet_data_image_header_read_cipher()</a>, <a class="el" href="eet__image_8c_source.html#l00941">eet_data_image_read_cipher()</a>, <a class="el" href="eet__image_8c_source.html#l00976">eet_data_image_read_to_surface_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l01570">eet_data_node_read_cipher()</a>, and <a class="el" href="eet__data_8c_source.html#l01541">eet_data_read_cipher()</a>.</p>

</div>
</div>
<a class="anchor" id="gaf343f344180955ed898aa86b90ebefda"></a><!-- doxytag: member="Eet.h::eet_sync" ref="gaf343f344180955ed898aa86b90ebefda" args="(Eet_File *ef)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI <a class="el" href="group__Eet__Group.html#gab002b16c58e2a62fc7981581647a0092">Eet_Error</a> eet_sync </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sync content of an eet file handle, flushing pending writes. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle.</td></tr>
  </table>
  </dd>
</dl>
<p>This function will flush any pending writes to disk. The eet file must be opened for write.</p>
<p>If the eet file handle is not valid nothing will be done.</p>
<dl class="since"><dt><b>Since:</b></dt><dd>1.2.4 </dd></dl>

<p>References <a class="el" href="Eet_8h_source.html#l00095">EET_ERROR_BAD_OBJECT</a>, <a class="el" href="Eet_8h_source.html#l00094">EET_ERROR_NONE</a>, <a class="el" href="Eet_8h_source.html#l00097">EET_ERROR_NOT_WRITABLE</a>, <a class="el" href="Eet_8h_source.html#l00171">EET_FILE_MODE_READ_WRITE</a>, and <a class="el" href="Eet_8h_source.html#l00170">EET_FILE_MODE_WRITE</a>.</p>

<p>Referenced by <a class="el" href="eet__lib_8c_source.html#l01350">eet_open()</a>.</p>

</div>
</div>
<a class="anchor" id="ga682d04715f0e11380c460814c4a9bd21"></a><!-- doxytag: member="Eet.h::eet_write" ref="ga682d04715f0e11380c460814c4a9bd21" args="(Eet_File *ef, const char *name, const void *data, int size, int compress)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int eet_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *&nbsp;</td>
          <td class="paramname"> <em>ef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>compress</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a specified entry to an eet file handle. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ef</em>&nbsp;</td><td>A valid eet file handle opened for writing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>Name of the entry. eg: "/base/file_i_want". </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>Pointer to the data to be stored. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>Length in bytes in the data to be stored. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>compress</em>&nbsp;</td><td>Compression flags (1 == compress, 0 = don't compress). </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>bytes written on successful write, 0 on failure.</dd></dl>
<p>This function will write the specified chunk of data to the eet file and return greater than 0 on success. 0 will be returned on failure.</p>
<p>The eet file handle must be a valid file handle for an eet file opened for writing. If it is not, 0 will be returned and no action will be performed.</p>
<p>Name, and data must not be NULL, and size must be &gt; 0. If these conditions are not met, 0 will be returned.</p>
<p>The data will be copied (and optionally compressed) in ram, pending a flush to disk (it will stay in ram till the eet file handle is closed though).</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Eet__File__Cipher__Group.html#ga0c08a5881d6fd3474a8cbe03a445aff3" title="Write a specified entry to an eet file handle using a cipher.">eet_write_cipher()</a></dd></dl>
<dl class="since"><dt><b>Since:</b></dt><dd>1.0.0 </dd></dl>

<p>References <a class="el" href="eet__lib_8c_source.html#l01757">eet_write_cipher()</a>.</p>

</div>
</div>
</div>
 
 <div id="push"></div>
 </div> <!-- #content -->
  </div> <!-- .layout -->
 
 </div> <!-- #container -->
 
 
  <div id="footer">
    <table><tr>
      <td class="poweredby"><img src="doxygen.png"></td>
      <td class="copyright">Copyright &copy;2010 Enlightenment</td>
      <td class="generated">Docs generated Fri Jul 2 11:41:28 2010</td>
    </tr></table>
  </div>


</body>
</html>