### Class

# Camel Store

#### Description

    abstract class Camel.Store : Camel.Service
      implements Gio.Initable {
      CamelStorePrivate* priv
    }

No description available.

#### Hierarchy

#### Ancestors

- CamelService
- GObject

#### Descendants

- CamelOfflineStore
- CamelVeeStore

#### Implements

- GInitable

#### Instance methods

###### camel_store_can_refresh_folder

Returns if this folder (param info) should be checked for new mail or not. It should not look into sub infos (info->child) or next infos, it should return value only for the actual folder info. Default behavior is that all Inbox folders are intended to be refreshed.

since: 2.22

###### camel_store_create_folder

Asynchronously creates a new folder as a child of an existing folder. `parent_name` can be `NULL` to create a new top-level folder.

since: 3.0

###### camel_store_create_folder_finish

Finishes the operation started with camel_store_create_folder(). The returned `CamelFolderInfo` struct should be freed with camel_folder_info_free().

since: 3.0

###### camel_store_create_folder_sync

Creates a new folder as a child of an existing folder. `parent_name` can be `NULL` to create a new top-level folder. The returned `CamelFolderInfo` struct should be freed with camel_folder_info_free().

since: 3.0

###### camel_store_delete_cached_folder

Deletes local data for the given `folder_name`. The folder should be part of the opened folders.

since: 3.24

###### camel_store_delete_folder

Asynchronously deletes the folder described by `folder_name`. The folder must be empty.

since: 3.0

###### camel_store_delete_folder_finish

Finishes the operation started with camel_store_delete_folder().

since: 3.0

###### camel_store_delete_folder_sync

Deletes the folder described by `folder_name`. The folder must be empty.

since: 3.0

###### camel_store_dup_opened_folders

Returns a `GPtrArray` of all the opened folders for the `store`. The caller owns both the array and the folder references, so to free the array use:.

since: 3.24

###### camel_store_folder_created

Emits the `CamelStore::folder-created` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### camel_store_folder_deleted

Emits the `CamelStore::folder-deleted` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### camel_store_folder_info_stale

Emits the `CamelStore::folder-info-stale` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_LOW.

since: 3.10

###### camel_store_folder_opened

Emits the `CamelStore::folder-opened` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 3.0

###### camel_store_folder_renamed

Emits the `CamelStore::folder-renamed` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### camel_store_get_can_auto_save_changes

Returns whether there can be done automatic save of folder changes. Default is TRUE. The descendants can overwrite it with CamelStoreClass::get_can_auto_save_changes().

since: 3.40

###### camel_store_get_db

No description available.

since: 3.58

###### camel_store_get_flags

No description available.

since: 3.24

###### camel_store_get_folder

Asynchronously gets a specific folder object from `store` by name.

since: 3.0

###### camel_store_get_folder_finish

Finishes the operation started with camel_store_get_folder().

since: 3.0

###### camel_store_get_folder_info

Asynchronously fetches information about the folder structure of `store`, starting with `top`. For details of the behavior, see camel_store_get_folder_info_sync().

since: 3.0

###### camel_store_get_folder_info_finish

Finishes the operation started with camel_store_get_folder_info(). The returned `CamelFolderInfo` tree should be freed with camel_folder_info_free().

since: 3.0

###### camel_store_get_folder_info_sync

This fetches information about the folder structure of `store`, starting with `top`, and returns a tree of `CamelFolderInfo` structures. If `flags` includes `CAMEL_STORE_FOLDER_INFO_SUBSCRIBED`, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If `flags` includes `CAMEL_STORE_FOLDER_INFO_RECURSIVE`, the returned tree will include all levels of hierarchy below `top`. If not, it will only include the immediate subfolders of `top`. If `flags` includes `CAMEL_STORE_FOLDER_INFO_FAST`, the unread_message_count fields of some or all of the structures may be set to -1, if the store cannot determine that information quickly. If `flags` includes `CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL`, don’t include special virtual folders (such as vTrash or vJunk).

since: 3.0

###### camel_store_get_folder_sync

Gets a specific folder object from `store` by name.

since: 3.0

###### camel_store_get_folders_bag

No description available.

since: 3.24

###### camel_store_get_inbox_folder

Asynchronously gets the folder in `store` into which new mail is delivered.

since: 3.0

###### camel_store_get_inbox_folder_finish

Finishes the operation started with camel_store_get_inbox_folder().

since: 3.0

###### camel_store_get_inbox_folder_sync

Gets the folder in `store` into which new mail is delivered.

since: 3.0

###### camel_store_get_junk_folder

Asynchronously gets the folder in `store` into which junk is delivered.

since: 3.0

###### camel_store_get_junk_folder_finish

Finishes the operation started with camel_store_get_junk_folder().

since: 3.0

###### camel_store_get_junk_folder_sync

Gets the folder in `store` into which junk is delivered.

since: 3.0

###### camel_store_get_permissions

No description available.

since: 3.24

###### camel_store_get_trash_folder

Asynchronously gets the folder in `store` into which trash is delivered.

since: 3.0

###### camel_store_get_trash_folder_finish

Finishes the operation started with camel_store_get_trash_folder().

since: 3.0

###### camel_store_get_trash_folder_sync

Gets the folder in `store` into which trash is delivered.

since: 3.0

###### camel_store_initial_setup

Runs initial setup for the `store` asynchronously.

since: 3.20

###### camel_store_initial_setup_finish

Finishes the operation started with camel_store_initial_setup().

since: 3.20

###### camel_store_initial_setup_sync

Runs initial setup for the `store`. It’s meant to preset some values the first time the account connects to the server after it had been created. The function should return `TRUE` even if it didn’t populate anything. The default implementation does just that.

since: 3.20

###### camel_store_maybe_run_db_maintenance

Checks the state of the current `CamelStoreDB` used for the `store` and eventually runs maintenance routines on it.

since: 3.16

###### camel_store_rename_folder

Asynchronously renames the folder described by `old_name` to `new_name`.

since: 3.0

###### camel_store_rename_folder_finish

Finishes the operation started with camel_store_rename_folder().

since: 3.0

###### camel_store_rename_folder_sync

Renames the folder described by `old_name` to `new_name`.

since: 3.0

###### camel_store_set_flags

Sets flags for the `store`, a bit-or of `CamelStoreFlags`.

since: 3.24

###### camel_store_set_permissions

Sets permissions for the `store`, a bit-or of `CamelStorePermissionFlags`.

since: 3.24

###### camel_store_synchronize

Synchronizes any changes that have been made to `store` and its folders with the real store asynchronously.

since: 3.0

###### camel_store_synchronize_finish

Finishes the operation started with camel_store_synchronize().

since: 3.0

###### camel_store_synchronize_sync

Synchronizes any changes that have been made to `store` and its folders with the real store.

since: 3.0

##### Methods inherited from CamelService (32)

Please see CamelService for a full list of methods.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

#### Properties

##### Properties inherited from CamelService (9)

###### Camel.Service:connection-status

The connection status for the service.

###### Camel.Service:display-name

The display name for the service.

###### Camel.Service:password

The password for the service.

###### Camel.Service:provider

The `CamelProvider` for the service.

###### Camel.Service:proxy-resolver

The proxy resolver for the service.

###### Camel.Service:session

A `CamelSession` instance.

###### Camel.Service:settings

A `CamelSettings` instance.

###### Camel.Service:uid

The unique identity of the service.

###### Camel.Service:with-proxy-resolver

Private property, to not create `GProxyResolver` in the tests.

#### Signals

###### Camel.Store::folder-created

No description available.

###### Camel.Store::folder-deleted

No description available.

###### Camel.Store::folder-info-stale

This signal indicates significant changes have occurred to the folder hierarchy of `store`, and that previously fetched `CamelFolderInfo` data should be considered stale.

###### Camel.Store::folder-opened

No description available.

###### Camel.Store::folder-renamed

No description available.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct CamelStoreClass {
      CamelServiceClass parent_class;
      GHashFunc hash_folder_name;
      GEqualFunc equal_folder_name;
      gboolean (* can_refresh_folder) (
        CamelStore* store,
        CamelFolderInfo* info,
        GError** error
      );
      CamelFolder* (* get_folder_sync) (
        CamelStore* store,
        const gchar* folder_name,
        CamelStoreGetFolderFlags flags,
        GCancellable* cancellable,
        GError** error
      );
      CamelFolderInfo* (* get_folder_info_sync) (
        CamelStore* store,
        const gchar* top,
        CamelStoreGetFolderInfoFlags flags,
        GCancellable* cancellable,
        GError** error
      );
      CamelFolder* (* get_inbox_folder_sync) (
        CamelStore* store,
        GCancellable* cancellable,
        GError** error
      );
      CamelFolder* (* get_junk_folder_sync) (
        CamelStore* store,
        GCancellable* cancellable,
        GError** error
      );
      CamelFolder* (* get_trash_folder_sync) (
        CamelStore* store,
        GCancellable* cancellable,
        GError** error
      );
      CamelFolderInfo* (* create_folder_sync) (
        CamelStore* store,
        const gchar* parent_name,
        const gchar* folder_name,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* delete_folder_sync) (
        CamelStore* store,
        const gchar* folder_name,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* rename_folder_sync) (
        CamelStore* store,
        const gchar* old_name,
        const gchar* new_name,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* synchronize_sync) (
        CamelStore* store,
        gboolean expunge,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* initial_setup_sync) (
        CamelStore* store,
        GHashTable* out_save_setup,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* get_can_auto_save_changes) (
        CamelStore* store
      );
      gpointer reserved_methods;
      void (* folder_created) (
        CamelStore* store,
        CamelFolderInfo* folder_info
      );
      void (* folder_deleted) (
        CamelStore* store,
        CamelFolderInfo* folder_info
      );
      void (* folder_opened) (
        CamelStore* store,
        CamelFolder* folder
      );
      void (* folder_renamed) (
        CamelStore* store,
        const gchar* old_name,
        CamelFolderInfo* folder_info
      );
      void (* folder_info_stale) (
        CamelStore* store
      );
      gpointer reserved_signals;

    }

No description available.

###### Class members

`parent_class: CamelServiceClass`

  No description available.

`hash_folder_name: GHashFunc`

  No description available.

`equal_folder_name: GEqualFunc`

  No description available.

`can_refresh_folder: gboolean (* can_refresh_folder) ( CamelStore* store, CamelFolderInfo* info, GError** error )`

  No description available.

`get_folder_sync: CamelFolder* (* get_folder_sync) ( CamelStore* store, const gchar* folder_name, CamelStoreGetFolderFlags flags, GCancellable* cancellable, GError** error )`

  No description available.

`get_folder_info_sync: CamelFolderInfo* (* get_folder_info_sync) ( CamelStore* store, const gchar* top, CamelStoreGetFolderInfoFlags flags, GCancellable* cancellable, GError** error )`

  No description available.

`get_inbox_folder_sync: CamelFolder* (* get_inbox_folder_sync) ( CamelStore* store, GCancellable* cancellable, GError** error )`

  No description available.

`get_junk_folder_sync: CamelFolder* (* get_junk_folder_sync) ( CamelStore* store, GCancellable* cancellable, GError** error )`

  No description available.

`get_trash_folder_sync: CamelFolder* (* get_trash_folder_sync) ( CamelStore* store, GCancellable* cancellable, GError** error )`

  No description available.

`create_folder_sync: CamelFolderInfo* (* create_folder_sync) ( CamelStore* store, const gchar* parent_name, const gchar* folder_name, GCancellable* cancellable, GError** error )`

  No description available.

`delete_folder_sync: gboolean (* delete_folder_sync) ( CamelStore* store, const gchar* folder_name, GCancellable* cancellable, GError** error )`

  No description available.

`rename_folder_sync: gboolean (* rename_folder_sync) ( CamelStore* store, const gchar* old_name, const gchar* new_name, GCancellable* cancellable, GError** error )`

  No description available.

`synchronize_sync: gboolean (* synchronize_sync) ( CamelStore* store, gboolean expunge, GCancellable* cancellable, GError** error )`

  No description available.

`initial_setup_sync: gboolean (* initial_setup_sync) ( CamelStore* store, GHashTable* out_save_setup, GCancellable* cancellable, GError** error )`

  No description available.

`get_can_auto_save_changes: gboolean (* get_can_auto_save_changes) ( CamelStore* store )`

  No description available.

`reserved_methods: gpointer`

  No description available.

`folder_created: void (* folder_created) ( CamelStore* store, CamelFolderInfo* folder_info )`

  No description available.

`folder_deleted: void (* folder_deleted) ( CamelStore* store, CamelFolderInfo* folder_info )`

  No description available.

`folder_opened: void (* folder_opened) ( CamelStore* store, CamelFolder* folder )`

  No description available.

`folder_renamed: void (* folder_renamed) ( CamelStore* store, const gchar* old_name, CamelFolderInfo* folder_info )`

  No description available.

`folder_info_stale: void (* folder_info_stale) ( CamelStore* store )`

  No description available.

`reserved_signals: gpointer`

  No description available.

#### Virtual methods

###### Camel.StoreClass.can_refresh_folder

Returns if this folder (param info) should be checked for new mail or not. It should not look into sub infos (info->child) or next infos, it should return value only for the actual folder info. Default behavior is that all Inbox folders are intended to be refreshed.

since: 2.22

###### Camel.StoreClass.create_folder_sync

Creates a new folder as a child of an existing folder. `parent_name` can be `NULL` to create a new top-level folder. The returned `CamelFolderInfo` struct should be freed with camel_folder_info_free().

since: 3.0

###### Camel.StoreClass.delete_folder_sync

Deletes the folder described by `folder_name`. The folder must be empty.

since: 3.0

###### Camel.StoreClass.folder_created

Emits the `CamelStore::folder-created` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### Camel.StoreClass.folder_deleted

Emits the `CamelStore::folder-deleted` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### Camel.StoreClass.folder_info_stale

Emits the `CamelStore::folder-info-stale` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_LOW.

since: 3.10

###### Camel.StoreClass.folder_opened

Emits the `CamelStore::folder-opened` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 3.0

###### Camel.StoreClass.folder_renamed

Emits the `CamelStore::folder-renamed` signal from an idle source on the main loop. The idle source’s priority is #G_PRIORITY_HIGH_IDLE.

since: 2.32

###### Camel.StoreClass.get_can_auto_save_changes

Returns whether there can be done automatic save of folder changes. Default is TRUE. The descendants can overwrite it with CamelStoreClass::get_can_auto_save_changes().

since: 3.40

###### Camel.StoreClass.get_folder_info_sync

This fetches information about the folder structure of `store`, starting with `top`, and returns a tree of `CamelFolderInfo` structures. If `flags` includes `CAMEL_STORE_FOLDER_INFO_SUBSCRIBED`, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If `flags` includes `CAMEL_STORE_FOLDER_INFO_RECURSIVE`, the returned tree will include all levels of hierarchy below `top`. If not, it will only include the immediate subfolders of `top`. If `flags` includes `CAMEL_STORE_FOLDER_INFO_FAST`, the unread_message_count fields of some or all of the structures may be set to -1, if the store cannot determine that information quickly. If `flags` includes `CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL`, don’t include special virtual folders (such as vTrash or vJunk).

since: 3.0

###### Camel.StoreClass.get_folder_sync

Gets a specific folder object from `store` by name.

since: 3.0

###### Camel.StoreClass.get_inbox_folder_sync

Gets the folder in `store` into which new mail is delivered.

since: 3.0

###### Camel.StoreClass.get_junk_folder_sync

Gets the folder in `store` into which junk is delivered.

since: 3.0

###### Camel.StoreClass.get_trash_folder_sync

Gets the folder in `store` into which trash is delivered.

since: 3.0

###### Camel.StoreClass.initial_setup_sync

Runs initial setup for the `store`. It’s meant to preset some values the first time the account connects to the server after it had been created. The function should return `TRUE` even if it didn’t populate anything. The default implementation does just that.

since: 3.20

###### Camel.StoreClass.rename_folder_sync

Renames the folder described by `old_name` to `new_name`.

since: 3.0

###### Camel.StoreClass.synchronize_sync

Synchronizes any changes that have been made to `store` and its folders with the real store.

since: 3.0