| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/gtk-doc/html/camel/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CamelKeyFile</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Camel Reference Manual">
<link rel="up" href="Storage.html" title="Metadata Storage">
<link rel="prev" href="Storage.html" title="Metadata Storage">
<link rel="next" href="camel-CamelCertDB.html" title="CamelCertDB">
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="classes.html" title="Part I. Camel Classes">
<link rel="chapter" href="ClassTree.html" title="Class Hierarchy">
<link rel="chapter" href="Fundamentals.html" title="Fundamentals">
<link rel="chapter" href="Streams.html" title="Streams">
<link rel="chapter" href="StreamFilters.html" title="Stream Filters">
<link rel="chapter" href="Services.html" title="Services">
<link rel="chapter" href="Filters.html" title="Filters">
<link rel="chapter" href="Folders.html" title="Folders">
<link rel="chapter" href="SearchFolders.html" title="Search Folders">
<link rel="chapter" href="Addresses.html" title="Addresses">
<link rel="chapter" href="Crypto.html" title="Crypto Contexts">
<link rel="chapter" href="MIME.html" title="MIME Objects">
<link rel="chapter" href="Storage.html" title="Metadata Storage">
<link rel="chapter" href="Utilities.html" title="Utilities">
<link rel="chapter" href="Deprecated.html" title="Deprecated Objects">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="Storage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="Storage.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Camel Reference Manual</th>
<td><a accesskey="n" href="camel-CamelCertDB.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#camel-CamelKeyFile.synopsis" class="shortcut">Top</a>
|
<a href="#camel-CamelKeyFile.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="CamelKeyFile">
<a name="camel-CamelKeyFile"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="camel-CamelKeyFile.top_of_page"></a>CamelKeyFile</span></h2>
<p>CamelKeyFile</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="camel-CamelKeyFile.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
typedef <a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a>;
typedef <a class="link" href="camel-CamelKeyFile.html#camel-key-t" title="camel_key_t">camel_key_t</a>;
<a class="link" href="camel-CamelKeyFile.html#CamelBlockRoot" title="CamelBlockRoot">CamelBlockRoot</a>;
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a>;
<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a>;
#define <a class="link" href="camel-CamelKeyFile.html#CAMEL-BLOCK-FILE-SYNC--CAPS" title="CAMEL_BLOCK_FILE_SYNC">CAMEL_BLOCK_FILE_SYNC</a>
#define <a class="link" href="camel-CamelKeyFile.html#CAMEL-BLOCK-SIZE--CAPS" title="CAMEL_BLOCK_SIZE">CAMEL_BLOCK_SIZE</a>
#define <a class="link" href="camel-CamelKeyFile.html#CAMEL-BLOCK-SIZE-BITS--CAPS" title="CAMEL_BLOCK_SIZE_BITS">CAMEL_BLOCK_SIZE_BITS</a>
#define <a class="link" href="camel-CamelKeyFile.html#CAMEL-BLOCK-DIRTY--CAPS" title="CAMEL_BLOCK_DIRTY">CAMEL_BLOCK_DIRTY</a>
#define <a class="link" href="camel-CamelKeyFile.html#CAMEL-BLOCK-DETACHED--CAPS" title="CAMEL_BLOCK_DETACHED">CAMEL_BLOCK_DETACHED</a>
<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> * <a class="link" href="camel-CamelKeyFile.html#camel-block-file-new" title="camel_block_file_new ()">camel_block_file_new</a> (const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> flags,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> version[8],
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> block_size);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-block-file-rename" title="camel_block_file_rename ()">camel_block_file_rename</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-block-file-delete" title="camel_block_file_delete ()">camel_block_file_delete</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *kf);
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> * <a class="link" href="camel-CamelKeyFile.html#camel-block-file-new-block" title="camel_block_file_new_block ()">camel_block_file_new_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-block-file-free-block" title="camel_block_file_free_block ()">camel_block_file_free_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> id);
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> * <a class="link" href="camel-CamelKeyFile.html#camel-block-file-get-block" title="camel_block_file_get_block ()">camel_block_file_get_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> id);
void <a class="link" href="camel-CamelKeyFile.html#camel-block-file-detach-block" title="camel_block_file_detach_block ()">camel_block_file_detach_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);
void <a class="link" href="camel-CamelKeyFile.html#camel-block-file-attach-block" title="camel_block_file_attach_block ()">camel_block_file_attach_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);
void <a class="link" href="camel-CamelKeyFile.html#camel-block-file-touch-block" title="camel_block_file_touch_block ()">camel_block_file_touch_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);
void <a class="link" href="camel-CamelKeyFile.html#camel-block-file-unref-block" title="camel_block_file_unref_block ()">camel_block_file_unref_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-block-file-sync-block" title="camel_block_file_sync_block ()">camel_block_file_sync_block</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-block-file-sync" title="camel_block_file_sync ()">camel_block_file_sync</a> (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs);
<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a>;
<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> * <a class="link" href="camel-CamelKeyFile.html#camel-key-file-new" title="camel_key_file_new ()">camel_key_file_new</a> (const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> flags,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> version[8]);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-key-file-rename" title="camel_key_file_rename ()">camel_key_file_rename</a> (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-key-file-delete" title="camel_key_file_delete ()">camel_key_file_delete</a> (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-key-file-write" title="camel_key_file_write ()">camel_key_file_write</a> (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> *parent,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
<a class="link" href="camel-CamelKeyFile.html#camel-key-t" title="camel_key_t">camel_key_t</a> *records);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> <a class="link" href="camel-CamelKeyFile.html#camel-key-file-read" title="camel_key_file_read ()">camel_key_file_read</a> (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> *start,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> *len,
<a class="link" href="camel-CamelKeyFile.html#camel-key-t" title="camel_key_t">camel_key_t</a> **records);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="camel-CamelKeyFile.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="camel-CamelKeyFile.details"></a><h2>Details</h2>
<div class="refsect2" title="camel_block_t">
<a name="camel-block-t"></a><h3>camel_block_t</h3>
<pre class="programlisting">typedef guint32 camel_block_t; /* block offset, absolute, bottom BLOCK_SIZE_BITS always 0 */
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="camel_key_t">
<a name="camel-key-t"></a><h3>camel_key_t</h3>
<pre class="programlisting">typedef guint32 camel_key_t; /* this is a bitfield of (block offset:BLOCK_SIZE_BITS) */
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CamelBlockRoot">
<a name="CamelBlockRoot"></a><h3>CamelBlockRoot</h3>
<pre class="programlisting">typedef struct {
gchar version[8]; /* version number */
guint32 flags; /* flags for file */
guint32 block_size; /* block size of this file */
camel_block_t free; /* free block list */
camel_block_t last; /* pointer to end of blocks */
/* subclasses tack on, but no more than CAMEL_BLOCK_SIZE! */
} CamelBlockRoot;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CamelBlock">
<a name="CamelBlock"></a><h3>CamelBlock</h3>
<pre class="programlisting">typedef struct {
struct _CamelBlock *next;
struct _CamelBlock *prev;
camel_block_t id;
guint32 flags;
guint32 refcount;
guint32 align00;
guchar data[CAMEL_BLOCK_SIZE];
} CamelBlock;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CamelBlockFile">
<a name="CamelBlockFile"></a><h3>CamelBlockFile</h3>
<pre class="programlisting">typedef struct {
CamelObject parent;
struct _CamelBlockFilePrivate *priv;
gchar version[8];
gchar *path;
gint flags;
gint fd;
gsize block_size;
CamelBlockRoot *root;
CamelBlock *root_block;
/* make private? */
gint block_cache_limit;
gint block_cache_count;
CamelDList block_cache;
GHashTable *blocks;
} CamelBlockFile;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CAMEL_BLOCK_FILE_SYNC">
<a name="CAMEL-BLOCK-FILE-SYNC--CAPS"></a><h3>CAMEL_BLOCK_FILE_SYNC</h3>
<pre class="programlisting">#define CAMEL_BLOCK_FILE_SYNC (1<<0)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CAMEL_BLOCK_SIZE">
<a name="CAMEL-BLOCK-SIZE--CAPS"></a><h3>CAMEL_BLOCK_SIZE</h3>
<pre class="programlisting">#define CAMEL_BLOCK_SIZE (1024)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CAMEL_BLOCK_SIZE_BITS">
<a name="CAMEL-BLOCK-SIZE-BITS--CAPS"></a><h3>CAMEL_BLOCK_SIZE_BITS</h3>
<pre class="programlisting">#define CAMEL_BLOCK_SIZE_BITS (10) /* # bits to contain block_size bytes */
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CAMEL_BLOCK_DIRTY">
<a name="CAMEL-BLOCK-DIRTY--CAPS"></a><h3>CAMEL_BLOCK_DIRTY</h3>
<pre class="programlisting">#define CAMEL_BLOCK_DIRTY (1<<0)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="CAMEL_BLOCK_DETACHED">
<a name="CAMEL-BLOCK-DETACHED--CAPS"></a><h3>CAMEL_BLOCK_DETACHED</h3>
<pre class="programlisting">#define CAMEL_BLOCK_DETACHED (1<<1)
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="camel_block_file_new ()">
<a name="camel-block-file-new"></a><h3>camel_block_file_new ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> * camel_block_file_new (const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> flags,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> version[8],
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> block_size);</pre>
<p>
Allocate a new block file, stored at <em class="parameter"><code>path</code></em>. <em class="parameter"><code>version</code></em> contains an 8 character
version string which must match the head of the file, or the file will be
intitialised.
</p>
<p>
<em class="parameter"><code>block_size</code></em> is currently ignored and is set to CAMEL_BLOCK_SIZE.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>
@:
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>block_size</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The new block file, or NULL if it could not be created.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_rename ()">
<a name="camel-block-file-rename"></a><h3>camel_block_file_rename ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_block_file_rename (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_delete ()">
<a name="camel-block-file-delete"></a><h3>camel_block_file_delete ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_block_file_delete (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *kf);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>kf</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_new_block ()">
<a name="camel-block-file-new-block"></a><h3>camel_block_file_new_block ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> * camel_block_file_new_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs);</pre>
<p>
Allocate a new block, return a pointer to it. Old blocks
may be flushed to disk during this call.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The block, or NULL if an error occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_free_block ()">
<a name="camel-block-file-free-block"></a><h3>camel_block_file_free_block ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_block_file_free_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> id);</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_get_block ()">
<a name="camel-block-file-get-block"></a><h3>camel_block_file_get_block ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> * camel_block_file_get_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> id);</pre>
<p>
Retreive a block <em class="parameter"><code>id</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The block, or NULL if blockid is invalid or a file error
occured.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_detach_block ()">
<a name="camel-block-file-detach-block"></a><h3>camel_block_file_detach_block ()</h3>
<pre class="programlisting">void camel_block_file_detach_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);</pre>
<p>
Detatch a block from the block file's cache. The block should
be unref'd or attached when finished with. The block file will
perform no writes of this block or flushing of it if the cache
fills.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bl</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_attach_block ()">
<a name="camel-block-file-attach-block"></a><h3>camel_block_file_attach_block ()</h3>
<pre class="programlisting">void camel_block_file_attach_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);</pre>
<p>
Reattach a block that has been detached.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bl</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_touch_block ()">
<a name="camel-block-file-touch-block"></a><h3>camel_block_file_touch_block ()</h3>
<pre class="programlisting">void camel_block_file_touch_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);</pre>
<p>
Mark a block as dirty. The block will be written to disk if
it ever expires from the cache.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bl</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_unref_block ()">
<a name="camel-block-file-unref-block"></a><h3>camel_block_file_unref_block ()</h3>
<pre class="programlisting">void camel_block_file_unref_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);</pre>
<p>
Mark a block as unused. If a block is used it will not be
written to disk, or flushed from memory.
</p>
<p>
If a block is detatched and this is the last reference, the
block will be freed.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bl</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_sync_block ()">
<a name="camel-block-file-sync-block"></a><h3>camel_block_file_sync_block ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_block_file_sync_block (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs,
<a class="link" href="camel-CamelKeyFile.html#CamelBlock" title="CamelBlock">CamelBlock</a> *bl);</pre>
<p>
Flush a block to disk immediately. The block will only
be flushed to disk if it is marked as dirty (touched).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>bl</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> -1 on io error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_block_file_sync ()">
<a name="camel-block-file-sync"></a><h3>camel_block_file_sync ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_block_file_sync (<a class="link" href="camel-CamelKeyFile.html#CamelBlockFile" title="CamelBlockFile">CamelBlockFile</a> *bs);</pre>
<p>
Sync all dirty blocks to disk, including the root block.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bs</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> -1 on io error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="CamelKeyFile">
<a name="CamelKeyFile"></a><h3>CamelKeyFile</h3>
<pre class="programlisting">typedef struct {
CamelObject parent;
struct _CamelKeyFilePrivate *priv;
FILE *fp;
gchar *path;
gint flags;
off_t last;
} CamelKeyFile;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="camel_key_file_new ()">
<a name="camel-key-file-new"></a><h3>camel_key_file_new ()</h3>
<pre class="programlisting"><a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> * camel_key_file_new (const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> flags,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> version[8]);</pre>
<p>
Create a new key file. A linked list of record blocks.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td> open flags
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>version</code></em> :</span></p></td>
<td> Version string (header) of file. Currently
written but not checked.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new key file, or NULL if the file could not
be opened/created/initialised.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_key_file_rename ()">
<a name="camel-key-file-rename"></a><h3>camel_key_file_rename ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_key_file_rename (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
const <a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
>gchar</a> *path);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>kf</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_key_file_delete ()">
<a name="camel-key-file-delete"></a><h3>camel_key_file_delete ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_key_file_delete (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>kf</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_key_file_write ()">
<a name="camel-key-file-write"></a><h3>camel_key_file_write ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_key_file_write (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> *parent,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> len,
<a class="link" href="camel-CamelKeyFile.html#camel-key-t" title="camel_key_t">camel_key_t</a> *records);</pre>
<p>
Write a new list of records to the key file.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>kf</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>records</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> -1 on io error. The key file will remain unchanged.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="camel_key_file_read ()">
<a name="camel-key-file-read"></a><h3>camel_key_file_read ()</h3>
<pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
>gint</a> camel_key_file_read (<a class="link" href="camel-CamelKeyFile.html#CamelKeyFile" title="CamelKeyFile">CamelKeyFile</a> *kf,
<a class="link" href="camel-CamelKeyFile.html#camel-block-t" title="camel_block_t">camel_block_t</a> *start,
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"
>gsize</a> *len,
<a class="link" href="camel-CamelKeyFile.html#camel-key-t" title="camel_key_t">camel_key_t</a> **records);</pre>
<p>
Read the next block of data from the key file. Returns the number of
records.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>kf</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start</code></em> :</span></p></td>
<td> The record pointer. This will be set to the next record pointer on success.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td> Number of records read, if != NULL.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>records</code></em> :</span></p></td>
<td> Records, allocated, must be freed with g_free, if != NULL.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> -1 on io error.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.11</div>
</body>
</html>