## CamelIndex CamelIndex |

## Synopsis

                        CamelIndex;
    gchar *             (*CamelIndexNorm)                   (CamelIndex *idx,
                                                             const gchar *word,
                                                             gpointer data);
                        CamelIndexCursor;
    CamelIndexCursor *  camel_index_cursor_new              (CamelIndex *idx,
                                                             const gchar *name);
    const gchar *       camel_index_cursor_next             (CamelIndexCursor *idc);
    void                camel_index_cursor_reset            (CamelIndexCursor *idc);
                        CamelIndexName;
    CamelIndexName *    camel_index_name_new                (CamelIndex *idx,
                                                             const gchar *name);
    void                camel_index_name_add_word           (CamelIndexName *name,
                                                             const gchar *word);
    gsize               camel_index_name_add_buffer         (CamelIndexName *name,
                                                             const gchar *buffer,
                                                             gsize len);
    #define             CAMEL_INDEX_DELETED
    CamelIndex *        camel_index_new                     (const gchar *path,
                                                             gint flags);
    void                camel_index_construct               (CamelIndex *Param1,
                                                             const gchar *path,
                                                             gint flags);
    gint                camel_index_rename                  (CamelIndex *Param1,
                                                             const gchar *path);
    void                camel_index_set_normalise           (CamelIndex *idx,
                                                             CamelIndexNorm func,
                                                             gpointer data);
    gint                camel_index_sync                    (CamelIndex *idx);
    gint                camel_index_compress                (CamelIndex *idx);
    gint                camel_index_delete                  (CamelIndex *idx);
    gint                camel_index_has_name                (CamelIndex *idx,
                                                             const gchar *name);
    CamelIndexName *    camel_index_add_name                (CamelIndex *idx,
                                                             const gchar *name);
    gint                camel_index_write_name              (CamelIndex *idx,
                                                             CamelIndexName *idn);
    CamelIndexCursor *  camel_index_find_name               (CamelIndex *idx,
                                                             const gchar *name);
    void                camel_index_delete_name             (CamelIndex *idx,
                                                             const gchar *name);
    CamelIndexCursor *  camel_index_find                    (CamelIndex *idx,
                                                             const gchar *word);
    CamelIndexCursor *  camel_index_words                   (CamelIndex *idx);
    CamelIndexCursor *  camel_index_names                   (CamelIndex *idx);

## Description

## Details

### CamelIndex

    typedef struct {
    	CamelObject parent;

    	struct _CamelIndexPrivate *priv;

    	gchar *path;
    	guint32 version;
    	guint32 flags;		/* open flags */
    	guint32 state;

    	CamelIndexNorm normalise;
    	gpointer normalise_data;
    } CamelIndex;

### CamelIndexNorm ()

    gchar *             (*CamelIndexNorm)                   (CamelIndex *idx,
                                                             const gchar *word,
                                                             gpointer data);

`idx` : |
`word` : |
`data` : |
Returns : |

### CamelIndexCursor

    typedef struct {
    	CamelObject parent;

    	struct _CamelIndexCursorPrivate *priv;

    	CamelIndex *index;
    } CamelIndexCursor;

### camel_index_cursor_new ()

    CamelIndexCursor *  camel_index_cursor_new              (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |
Returns : |

### camel_index_cursor_next ()

    const gchar *       camel_index_cursor_next             (CamelIndexCursor *idc);

`idc` : |
Returns : |

### camel_index_cursor_reset ()

    void                camel_index_cursor_reset            (CamelIndexCursor *idc);

`idc` : |

### CamelIndexName

    typedef struct {
    	CamelObject parent;

    	struct _CamelIndexNamePrivate *priv;

    	CamelIndex *index;

    	gchar *name;		/* name being indexed */

    	GByteArray *buffer; /* used for normalisation */
    	GHashTable *words; /* unique list of words */
    } CamelIndexName;

### camel_index_name_new ()

    CamelIndexName *    camel_index_name_new                (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |
Returns : |

### camel_index_name_add_word ()

    void                camel_index_name_add_word           (CamelIndexName *name,
                                                             const gchar *word);

`name` : |
`word` : |

### camel_index_name_add_buffer ()

    gsize               camel_index_name_add_buffer         (CamelIndexName *name,
                                                             const gchar *buffer,
                                                             gsize len);

`name` : |
`buffer` : |
`len` : |
Returns : |

### CAMEL_INDEX_DELETED

    #define CAMEL_INDEX_DELETED (1<<0)

### camel_index_new ()

    CamelIndex *        camel_index_new                     (const gchar *path,
                                                             gint flags);

`path` : |
`flags` : |
Returns : |

### camel_index_construct ()

    void                camel_index_construct               (CamelIndex *Param1,
                                                             const gchar *path,
                                                             gint flags);

`Param1` : |
`path` : |
`flags` : |

### camel_index_rename ()

    gint                camel_index_rename                  (CamelIndex *Param1,
                                                             const gchar *path);

`Param1` : |
`path` : |
Returns : |

### camel_index_set_normalise ()

    void                camel_index_set_normalise           (CamelIndex *idx,
                                                             CamelIndexNorm func,
                                                             gpointer data);

`idx` : |
`func` : |
`data` : |

### camel_index_sync ()

    gint                camel_index_sync                    (CamelIndex *idx);

`idx` : |
Returns : |

### camel_index_compress ()

    gint                camel_index_compress                (CamelIndex *idx);

`idx` : |
Returns : |

### camel_index_delete ()

    gint                camel_index_delete                  (CamelIndex *idx);

`idx` : |
Returns : |

### camel_index_has_name ()

    gint                camel_index_has_name                (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |
Returns : |

### camel_index_add_name ()

    CamelIndexName *    camel_index_add_name                (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |
Returns : |

### camel_index_write_name ()

    gint                camel_index_write_name              (CamelIndex *idx,
                                                             CamelIndexName *idn);

`idx` : |
`idn` : |
Returns : |

### camel_index_find_name ()

    CamelIndexCursor *  camel_index_find_name               (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |
Returns : |

### camel_index_delete_name ()

    void                camel_index_delete_name             (CamelIndex *idx,
                                                             const gchar *name);

`idx` : |
`name` : |

### camel_index_find ()

    CamelIndexCursor *  camel_index_find                    (CamelIndex *idx,
                                                             const gchar *word);

`idx` : |
`word` : |
Returns : |

### camel_index_words ()

    CamelIndexCursor *  camel_index_words                   (CamelIndex *idx);

`idx` : |
Returns : |

### camel_index_names ()

    CamelIndexCursor *  camel_index_names                   (CamelIndex *idx);

`idx` : |
Returns : |