Sophie

Sophie

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

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

<html>
<head>
    <title>Eet: Eet File Ciphered 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 Ciphered Main Functions<br/>
<small>
[<a class="el" href="group__Eet__File__Group.html">Eet File Main Functions</a>]</small>
</h1>
<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.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></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__Cipher__Group.html#gafde124ec4aa3d6ad934e7cc43c24ae3a">eet_read_cipher</a> (<a class="el" href="group__Eet__File__Group.html#ga8d9779184a9870c1a225f1f40c76e8a7">Eet_File</a> *ef, const char *name, int *size_ret, const char *cipher_key)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Read a specified entry from an eet file and return data using a cipher.  <a href="#gafde124ec4aa3d6ad934e7cc43c24ae3a"></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__Cipher__Group.html#ga0c08a5881d6fd3474a8cbe03a445aff3">eet_write_cipher</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, const char *cipher_key)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write a specified entry to an eet file handle using a cipher.  <a href="#ga0c08a5881d6fd3474a8cbe03a445aff3"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<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>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__Eet__Cipher__Group.html">Cipher, Identity and Protection Mechanisms</a> </dd></dl>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafde124ec4aa3d6ad934e7cc43c24ae3a"></a><!-- doxytag: member="Eet.h::eet_read_cipher" ref="gafde124ec4aa3d6ad934e7cc43c24ae3a" args="(Eet_File *ef, const char *name, int *size_ret, const char *cipher_key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI void* eet_read_cipher </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>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>cipher_key</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 using a cipher. </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>
    <tr><td valign="top"></td><td valign="top"><em>cipher_key</em>&nbsp;</td><td>The key to use as cipher. </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__Group.html#gac13cdf7782d1e513f5b1abcc529962f4" title="Read a specified entry from an eet file and return data.">eet_read()</a></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>

<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>, <a class="el" href="eet__data_8c_source.html#l01541">eet_data_read_cipher()</a>, and <a class="el" href="eet__lib_8c_source.html#l01695">eet_read()</a>.</p>

</div>
</div>
<a class="anchor" id="ga0c08a5881d6fd3474a8cbe03a445aff3"></a><!-- doxytag: member="Eet.h::eet_write_cipher" ref="ga0c08a5881d6fd3474a8cbe03a445aff3" args="(Eet_File *ef, const char *name, const void *data, int size, int compress, const char *cipher_key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EAPI int eet_write_cipher </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>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>cipher_key</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 using a cipher. </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>
    <tr><td valign="top"></td><td valign="top"><em>cipher_key</em>&nbsp;</td><td>The key to use as cipher. </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__Group.html#ga682d04715f0e11380c460814c4a9bd21" title="Write a specified entry to an eet file handle.">eet_write()</a></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#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__image_8c_source.html#l00912">eet_data_image_write_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#l03619">eet_data_undump_cipher()</a>, <a class="el" href="eet__data_8c_source.html#l01605">eet_data_write_cipher()</a>, and <a class="el" href="eet__lib_8c_source.html#l01920">eet_write()</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>