CamelVeeDataCache: Camel Reference Manual

## CamelVeeDataCache CamelVeeDataCache |

## Functions

void | (*CamelForeachInfoData) ()
CamelVeeSubfolderData * | camel_vee_subfolder_data_new ()
CamelFolder * | camel_vee_subfolder_data_get_folder ()
const gchar * | camel_vee_subfolder_data_get_folder_id ()
CamelVeeMessageInfoData * | camel_vee_message_info_data_new ()
CamelVeeSubfolderData * | camel_vee_message_info_data_get_subfolder_data ()
const gchar * | camel_vee_message_info_data_get_orig_message_uid ()
const gchar * | camel_vee_message_info_data_get_vee_message_uid ()
CamelVeeDataCache * | camel_vee_data_cache_new ()
void | camel_vee_data_cache_add_subfolder ()
void | camel_vee_data_cache_remove_subfolder ()
CamelVeeSubfolderData * | camel_vee_data_cache_get_subfolder_data ()
gboolean | camel_vee_data_cache_contains_message_info_data ()
CamelVeeMessageInfoData * | camel_vee_data_cache_get_message_info_data ()
CamelVeeMessageInfoData * | camel_vee_data_cache_get_message_info_data_by_vuid ()
void | camel_vee_data_cache_foreach_message_info_data ()
void | camel_vee_data_cache_remove_message_info_data ()

## Types and Values

struct | CamelVeeSubfolderData
struct | CamelVeeMessageInfoData
struct | CamelVeeDataCache

## Description

## Functions

### CamelForeachInfoData ()

    void
    (*CamelForeachInfoData) (CamelVeeMessageInfoData *mi_data,
                             CamelFolder *subfolder,
                             gpointer user_data);

A callback prototype for `camel_vee_data_cache_foreach_message_info_data()`

#### Parameters

mi_data | a CamelVeeMessageInfoData |
subfolder | a CamelFolder which `mi_data` references |
user_data | custom user data |

### camel_vee_subfolder_data_new ()

    CamelVeeSubfolderData *
    camel_vee_subfolder_data_new (CamelFolder *folder);

Creates a new CamelVeeSubfolderData object for the given `folder` . The `folder` is referenced for later use.

#### Parameters

folder | a CamelFolder for which create the object |

#### Returns

a new CamelVeeSubfolderData. Use `g_object_unref()` to unref it, when no longer needed.

[transfer full]

Since: 3.6

### camel_vee_subfolder_data_get_folder ()

    CamelFolder *
    camel_vee_subfolder_data_get_folder (CamelVeeSubfolderData *data);

#### Parameters

data | a CamelVeeSubfolderData |

#### Returns

a CamelFolder to which this `data` was created.

[transfer none]

Since: 3.6

### camel_vee_subfolder_data_get_folder_id ()

    const gchar *
    camel_vee_subfolder_data_get_folder_id
                                   (CamelVeeSubfolderData *data);

#### Parameters

data | a CamelVeeSubfolderData |

#### Returns

a folder ID for this subfolder `data` .

[transfer none]

Since: 3.6

### camel_vee_message_info_data_new ()

    CamelVeeMessageInfoData *
    camel_vee_message_info_data_new (CamelVeeSubfolderData *subfolder_data,
                                     const gchar *orig_message_uid);

#### Parameters

subfolder_data | a CamelVeeSubfolderData |
orig_message_uid | original message info's UID |

#### Returns

a new CamelVeeMessageInfoData which references message info with UID `orig_message_uid` froma folder managed by `subfolder_data` . Unref the returned object with `g_object_unref()`, when no longer needed.

[transfer full]

Since: 3.6

### camel_vee_message_info_data_get_subfolder_data ()

    CamelVeeSubfolderData *
    camel_vee_message_info_data_get_subfolder_data
                                   (CamelVeeMessageInfoData *data);

#### Parameters

data | a CamelVeeMessageInfoData |

#### Returns

A CamelVeeSubfolderData for which the `data` had been created.

[transfer none]

Since: 3.6

### camel_vee_message_info_data_get_orig_message_uid ()

    const gchar *
    camel_vee_message_info_data_get_orig_message_uid
                                   (CamelVeeMessageInfoData *data);

#### Parameters

data | a CamelVeeMessageInfoData |

#### Returns

The original message info's UID, for which the `data` had been created.

[transfer none]

Since: 3.6

### camel_vee_message_info_data_get_vee_message_uid ()

    const gchar *
    camel_vee_message_info_data_get_vee_message_uid
                                   (CamelVeeMessageInfoData *data);

#### Parameters

data | a CamelVeeMessageInfoData |

#### Returns

Message UID corresponding to this virtual message info `data` .

[transfer none]

Since: 3.6

### camel_vee_data_cache_new ()

    CamelVeeDataCache *
    camel_vee_data_cache_new (void);

#### Returns

a new CamelVeeDataCache; unref it with `g_object_unref()`, when no longer needed.

[transfer full]

Since: 3.6

### camel_vee_data_cache_add_subfolder ()

    void
    camel_vee_data_cache_add_subfolder (CamelVeeDataCache *data_cache,
                                        CamelFolder *subfolder);

Adds the `subfolder` to the `data_cache` to be tracked by it. The `subfolder` is referenced for later use. The function does nothing when the `subfolder` is already in the `data_cache` . The subfolders can be removed with `camel_vee_data_cache_remove_subfolder()`.

#### Parameters

data_cache | a CamelVeeDataCache |
subfolder | a CamelFolder |

Since: 3.6

### camel_vee_data_cache_remove_subfolder ()

    void
    camel_vee_data_cache_remove_subfolder (CamelVeeDataCache *data_cache,
                                           CamelFolder *subfolder);

Removes given `subfolder` from the `data_cache` , which had been previously added with `camel_vee_data_cache_add_subfolder()`. The function does nothing, when the `subfolder` is not part of the `data_cache` .

#### Parameters

data_cache | a CamelVeeDataCache |
subfolder | a CamelFolder to remove |

Since: 3.6

### camel_vee_data_cache_get_subfolder_data ()

    CamelVeeSubfolderData *
    camel_vee_data_cache_get_subfolder_data
                                   (CamelVeeDataCache *data_cache,
                                    CamelFolder *folder);

Returns a CamelVeeSubfolderData for the given `folder` .

#### Parameters

data_cache | a CamelVeeDataCache |
folder | a CamelFolder for which to return subfolder data |

#### Returns

a referenced CamelVeeSubfolderData; unref it with `g_object_unref()`, when no longer needed.

[transfer full]

Since: 3.6

### camel_vee_data_cache_contains_message_info_data ()

    gboolean
    camel_vee_data_cache_contains_message_info_data
                                   (CamelVeeDataCache *data_cache,
                                    CamelFolder *folder,
                                    const gchar *orig_message_uid);

Returns whether data_cache contains given `orig_message_uid` for the given `folder` . Unlike `camel_vee_data_cache_get_message_info_data()`, this only returns `FALSE` if not, while `camel_vee_data_cache_get_message_info_data()` auto-adds it to data_cache.

#### Parameters

data_cache | a CamelVeeDataCache |
folder | a CamelFolder to which the `orig_message_uid` belongs |
orig_message_uid | a message UID from the `folder` to check |

Since: 3.6

### camel_vee_data_cache_get_message_info_data ()

    CamelVeeMessageInfoData *
    camel_vee_data_cache_get_message_info_data
                                   (CamelVeeDataCache *data_cache,
                                    CamelFolder *folder,
                                    const gchar *orig_message_uid);

Returns a referenced CamelVeeMessageInfoData referencing the given `folder` and `orig_message_uid` . If it's not part of the `data_cache` , then it is created and auto-added. Use `camel_vee_data_cache_contains_message_info_data()` when you only want to check the existence, without adding it to the `data_cache` .

#### Parameters

data_cache | a CamelVeeDataCache |
folder | a CamelFolder to which the `orig_message_uid` belongs |
orig_message_uid | a message UID from the `folder` to return |

#### Returns

a referenced CamelVeeMessageInfoData; unref it with `g_object_unref()`, when no longer needed.

[transfer full]

Since: 3.6

### camel_vee_data_cache_get_message_info_data_by_vuid ()

    CamelVeeMessageInfoData *
    camel_vee_data_cache_get_message_info_data_by_vuid
                                   (CamelVeeDataCache *data_cache,
                                    const gchar *vee_message_uid);

#### Parameters

data_cache | a CamelVeeDataCache |
vee_message_uid | a message UID in the virtual folder |

#### Returns

a referenced CamelVeeMessageInfoData, which corresponds to the given `vee_message_uid` , or `NULL`, when no such message info with that virtual UID exists. Unref it with `g_object_unref()`, when no longer needed.

[transfer full][nullable]

Since: 3.6

### camel_vee_data_cache_foreach_message_info_data ()

    void
    camel_vee_data_cache_foreach_message_info_data
                                   (CamelVeeDataCache *data_cache,
                                    CamelFolder *fromfolder,
                                    CamelForeachInfoData func,
                                    gpointer user_data);

Calls the `func` for each message info data from the given `fromfolder`

#### Parameters

data_cache | a CamelVeeDataCache |
fromfolder | a CamelFolder |
func | a CamelForeachInfoData function to call. | [scope call][closure user_data]
user_data | user data to pass to the `func` |

Since: 3.6

### camel_vee_data_cache_remove_message_info_data ()

    void
    camel_vee_data_cache_remove_message_info_data
                                   (CamelVeeDataCache *data_cache,
                                    CamelVeeMessageInfoData *mi_data);

Removes given `mi_data` from the `data_cache` .

#### Parameters

data_cache | a CamelVeeDataCache |
mi_data | a CamelVeeMessageInfoData to remove |

Since: 3.6

## Types and Values

### struct CamelVeeSubfolderData

    struct CamelVeeSubfolderData {
    };

Contains only private data that should be read and manipulated using the functions below.

Since: 3.6

### struct CamelVeeMessageInfoData

    struct CamelVeeMessageInfoData {
    };

Contains only private data that should be read and manipulated using the functions below.

Since: 3.6

### struct CamelVeeDataCache

    struct CamelVeeDataCache {
    };

Contains only private data that should be read and manipulated using the functions below.

Since: 3.6