CamelIndex

## CamelIndex CamelIndex |

## Synopsis

    struct              CamelIndex;
    gchar *             (*CamelIndexNorm)                   (CamelIndex *index,
                                                             const gchar *word,
                                                             gpointer data);
    struct              CamelIndexCursor;
    CamelIndexCursor *  camel_index_cursor_new              (CamelIndex *index,
                                                             const gchar *name);
    const gchar *       camel_index_cursor_next             (CamelIndexCursor *idc);
    void                camel_index_cursor_reset            (CamelIndexCursor *idc);
    struct              CamelIndexName;
    CamelIndexName *    camel_index_name_new                (CamelIndex *index,
                                                             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 *index,
                                                             const gchar *path,
                                                             gint flags);
    gint                camel_index_rename                  (CamelIndex *index,
                                                             const gchar *path);
    void                camel_index_set_normalize           (CamelIndex *index,
                                                             CamelIndexNorm func,
                                                             gpointer data);
    gint                camel_index_sync                    (CamelIndex *index);
    gint                camel_index_compress                (CamelIndex *index);
    gint                camel_index_delete                  (CamelIndex *index);
    gint                camel_index_has_name                (CamelIndex *index,
                                                             const gchar *name);
    CamelIndexName *    camel_index_add_name                (CamelIndex *index,
                                                             const gchar *name);
    gint                camel_index_write_name              (CamelIndex *index,
                                                             CamelIndexName *idn);
    CamelIndexCursor *  camel_index_find_name               (CamelIndex *index,
                                                             const gchar *name);
    void                camel_index_delete_name             (CamelIndex *index,
                                                             const gchar *name);
    CamelIndexCursor *  camel_index_find                    (CamelIndex *index,
                                                             const gchar *word);
    CamelIndexCursor *  camel_index_words                   (CamelIndex *index);
    CamelIndexCursor *  camel_index_names                   (CamelIndex *index);

## Object Hierarchy

      GObject
       +----CamelObject
             +----CamelIndex
                   +----CamelTextIndex

      GObject
       +----CamelObject
             +----CamelIndexCursor
                   +----CamelTextIndexCursor
                   +----CamelTextIndexKeyCursor

      GObject
       +----CamelObject
             +----CamelIndexName
                   +----CamelTextIndexName

## Description

## Details

### struct CamelIndex

    struct CamelIndex;

### CamelIndexNorm ()

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

### struct CamelIndexCursor

    struct CamelIndexCursor;

### camel_index_cursor_new ()

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

### camel_index_cursor_next ()

    const gchar *       camel_index_cursor_next             (CamelIndexCursor *idc);

### camel_index_cursor_reset ()

    void                camel_index_cursor_reset            (CamelIndexCursor *idc);

### struct CamelIndexName

    struct CamelIndexName;

### camel_index_name_new ()

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

### camel_index_name_add_word ()

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

### camel_index_name_add_buffer ()

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

### CAMEL_INDEX_DELETED

    #define CAMEL_INDEX_DELETED (1 << 0)

### camel_index_new ()

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

### camel_index_construct ()

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

### camel_index_rename ()

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

### camel_index_set_normalize ()

    void                camel_index_set_normalize           (CamelIndex *index,
                                                             CamelIndexNorm func,
                                                             gpointer data);

`func` : | normalization function
`data` : | user data for `func`

Since 2.32

### camel_index_sync ()

    gint                camel_index_sync                    (CamelIndex *index);

### camel_index_compress ()

    gint                camel_index_compress                (CamelIndex *index);

### camel_index_delete ()

    gint                camel_index_delete                  (CamelIndex *index);

### camel_index_has_name ()

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

### camel_index_add_name ()

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

### camel_index_write_name ()

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

### camel_index_find_name ()

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

### camel_index_delete_name ()

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

### camel_index_find ()

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

### camel_index_words ()

    CamelIndexCursor *  camel_index_words                   (CamelIndex *index);

### camel_index_names ()

    CamelIndexCursor *  camel_index_names                   (CamelIndex *index);