## CamelVeeFolder CamelVeeFolder |

## Functions

CamelFolder * | camel_vee_folder_new ()
void | camel_vee_folder_construct ()
guint32 | camel_vee_folder_get_flags ()
CamelFolder * | camel_vee_folder_get_location ()
CamelFolder * | camel_vee_folder_get_vee_uid_folder ()
void | camel_vee_folder_set_auto_update ()
gboolean | camel_vee_folder_get_auto_update ()
void | camel_vee_folder_add_folder ()
void | camel_vee_folder_remove_folder ()
void | camel_vee_folder_set_folders ()
GList * | camel_vee_folder_ref_folders ()
void | camel_vee_folder_add_vuid ()
void | camel_vee_folder_remove_vuid ()
void | camel_vee_folder_rebuild_folder ()
void | camel_vee_folder_set_expression ()
const gchar * | camel_vee_folder_get_expression ()
void | camel_vee_folder_ignore_next_changed_event ()
void | camel_vee_folder_remove_from_ignore_changed_event ()
void | camel_vee_folder_propagate_skipped_changes ()

## Properties

gboolean | auto-update | Read / Write

## Types and Values

#define | CAMEL_UNMATCHED_NAME

## Object Hierarchy

        GObject
        ╰── CamelObject
            ╰── CamelFolder
                ╰── CamelVeeFolder
                    ╰── CamelVTrashFolder

## Description

## Functions

### camel_vee_folder_new ()

    CamelFolder *
    camel_vee_folder_new (CamelStore *parent_store,
                          const gchar *full,
                          guint32 flags);

#### Parameters

parent_store | the parent CamelVeeStore |
full | the full path to the vfolder. |
flags | flags of some kind |

#### Returns

A new `CamelVeeFolder` object. Unref it with `g_object_unref()` when no longer needed.

[transfer full]

### camel_vee_folder_construct ()

    void
    camel_vee_folder_construct (CamelVeeFolder *vf,
                                guint32 flags);

Initializes internal structures of the `vf` . This is meant to be called by the descendants of CamelVeeFolder.

#### Parameters

vf | a CamelVeeFolder |
flags | flags for the `vf` |

### camel_vee_folder_get_flags ()

    guint32
    camel_vee_folder_get_flags (CamelVeeFolder *vf);

#### Parameters

vf | a CamelVeeFolder |

#### Returns

flags of `vf` , as set by `camel_vee_folder_construct()`

Since: 3.24

### camel_vee_folder_get_location ()

    CamelFolder *
    camel_vee_folder_get_location (CamelVeeFolder *vf,
                                   const CamelVeeMessageInfo *vinfo,
                                   gchar **realuid);

Find the real folder (and message info UID) for the given `vinfo` . When the `realuid` is not `NULL` and it's set, then use `g_free()` to free it, when no longer needed.

#### Parameters

vf | a CamelVeeFolder |
vinfo | a CamelVeeMessageInfo to search for |
realuid | if not `NULL`, set to the UID of the real message info. | [out][transfer full][nullable]

#### Returns

a real (not virtual) CamelFolder, which the `vinfo` is for.

[transfer none]

### camel_vee_folder_get_vee_uid_folder ()

    CamelFolder *
    camel_vee_folder_get_vee_uid_folder (CamelVeeFolder *vfolder,
                                         const gchar *vee_message_uid);

#### Parameters

vfolder | a CamelVeeFolder |
vee_message_uid | a virtual message info UID |

#### Returns

a CamelFolder to which the `vee_message_uid` belongs, or `NULL`, when it could not be found.

[transfer none][nullable]

Since: 3.6

### camel_vee_folder_set_auto_update ()

    void
    camel_vee_folder_set_auto_update (CamelVeeFolder *vfolder,
                                      gboolean auto_update);

Sets whether the `vfolder` can automatically update when of its subfolders changes.

#### Parameters

vfolder | a CamelVeeFolder |
auto_update | a value to set |

Since: 3.6

### camel_vee_folder_get_auto_update ()

    gboolean
    camel_vee_folder_get_auto_update (CamelVeeFolder *vfolder);

#### Parameters

vfolder | a CamelVeeFolder |

#### Returns

whether the `vfolder` can automatically update when any of its subfolders changes.

Since: 3.6

### camel_vee_folder_add_folder ()

    void
    camel_vee_folder_add_folder (CamelVeeFolder *vfolder,
                                 CamelFolder *subfolder,
                                 GCancellable *cancellable);

Adds `subfolder` as a source folder to `vfolder` .

#### Parameters

vfolder | a CamelVeeFolder |
subfolder | source CamelFolder to add to `vfolder` |
cancellable | optional GCancellable object, or `NULL` |

### camel_vee_folder_remove_folder ()

    void
    camel_vee_folder_remove_folder (CamelVeeFolder *vfolder,
                                    CamelFolder *subfolder,
                                    GCancellable *cancellable);

Removed the source folder, `subfolder` , from the virtual folder, `vfolder` .

#### Parameters

vfolder | a CamelVeeFolder |
subfolder | source CamelFolder to remove from `vfolder` |
cancellable | optional GCancellable object, or `NULL` |

### camel_vee_folder_set_folders ()

    void
    camel_vee_folder_set_folders (CamelVeeFolder *vfolder,
                                  GList *folders,
                                  GCancellable *cancellable);

Set the whole list of folder sources on a vee folder.

#### Parameters

vfolder | a CamelVeeFolder |
folders | a GList of CamelFolder to add. | [element-type CamelFolder][transfer none]
cancellable | optional GCancellable object, or `NULL` |

### camel_vee_folder_ref_folders ()

    GList *
    camel_vee_folder_ref_folders (CamelVeeFolder *vfolder);

Returns a GList of all folders of this `vfolder` , which are used to populate it. These are in no particular order.

Free the returned GList with g_list_free_full (folders, g_object_unref); when no longer needed.

#### Parameters

vfolder | a CamelVeeFolder |

#### Returns

a GList of all folders of this `vfolder` .

[transfer full][element-type CamelFolder]

Since: 3.28

### camel_vee_folder_add_vuid ()

    void
    camel_vee_folder_add_vuid (CamelVeeFolder *vfolder,
                               struct _CamelVeeMessageInfoData *mi_data,
                               CamelFolderChangeInfo *changes);

Adds the `mi_data` to the `vfolder` . The `changes` can be updated with the made change and later used to notify others with `camel_folder_changed()` on the `vfolder` . This can be used only for the Unmatched folder.

#### Parameters

vfolder | a CamelVeeFolder |
mi_data | a CamelVeeMessageInfoData to add |
changes | an optional CamelFolderChangeInfo to update with the made change, or `NULL`. | [nullable]

Since: 3.6

### camel_vee_folder_remove_vuid ()

    void
    camel_vee_folder_remove_vuid (CamelVeeFolder *vfolder,
                                  struct _CamelVeeMessageInfoData *mi_data,
                                  CamelFolderChangeInfo *changes);

Removes given `mi_data` from the `vfolder` . The `changes` can be updated with the made change and later used to notify others with `camel_folder_changed()` on the `vfolder` . This can be used only for the Unmatched folder.

#### Parameters

vfolder | a CamelVeeFolder |
mi_data | a CamelVeeMessageInfoData to remove |
changes | an optional CamelFolderChangeInfo to update with the made change, or `NULL`. | [nullable]

Since: 3.6

### camel_vee_folder_rebuild_folder ()

    void
    camel_vee_folder_rebuild_folder (CamelVeeFolder *vfolder,
                                     CamelFolder *subfolder,
                                     GCancellable *cancellable);

Rebuild the folder `subfolder` , if it should be.

#### Parameters

vfolder | a CamelVeeFolder |
subfolder | source CamelFolder to add to `vfolder` |
cancellable | optional GCancellable object, or `NULL` |

### camel_vee_folder_set_expression ()

    void
    camel_vee_folder_set_expression (CamelVeeFolder *vfolder,
                                     const gchar *expression);

Sets an SExp expression to be used for this `vfolder`

#### Parameters

vfolder | a CamelVeeFolder |
expression | an SExp expression to set |

Since: 3.6

### camel_vee_folder_get_expression ()

    const gchar *
    camel_vee_folder_get_expression (CamelVeeFolder *vfolder);

#### Parameters

vfolder | a CamelVeeFolder |

#### Returns

a SExp expression used for this `vfolder` .

[transfer none]

Since: 3.6

### camel_vee_folder_ignore_next_changed_event ()

    void
    camel_vee_folder_ignore_next_changed_event
                                   (CamelVeeFolder *vfolder,
                                    CamelFolder *subfolder);

The next `subfolder` -'s 'changed' event will be silently ignored. This is usually used in virtual folders when the change was done in them, but it is neither vTrash nor vJunk folder. Doing this avoids unnecessary removals of messages which don't satisfy search criteria anymore, which could be done on asynchronous delivery of folder's 'changed' signal. These ignored changes are accumulated and used on folder refresh.

#### Parameters

vfolder | a CamelVeeFolder |
subfolder | a CamelFolder folder |

Since: 3.2

### camel_vee_folder_remove_from_ignore_changed_event ()

    void
    camel_vee_folder_remove_from_ignore_changed_event
                                   (CamelVeeFolder *vfolder,
                                    CamelFolder *subfolder);

Make sure the next `subfolder` -'s 'changed' event will not be silently ignored. This is a counter-part function of `camel_vee_folder_ignore_next_changed_event()`, when there was expected a change, which did not happen, to take back the previous ignore event request.

#### Parameters

vfolder | a CamelVeeFolder |
subfolder | a CamelFolder folder |

Since: 3.12

### camel_vee_folder_propagate_skipped_changes ()

    void
    camel_vee_folder_propagate_skipped_changes
                                   (CamelVeeFolder *vf);

Propagate any skipped changes into the `vf` . The skipped changes are used to not hide the messages from the search folder unexpectedly. The function does nothing when there are no changes to be propagated.

#### Parameters

vf | a CamelVeeFolder |

Since: 3.38

## Types and Values

### CAMEL_UNMATCHED_NAME

    #define CAMEL_UNMATCHED_NAME "UNMATCHED"

## Property Details

### The `“auto-update”` property

      “auto-update”              gboolean

Automatically _update on change in source folders.

Owner: CamelVeeFolder

Flags: Read / Write

Default value: TRUE