## CamelOfflineSettings CamelOfflineSettings |

## Functions

gboolean | camel_offline_settings_get_stay_synchronized ()
void | camel_offline_settings_set_stay_synchronized ()
gint | camel_offline_settings_get_store_changes_interval ()
void | camel_offline_settings_set_store_changes_interval ()
gboolean | camel_offline_settings_get_limit_by_age ()
void | camel_offline_settings_set_limit_by_age ()
CamelTimeUnit | camel_offline_settings_get_limit_unit ()
void | camel_offline_settings_set_limit_unit ()
gint | camel_offline_settings_get_limit_value ()
void | camel_offline_settings_set_limit_value ()

## Properties

gboolean | limit-by-age | Read / Write / Construct
CamelTimeUnit | limit-unit | Read / Write / Construct
int | limit-value | Read / Write / Construct
gboolean | stay-synchronized | Read / Write / Construct

## Types and Values

struct | CamelOfflineSettings

## Object Hierarchy

        GObject
        ╰── CamelSettings
            ╰── CamelStoreSettings
                ╰── CamelOfflineSettings
                    ├── CamelIMAPXSettings
                    ╰── CamelNNTPSettings

## Description

## Functions

### camel_offline_settings_get_stay_synchronized ()

    gboolean
    camel_offline_settings_get_stay_synchronized
                                   (CamelOfflineSettings *settings);

Returns whether to synchronize the local cache with the remote server before switching to offline mode, so the store's content can still be read while offline.

#### Parameters

settings | a CamelOfflineSettings |

#### Returns

whether to stay synchronized with the remote server

Since: 3.2

### camel_offline_settings_set_stay_synchronized ()

    void
    camel_offline_settings_set_stay_synchronized
                                   (CamelOfflineSettings *settings,
                                    gboolean stay_synchronized);

Sets whether to synchronize the local cache with the remote server before switching to offline mode, so the store's content can still be read while offline.

#### Parameters

settings | a CamelOfflineSettings |
stay_synchronized | whether to stay synchronized with the remote server |

Since: 3.2

### camel_offline_settings_get_store_changes_interval ()

    gint
    camel_offline_settings_get_store_changes_interval
                                   (CamelOfflineSettings *settings);

`camel_offline_settings_get_store_changes_interval` has been deprecated since version 3.40 and should not be used in newly-written code.

Use `camel_store_settings_get_store_changes_interval()` instead

Returns the interval, in seconds, for the changes in the folder being saved automatically. 0 means immediately, while -1 means turning off automatic folder change saving.

#### Parameters

settings | a CamelOfflineSettings |

#### Returns

the interval for automatic store of folder changes

Since: 3.18

### camel_offline_settings_set_store_changes_interval ()

    void
    camel_offline_settings_set_store_changes_interval
                                   (CamelOfflineSettings *settings,
                                    gint interval);

`camel_offline_settings_set_store_changes_interval` has been deprecated since version 3.40 and should not be used in newly-written code.

Use `camel_store_settings_set_store_changes_interval()` instead

Sets the interval, in seconds, for the changes in the folder being saved automatically. 0 means immediately, while -1 means turning off automatic folder change saving.

#### Parameters

settings | a CamelOfflineSettings |
interval | the interval, in seconds |

Since: 3.18

### camel_offline_settings_get_limit_by_age ()

    gboolean
    camel_offline_settings_get_limit_by_age
                                   (CamelOfflineSettings *settings);

#### Parameters

settings | a CamelOfflineSettings |

#### Returns

whether limit messages stored for offline use by their age

Since: 3.24

### camel_offline_settings_set_limit_by_age ()

    void
    camel_offline_settings_set_limit_by_age
                                   (CamelOfflineSettings *settings,
                                    gboolean limit_by_age);

Set whether the messages to download for offline should be limited by age. If set to `TRUE`, then messages older than 'limit-value' will not be downloaded automatically.

#### Parameters

settings | a CamelOfflineSettings |
limit_by_age | a value to set |

Since: 3.24

### camel_offline_settings_get_limit_unit ()

    CamelTimeUnit
    camel_offline_settings_get_limit_unit (CamelOfflineSettings *settings);

#### Parameters

settings | a CamelOfflineSettings |

#### Returns

the limit unit to use when interpreting 'limit-value'

Since: 3.24

### camel_offline_settings_set_limit_unit ()

    void
    camel_offline_settings_set_limit_unit (CamelOfflineSettings *settings,
                                           CamelTimeUnit limit_unit);

Set the limit unit to use when interpreting 'limit-value'.

#### Parameters

settings | a CamelOfflineSettings |
limit_unit | a CamelTimeUnit with a unit to use |

Since: 3.24

### camel_offline_settings_get_limit_value ()

    gint
    camel_offline_settings_get_limit_value
                                   (CamelOfflineSettings *settings);

#### Parameters

settings | a CamelOfflineSettings |

#### Returns

the limit, in 'limit-unit', to use when 'limit-by-age' is set to `TRUE`

Since: 3.24

### camel_offline_settings_set_limit_value ()

    void
    camel_offline_settings_set_limit_value
                                   (CamelOfflineSettings *settings,
                                    gboolean limit_value);

Set the limit, in 'limit-unit', to use when 'limit-by-age' is set to `TRUE`.

#### Parameters

settings | a CamelOfflineSettings |
limit_value | a value to set |

Since: 3.24

## Types and Values

### struct CamelOfflineSettings

    struct CamelOfflineSettings;

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

Since: 3.2

## Property Details

### The `“limit-by-age”` property

      “limit-by-age”             gboolean

Whether to limit what will be synchronized by message date.

Owner: CamelOfflineSettings

Flags: Read / Write / Construct

Default value: FALSE

### The `“limit-unit”` property

      “limit-unit”               CamelTimeUnit

A unit for the limit-value.

Owner: CamelOfflineSettings

Flags: Read / Write / Construct

Default value: CAMEL_TIME_UNIT_YEARS

### The `“limit-value”` property

      “limit-value”              int

How many days/weeks/months/years to download into the local cache, if limit-by-age is set to TRUE.

Owner: CamelOfflineSettings

Flags: Read / Write / Construct

Allowed values: >= 1

Default value: 1

### The `“stay-synchronized”` property

      “stay-synchronized”        gboolean

Stay synchronized with the remote server.

Owner: CamelOfflineSettings

Flags: Read / Write / Construct

Default value: FALSE