## CamelIMAPXFolder CamelIMAPXFolder |

## Synopsis

    struct              CamelIMAPXFolder;
    CamelFolder *       camel_imapx_folder_new              (CamelStore *parent,
                                                             const gchar *path,
                                                             const gchar *raw,
                                                             GError **error);
    CamelIMAPXMailbox * camel_imapx_folder_ref_mailbox      (CamelIMAPXFolder *folder);
    void                camel_imapx_folder_set_mailbox      (CamelIMAPXFolder *folder,
                                                             CamelIMAPXMailbox *mailbox);
    CamelIMAPXMailbox * camel_imapx_folder_list_mailbox     (CamelIMAPXFolder *folder,
                                                             GCancellable *cancellable,
                                                             GError **error);
    GSequence *         camel_imapx_folder_copy_message_map (CamelIMAPXFolder *folder);
    void                camel_imapx_folder_add_move_to_real_junk
                                                            (CamelIMAPXFolder *folder,
                                                             const gchar *message_uid);
    void                camel_imapx_folder_add_move_to_real_trash
                                                            (CamelIMAPXFolder *folder,
                                                             const gchar *message_uid);
    void                camel_imapx_folder_invalidate_local_cache
                                                            (CamelIMAPXFolder *folder,
                                                             guint64 new_uidvalidity);

## Object Hierarchy

      GObject
       +----CamelObject
             +----CamelFolder
                   +----CamelOfflineFolder
                         +----CamelIMAPXFolder

## Properties

      "apply-filters"            gboolean              : Read / Write
      "mailbox"                  CamelIMAPXMailbox*    : Read / Write

## Description

## Details

### struct CamelIMAPXFolder

    struct CamelIMAPXFolder;

### 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.

`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.

`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.

`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()`.

`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.

`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.

`folder` : | a CamelIMAPXFolder
`message_uid` : | a message UID

Since 3.8

### 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.

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

Since 3.10

## Property Details

### The `"apply-filters"` property

      "apply-filters"            gboolean              : Read / Write

Apply message _filters to this folder.

Default value: FALSE

### The `"mailbox"` property

      "mailbox"                  CamelIMAPXMailbox*    : Read / Write

IMAP mailbox for this folder.