## CamelOfflineFolder CamelOfflineFolder |

## Functions

CamelThreeState | camel_offline_folder_get_offline_sync ()
void | camel_offline_folder_set_offline_sync ()
gboolean | camel_offline_folder_can_downsync ()
gboolean | camel_offline_folder_downsync_sync ()
void | camel_offline_folder_downsync ()
gboolean | camel_offline_folder_downsync_finish ()

## Properties

CamelThreeState | offline-sync | Read / Write

## Object Hierarchy

        GObject
        ╰── CamelObject
            ╰── CamelFolder
                ╰── CamelOfflineFolder
                    ├── CamelIMAPXFolder
                    ╰── CamelNNTPFolder

## Description

## Functions

### camel_offline_folder_get_offline_sync ()

    CamelThreeState
    camel_offline_folder_get_offline_sync (CamelOfflineFolder *folder);

#### Parameters

folder | a CamelOfflineFolder |

Since: 2.32

### camel_offline_folder_set_offline_sync ()

    void
    camel_offline_folder_set_offline_sync (CamelOfflineFolder *folder,
                                           CamelThreeState offline_sync);

The `CAMEL_THREE_STATE_INCONSISTENT` means what the parent store has set.

#### Parameters

folder | a CamelOfflineFolder |
offline_sync | whether to synchronize for offline use, as a CamelThreeState enum |

Since: 2.32

### camel_offline_folder_can_downsync ()

    gboolean
    camel_offline_folder_can_downsync (CamelOfflineFolder *folder);

Checks whether the `folder` can run downsync according to its settings (`camel_offline_folder_get_offline_sync()`) and to the parent's CamelOfflineStore settings (`camel_offline_settings_get_stay_synchronized()`).

#### Parameters

folder | a CamelOfflineFolder |

#### Returns

`TRUE`, when the `folder` can be synchronized for offline; `FALSE` otherwise.

Since: 3.22

### camel_offline_folder_downsync_sync ()

    gboolean
    camel_offline_folder_downsync_sync (CamelOfflineFolder *folder,
                                        const gchar *expression,
                                        GCancellable *cancellable,
                                        GError **error);

Synchronizes messages in `folder` described by the search `expression` to the local machine for offline availability.

#### Parameters

folder | a CamelOfflineFolder |
expression | search expression describing which set of messages to downsync (`NULL` for all) |
cancellable | optional GCancellable object, or `NULL` |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since: 3.0

### camel_offline_folder_downsync ()

    void
    camel_offline_folder_downsync (CamelOfflineFolder *folder,
                                   const gchar *expression,
                                   gint io_priority,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Synchronizes messages in `folder` described by the search `expression` to the local machine asynchronously for offline availability.

When the operation is finished, `callback` will be called. You can then call `camel_offline_folder_downsync_finish()` to get the result of the operation.

#### Parameters

folder | a CamelOfflineFolder |
expression | search expression describing which set of messages to downsync (`NULL` for all) |
io_priority | the I/O priority of the request |
cancellable | optional GCancellable object, or `NULl` |
callback | a GAsyncReadyCallback to call when the request is satisfied |
user_data | data to pass to the callback function |

Since: 3.0

### camel_offline_folder_downsync_finish ()

    gboolean
    camel_offline_folder_downsync_finish (CamelOfflineFolder *folder,
                                          GAsyncResult *result,
                                          GError **error);

Finishes the operation started with `camel_offline_folder_downsync()`.

#### Parameters

folder | a CamelOfflineFolder |
result | a GAsyncResult |
error | return location for a GError, or `NULL` |

#### Returns

`TRUE` on success, `FALSE` on error

Since: 3.0

## Types and Values

## Property Details

### The `“offline-sync”` property

      “offline-sync”             CamelThreeState

Copy folder content locally for _offline operation.

Flags: Read / Write

Default value: CAMEL_THREE_STATE_INCONSISTENT