## CamelIndex

CamelIndex

## Functions

gchar * | (*CamelIndexNorm) ()
const gchar * | camel_index_cursor_next ()
void | camel_index_name_add_word ()
gsize | camel_index_name_add_buffer ()
void | camel_index_construct ()
gint | camel_index_rename ()
void | camel_index_set_normalize ()
gint | camel_index_sync ()
gint | camel_index_compress ()
gint | camel_index_delete ()
gint | camel_index_has_name ()
CamelIndexName * | camel_index_add_name ()
gint | camel_index_write_name ()
CamelIndexCursor * | camel_index_find_name ()
void | camel_index_delete_name ()
CamelIndexCursor * | camel_index_find ()
CamelIndexCursor * | camel_index_words ()

## Types and Values

#define | CAMEL_INDEX_DELETED

## Object Hierarchy

        GObject
        ├── CamelIndex
        │   ╰── CamelTextIndex
        ├── CamelIndexCursor
        │   ├── CamelTextIndexCursor
        │   ╰── CamelTextIndexKeyCursor
        ╰── CamelIndexName
            ╰── CamelTextIndexName

## Description

## Functions

### CamelIndexNorm ()

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

### camel_index_cursor_next ()

    const gchar *
    camel_index_cursor_next (CamelIndexCursor *idc);

### 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_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 user_data);

#### Parameters

index | a CamelIndex |
func | normalization function. | [scope call]
user_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);

#### Parameters

index | a CamelIndex |
name | a name to add |

#### Returns

a CamelIndexName with added given `name` , or `NULL`, when the `name` could not be added.

[transfer none][nullable]

### 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);

#### Parameters

index | a CamelIndex |
name | a name to find |

#### Returns

a CamelIndexCursor with the given `name` , or `NULL`< when not found.

[transfer none][nullable]

### camel_index_delete_name ()

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

Deletes the given `name` from `index` .

#### Parameters

index | a CamelIndex |
name | a name to delete |

### camel_index_find ()

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

#### Parameters

index | a CamelIndex |
word | a word to find |

#### Returns

a CamelIndexCursor object with the given `word` , or `NULL`, when not found.

[transfer none][nullable]

### camel_index_words ()

    CamelIndexCursor *
    camel_index_words (CamelIndex *index);

#### Parameters

index | a CamelIndex |

#### Returns

a CamelIndexCursor containing all words of the `index` , or `NULL`, when there are none.

[transfer none][nullable]

## Types and Values

### CAMEL_INDEX_DELETED

    #define CAMEL_INDEX_DELETED (1 << 0)