CamelIMAPXFolder: Camel Reference Manual

## CamelIMAPXFolder CamelIMAPXFolder |

## Functions

CamelFolder * | camel_imapx_folder_new ()
CamelIMAPXMailbox * | camel_imapx_folder_ref_mailbox ()
void | camel_imapx_folder_set_mailbox ()
CamelIMAPXMailbox * | camel_imapx_folder_list_mailbox ()
GSequence * | camel_imapx_folder_copy_message_map ()
void | camel_imapx_folder_add_move_to_real_junk ()
void | camel_imapx_folder_add_move_to_real_trash ()
void | camel_imapx_folder_add_move_to_inbox ()
void | camel_imapx_folder_invalidate_local_cache ()
gboolean | camel_imapx_folder_get_check_folder ()
void | camel_imapx_folder_set_check_folder ()
void | camel_imapx_folder_claim_move_to_real_junk_uids ()
void | camel_imapx_folder_claim_move_to_real_trash_uids ()
void | camel_imapx_folder_claim_move_to_inbox_uids ()
void | camel_imapx_folder_clear_move_to_real_trash_uids ()
void | camel_imapx_folder_clear_move_to_real_junk_uids ()
void | camel_imapx_folder_update_cache_expire ()

## Properties

gboolean | apply-filters | Read / Write
gboolean | check-folder | Read / Write
CamelIMAPXMailbox * | mailbox | Read / Write

## Object Hierarchy

        GObject
        ╰── CamelObject
            ╰── CamelFolder
                ╰── CamelOfflineFolder
                    ╰── CamelIMAPXFolder

## Description

## Functions

### camel_imapx_folder_new ()

    CamelFolder *
    camel_imapx_folder_new (CamelStore *parent,
                            const gchar *path,
                            const gchar *raw,
                            GError **error);

### camel_imapx_folder_ref_mailbox ()

    CamelIMAPXMailbox *
    camel_imapx_folder_ref_mailbox (CamelIMAPXFolder *folder);

Returns the CamelIMAPXMailbox for `folder` from the current IMAP server connection, or `NULL` if `folder` 's “parent-store” is disconnected from the IMAP server.

The returned CamelIMAPXMailbox is referenced for thread-safety and should be unreferenced with `g_object_unref()` when finished with it.

#### Parameters

folder | a CamelIMAPXFolder |

#### Returns

a CamelIMAPXMailbox, or `NULL`

Since: 3.12

### camel_imapx_folder_set_mailbox ()

    void
    camel_imapx_folder_set_mailbox (CamelIMAPXFolder *folder,
                                    CamelIMAPXMailbox *mailbox);

Sets the CamelIMAPXMailbox for `folder` from the current IMAP server connection. Note that CamelIMAPXFolder only holds a weak reference on its CamelIMAPXMailbox so that when the IMAP server connection is lost, all mailbox instances are automatically destroyed.

#### Parameters

folder | a CamelIMAPXFolder |
mailbox | a CamelIMAPXMailbox |

Since: 3.12

### camel_imapx_folder_list_mailbox ()

    CamelIMAPXMailbox *
    camel_imapx_folder_list_mailbox (CamelIMAPXFolder *folder,
                                     GCancellable *cancellable,
                                     GError **error);

Ensures that `folder` 's “mailbox” property is set, going so far as to issue a LIST command if necessary (but should be a rarely needed last resort).

If `folder` 's “parent-store” is disconnected from the IMAP server or an error occurs during the LIST command, the function sets `error` and returns `NULL`.

The returned CamelIMAPXMailbox is referenced for thread-safety and should be unreferenced with `g_object_unref()` when finished with it.

#### Parameters

folder | a CamelIMAPXFolder |
cancellable | optional GCancellable object, or `NULL` |
error | return location for a GError, or `NULL` |

#### Returns

a CamelIMAPXMailbox, or `NULL`

Since: 3.12

### camel_imapx_folder_copy_message_map ()

    GSequence *
    camel_imapx_folder_copy_message_map (CamelIMAPXFolder *folder);

Returns a GSequence of 32-bit integers representing the locally cached mapping of message sequence numbers to unique identifiers.

Free the returns GSequence with `g_sequence_free()`.

#### Parameters

folder | a CamelIMAPXFolder |

#### Returns

a GSequence

Since: 3.12

### camel_imapx_folder_add_move_to_real_junk ()

    void
    camel_imapx_folder_add_move_to_real_junk
                                   (CamelIMAPXFolder *folder,
                                    const gchar *message_uid);

Adds `message_uid` to a pool of messages to be moved to a real junk folder the next time `folder` is explicitly synchronized by way of `camel_folder_synchronize()` or `camel_folder_synchronize_sync()`.

This only applies when using a real folder to track junk messages, as specified by the “use-real-junk-path” setting.

#### Parameters

folder | a CamelIMAPXFolder |
message_uid | a message UID |

Since: 3.8

### camel_imapx_folder_add_move_to_real_trash ()

    void
    camel_imapx_folder_add_move_to_real_trash
                                   (CamelIMAPXFolder *folder,
                                    const gchar *message_uid);

Adds `message_uid` to a pool of messages to be moved to a real trash folder the next time `folder` is explicitly synchronized by way of `camel_folder_synchronize()` or `camel_folder_synchronize_sync()`.

This only applies when using a real folder to track deleted messages, as specified by the “use-real-trash-path” setting.

#### Parameters

folder | a CamelIMAPXFolder |
message_uid | a message UID |

Since: 3.8

### camel_imapx_folder_add_move_to_inbox ()

    void
    camel_imapx_folder_add_move_to_inbox (CamelIMAPXFolder *folder,
                                          const gchar *message_uid);

### camel_imapx_folder_invalidate_local_cache ()

    void
    camel_imapx_folder_invalidate_local_cache
                                   (CamelIMAPXFolder *folder,
                                    guint64 new_uidvalidity);

Call this function when the IMAP server reports a different UIDVALIDITY value than what is presently cached. This means all cached message UIDs are now invalid and must be discarded.

The local cache for `folder` is reset and the `new_uidvalidity` value is recorded in the newly-reset cache.

#### Parameters

folder | a CamelIMAPXFolder |
new_uidvalidity | the new UIDVALIDITY value |

Since: 3.10

### camel_imapx_folder_get_check_folder ()

    gboolean
    camel_imapx_folder_get_check_folder (CamelIMAPXFolder *folder);

### camel_imapx_folder_set_check_folder ()

    void
    camel_imapx_folder_set_check_folder (CamelIMAPXFolder *folder,
                                         gboolean check_folder);

### camel_imapx_folder_claim_move_to_real_junk_uids ()

    void
    camel_imapx_folder_claim_move_to_real_junk_uids
                                   (CamelIMAPXFolder *folder,
                                    GPtrArray *out_uids_to_copy);

### camel_imapx_folder_claim_move_to_real_trash_uids ()

    void
    camel_imapx_folder_claim_move_to_real_trash_uids
                                   (CamelIMAPXFolder *folder,
                                    GPtrArray *out_uids_to_copy);

### camel_imapx_folder_claim_move_to_inbox_uids ()

    void
    camel_imapx_folder_claim_move_to_inbox_uids
                                   (CamelIMAPXFolder *folder,
                                    GPtrArray *out_uids_to_copy);

### camel_imapx_folder_clear_move_to_real_trash_uids ()

    void
    camel_imapx_folder_clear_move_to_real_trash_uids
                                   (CamelIMAPXFolder *folder);

### camel_imapx_folder_clear_move_to_real_junk_uids ()

    void
    camel_imapx_folder_clear_move_to_real_junk_uids
                                   (CamelIMAPXFolder *folder);

### camel_imapx_folder_update_cache_expire ()

    void
    camel_imapx_folder_update_cache_expire
                                   (CamelFolder *folder,
                                    time_t expire_when);

## Property Details

### The `“apply-filters”` property

      “apply-filters”            gboolean

Apply message _filters to this folder.

Owner: CamelIMAPXFolder

Flags: Read / Write

Default value: FALSE

### The `“check-folder”` property

      “check-folder”             gboolean

Always check for _new mail in this folder.

Owner: CamelIMAPXFolder

Flags: Read / Write

Default value: FALSE

### The `“mailbox”` property

      “mailbox”                  CamelIMAPXMailbox *

IMAP mailbox for this folder.

Owner: CamelIMAPXFolder

Flags: Read / Write