Camel.Store¶
| Subclasses: | Camel.OfflineStore,Camel.VeeStore | 
|---|
Methods¶
| Inherited: | Camel.Service (33), Camel.Object (4), GObject.Object (37), Gio.Initable (2) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | error_quark() | 
| can_refresh_folder(info) | |
| create_folder(parent_name, folder_name, io_priority, cancellable, callback, *user_data) | |
| create_folder_finish(result) | |
| create_folder_sync(parent_name, folder_name, cancellable) | |
| delete_cached_folder(folder_name) | |
| delete_folder(folder_name, io_priority, cancellable, callback, *user_data) | |
| delete_folder_finish(result) | |
| delete_folder_sync(folder_name, cancellable) | |
| dup_opened_folders() | |
| folder_created(folder_info) | |
| folder_deleted(folder_info) | |
| folder_info_stale() | |
| folder_opened(folder) | |
| folder_renamed(old_name, folder_info) | |
| get_can_auto_save_changes() | |
| get_db() | |
| get_flags() | |
| get_folder(folder_name, flags, io_priority, cancellable, callback, *user_data) | |
| get_folder_finish(result) | |
| get_folder_info(top, flags, io_priority, cancellable, callback, *user_data) | |
| get_folder_info_finish(result) | |
| get_folder_info_sync(top, flags, cancellable) | |
| get_folder_sync(folder_name, flags, cancellable) | |
| get_folders_bag() | |
| get_inbox_folder(io_priority, cancellable, callback, *user_data) | |
| get_inbox_folder_finish(result) | |
| get_inbox_folder_sync(cancellable) | |
| get_junk_folder(io_priority, cancellable, callback, *user_data) | |
| get_junk_folder_finish(result) | |
| get_junk_folder_sync(cancellable) | |
| get_permissions() | |
| get_trash_folder(io_priority, cancellable, callback, *user_data) | |
| get_trash_folder_finish(result) | |
| get_trash_folder_sync(cancellable) | |
| initial_setup(io_priority, cancellable, callback, *user_data) | |
| initial_setup_finish(result) | |
| initial_setup_sync(cancellable) | |
| maybe_run_db_maintenance() | |
| rename_folder(old_name, new_name, io_priority, cancellable, callback, *user_data) | |
| rename_folder_finish(result) | |
| rename_folder_sync(old_name, new_name, cancellable) | |
| set_flags(flags) | |
| set_permissions(permissions) | |
| synchronize(expunge, io_priority, cancellable, callback, *user_data) | |
| synchronize_finish(result) | |
| synchronize_sync(expunge, cancellable) | 
Virtual Methods¶
| Inherited: | Camel.Service (5), Camel.Object (2), GObject.Object (7), Gio.Initable (1) | 
|---|
| do_can_refresh_folder(info) | |
| do_create_folder_sync(parent_name, folder_name, cancellable) | |
| do_delete_folder_sync(folder_name, cancellable) | |
| do_folder_created(folder_info) | |
| do_folder_deleted(folder_info) | |
| do_folder_info_stale() | |
| do_folder_opened(folder) | |
| do_folder_renamed(old_name, folder_info) | |
| do_get_can_auto_save_changes() | |
| do_get_folder_info_sync(top, flags, cancellable) | |
| do_get_folder_sync(folder_name, flags, cancellable) | |
| do_get_inbox_folder_sync(cancellable) | |
| do_get_junk_folder_sync(cancellable) | |
| do_get_trash_folder_sync(cancellable) | |
| do_initial_setup_sync(cancellable) | |
| do_rename_folder_sync(old_name, new_name, cancellable) | |
| do_synchronize_sync(expunge, cancellable) | 
Properties¶
| Inherited: | Camel.Service (8), Camel.Object (1) | 
|---|
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| folder-created | |
| folder-deleted | |
| folder-info-stale | This signal indicates significant changes have occurred to the folder hierarchy of store, and that previously fetched Camel.FolderInfodata should be considered stale. | 
| folder-opened | |
| folder-renamed | 
Class Details¶
- 
class Camel.Store(**kwargs)¶
- Bases: - Camel.Service- Abstract: - Yes - Structure: - Camel.StoreClass- 
can_refresh_folder(info)¶
- Parameters: - info ( - Camel.FolderInfo) – a- Camel.FolderInfo- Raises: - GLib.Error- Returns: - whether folder should be checked for new mails - Return type: - bool- 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. - New in version 2.22. 
 - 
create_folder(parent_name, folder_name, io_priority, cancellable, callback, *user_data)¶
- Parameters: - parent_name (strorNone) – name of the new folder’s parent, orNone
- folder_name (str) – name of the folder to create
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously creates a new folder as a child of an existing folder. parent_name can be - Noneto create a new top-level folder.- When the operation is finished, callback will be called. You can then call - Camel.Store.create_folder_finish() to get the result of the operation.- New in version 3.0. 
- parent_name (
 - 
create_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - info about the created folder, or - Noneon error- Return type: - Camel.FolderInfoor- None- Finishes the operation started with - Camel.Store.create_folder(). The returned- Camel.FolderInfostruct should be freed with- Camel.FolderInfo.free().- New in version 3.0. 
 - 
create_folder_sync(parent_name, folder_name, cancellable)¶
- Parameters: - parent_name (strorNone) – name of the new folder’s parent, orNone
- folder_name (str) – name of the folder to create
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - info about the created folder, or - Noneon error- Return type: - Creates a new folder as a child of an existing folder. parent_name can be - Noneto create a new top-level folder. The returned- Camel.FolderInfostruct should be freed with- Camel.FolderInfo.free().- New in version 3.0. 
- parent_name (
 - 
delete_cached_folder(folder_name)¶
- Parameters: - folder_name ( - str) – a folder full name to delete from the cache- Deletes local data for the given folder_name. The folder should be - Camel.partof the opened folders.- It doesn’t delete the folder in the store (server) as such. Use - Camel.Store.delete_folder(), or its synchronous variant, if you want to do that instead.- New in version 3.24. 
 - 
delete_folder(folder_name, io_priority, cancellable, callback, *user_data)¶
- Parameters: - folder_name (str) – name of the folder to delete
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously deletes the folder described by folder_name. The folder must be empty. - When the operation is finished, callback will be called. You can then call - Camel.Store.delete_folder_finish() to get the result of the operation.- New in version 3.0. 
- folder_name (
 - 
delete_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Finishes the operation started with - Camel.Store.delete_folder().- New in version 3.0. 
 - 
delete_folder_sync(folder_name, cancellable)¶
- Parameters: - folder_name (str) – name of the folder to delete
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - Deletes the folder described by folder_name. The folder must be empty. - New in version 3.0. 
- folder_name (
 - 
dup_opened_folders()¶
- Returns: - an array with all currently opened folders for the self. - Return type: - [ - Camel.Folder]- Returns a - GLib.PtrArrayof all the opened folders for the self. The caller owns both the array and the folder references, so to free the array use:- g_ptr_array_foreach (array, (GFunc) g_object_unref, NULL); g_ptr_array_free (array, TRUE); - New in version 3.24. 
 - 
folder_created(folder_info)¶
- Parameters: - folder_info ( - Camel.FolderInfo) – information about the created folder- Emits the - Camel.Store- ::folder-createdsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
 - 
folder_deleted(folder_info)¶
- Parameters: - folder_info ( - Camel.FolderInfo) – information about the deleted folder- Emits the - Camel.Store- ::folder-deletedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
 - 
folder_info_stale()¶
- Emits the - Camel.Store- ::folder-info-stalesignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_LOW.- See the - Camel.Store- ::folder-info-staledocumentation for details on when to use this signal.- This function is only intended for Camel providers. - New in version 3.10. 
 - 
folder_opened(folder)¶
- Parameters: - folder ( - Camel.Folder) – the- Camel.Folderthat was opened- Emits the - Camel.Store- ::folder-openedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 3.0. 
 - 
folder_renamed(old_name, folder_info)¶
- Parameters: - old_name (str) – the old name of the folder
- folder_info (Camel.FolderInfo) – information about the renamed folder
 - Emits the - Camel.Store- ::folder-renamedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
- old_name (
 - 
get_can_auto_save_changes()¶
- Returns: - Whether there can be done automatic save of folder changes. - Return type: - bool- 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().- New in version 3.38.2. 
 - 
get_db()¶
- Returns: - A - Camel.DBinstance associated with this self.- Return type: - Camel.DB- New in version 3.24. 
 - 
get_flags()¶
- Returns: - bit-or of - Camel.StoreFlagsset for the self- Return type: - int- New in version 3.24. 
 - 
get_folder(folder_name, flags, io_priority, cancellable, callback, *user_data)¶
- Parameters: - folder_name (str) – name of the folder to get
- flags (Camel.StoreGetFolderFlags) – folder flags (create, save body index, etc)
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously gets a specific folder object from self by name. - When the operation is finished, callback will be called. You can then call - Camel.Store.get_folder_finish() to get the result of the operation.- New in version 3.0. 
- folder_name (
 - 
get_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - the requested - Camel.Folderobject, or- Noneon error- Return type: - Camel.Folderor- None- Finishes the operation started with - Camel.Store.get_folder().- New in version 3.0. 
 - 
get_folder_info(top, flags, io_priority, cancellable, callback, *user_data)¶
- Parameters: - top (strorNone) – the name of the folder to start from
- flags (Camel.StoreGetFolderInfoFlags) – various CAMEL_STORE_FOLDER_INFO_* flags to control behavior
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously fetches information about the folder structure of self, starting with top. For details of the behavior, see - Camel.Store.get_folder_info_sync().- When the operation is finished, callback will be called. You can then call - Camel.Store.get_folder_info_finish() to get the result of the operation.- New in version 3.0. 
- top (
 - 
get_folder_info_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - a - Camel.FolderInfotree, or- Noneon error- Return type: - Camel.FolderInfoor- None- Finishes the operation started with - Camel.Store.get_folder_info(). The returned- Camel.FolderInfotree should be freed with- Camel.FolderInfo.free().- New in version 3.0. 
 - 
get_folder_info_sync(top, flags, cancellable)¶
- Parameters: - top (strorNone) – the name of the folder to start from
- flags (Camel.StoreGetFolderInfoFlags) – various CAMEL_STORE_FOLDER_INFO_* flags to control behavior
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - a - Camel.FolderInfotree, or- Noneon error- Return type: - This fetches information about the folder structure of self, starting with top, and returns a tree of - Camel.FolderInfostructures. If flags includes- Camel.StoreGetFolderInfoFlags.SUBSCRIBED, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If flags includes- Camel.StoreGetFolderInfoFlags.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.StoreGetFolderInfoFlags.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.StoreGetFolderInfoFlags.NO_VIRTUAL, don’t include special virtual folders (such as vTrash or vJunk).- The returned - Camel.FolderInfotree should be freed with- Camel.FolderInfo.free().- The - Camel.StoreGetFolderInfoFlags.FASTflag should be considered deprecated; most backends will behave the same whether it is supplied or not. The only guaranteed way to get updated folder counts is to both open the folder and invoke- Camel.Folder.refresh_info() it.- New in version 3.0. 
- top (
 - 
get_folder_sync(folder_name, flags, cancellable)¶
- Parameters: - folder_name (str) – name of the folder to get
- flags (Camel.StoreGetFolderFlags) – folder flags (create, save body index, etc)
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - the requested - Camel.Folderobject, or- Noneon error- Return type: - Camel.Folderor- None- Gets a specific folder object from self by name. - New in version 3.0. 
- folder_name (
 - 
get_folders_bag()¶
- Returns: - a - Camel.ObjectBagof opened- Camel.Folders- Return type: - Camel.ObjectBag- New in version 3.24. 
 - 
get_inbox_folder(io_priority, cancellable, callback, *user_data)¶
- Parameters: - io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously gets the folder in self into which new mail is delivered. - When the operation is finished, callback will be called. You can then call - Camel.Store.get_inbox_folder_finish() to get the result of the operation.- New in version 3.0. 
- io_priority (
 - 
get_inbox_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - the inbox folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Finishes the operation started with - Camel.Store.get_inbox_folder().- New in version 3.0. 
 - 
get_inbox_folder_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - the inbox folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in self into which new mail is delivered. - New in version 3.0. 
 - 
get_junk_folder(io_priority, cancellable, callback, *user_data)¶
- Parameters: - io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously gets the folder in self into which junk is delivered. - When the operation is finished, callback will be called. You can then call - Camel.Store.get_junk_folder_finish() to get the result of the operation.- New in version 3.0. 
- io_priority (
 - 
get_junk_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - the junk folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Finishes the operation started with - Camel.Store.get_junk_folder().- New in version 3.0. 
 - 
get_junk_folder_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - the junk folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in self into which junk is delivered. - New in version 3.0. 
 - 
get_permissions()¶
- Returns: - Permissions of the self, a bit-or of - Camel.StorePermissionFlags- Return type: - int- New in version 3.24. 
 - 
get_trash_folder(io_priority, cancellable, callback, *user_data)¶
- Parameters: - io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously gets the folder in self into which trash is delivered. - When the operation is finished, callback will be called. You can then call - Camel.Store.get_trash_folder_finish() to get the result of the operation.- New in version 3.0. 
- io_priority (
 - 
get_trash_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - the trash folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Finishes the operation started with - Camel.Store.get_trash_folder().- New in version 3.0. 
 - 
get_trash_folder_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - the trash folder for self, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in self into which trash is delivered. - New in version 3.0. 
 - 
initial_setup(io_priority, cancellable, callback, *user_data)¶
- Parameters: - io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Runs initial setup for the self asynchronously. - When the operation is finished, callback will be called. You can then call - Camel.Store.initial_setup_finish() to get the result of the operation.- The self advertises support of this function by including - Camel.StoreFlags.SUPPORTS_INITIAL_SETUPin- Camel.Store- ::flags.- New in version 3.20. 
- io_priority (
 - 
initial_setup_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- out_save_setup: - setup values to save - Return type: - ( - bool, out_save_setup: {- str:- str})- Finishes the operation started with - Camel.Store.initial_setup().- The save_setup result, if not - None, should be freed using- GLib.HashTable.destroy(). It’s not an error to have it- None, it only means the self doesn’t have anything to save.- New in version 3.20. 
 - 
initial_setup_sync(cancellable)¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- out_save_setup: - setup values to save - Return type: - ( - bool, out_save_setup: {- str:- str})- Runs initial setup for the self. 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 - Trueeven if it didn’t populate anything. The default implementation does just that.- The save_setup result, if not - None, should be freed using- GLib.HashTable.destroy(). It’s not an error to have it- None, it only means the self doesn’t have anything to save. Both the key and the value in the hash are newly allocated UTF-8 strings, owned by the hash table.- The self advertises support of this function by including - Camel.StoreFlags.SUPPORTS_INITIAL_SETUPin- Camel.Store- ::flags.- New in version 3.20. 
 - 
maybe_run_db_maintenance()¶
- Raises: - GLib.Error- Returns: - Whether succeeded. - Return type: - bool- Checks the state of the current - Camel.DBused for the self and eventually runs maintenance routines on it.- New in version 3.16. 
 - 
rename_folder(old_name, new_name, io_priority, cancellable, callback, *user_data)¶
- Parameters: - old_name (str) – the current name of the folder
- new_name (str) – the new name of the folder
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Asynchronously renames the folder described by old_name to new_name. - When the operation is finished, callback will be called. You can then call - Camel.Store.rename_folder_finish() to get the result of the operation.- New in version 3.0. 
- old_name (
 - 
rename_folder_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Finishes the operation started with - Camel.Store.rename_folder().- New in version 3.0. 
 - 
rename_folder_sync(old_name, new_name, cancellable)¶
- Parameters: - old_name (str) – the current name of the folder
- new_name (str) – the new name of the folder
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - Renames the folder described by old_name to new_name. - New in version 3.0. 
- old_name (
 - 
set_flags(flags)¶
- Parameters: - flags ( - int) – bit-or of- Camel.StoreFlags- Sets flags for the self, a bit-or of - Camel.StoreFlags.- New in version 3.24. 
 - 
set_permissions(permissions)¶
- Parameters: - permissions ( - int) – permissions of the self, a bit-or of- Camel.StorePermissionFlags- Sets permissions for the self, a bit-or of - Camel.StorePermissionFlags- New in version 3.24. 
 - 
synchronize(expunge, io_priority, cancellable, callback, *user_data)¶
- Parameters: - expunge (bool) – whether to expunge after synchronizing
- io_priority (int) – the I/O priority of the request
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_data (objectorNone) – data to pass to the callback function
 - Synchronizes any changes that have been made to self and its folders with the real store asynchronously. - When the operation is finished, callback will be called. You can then call - Camel.Store.synchronize_finish() to get the result of the operation.- New in version 3.0. 
- expunge (
 - 
synchronize_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon error- Return type: - bool- Finishes the operation started with - Camel.Store.synchronize().- New in version 3.0. 
 - 
synchronize_sync(expunge, cancellable)¶
- Parameters: - expunge (bool) – whether to expunge after synchronizing
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Return type: - Synchronizes any changes that have been made to self and its folders with the real store. - New in version 3.0. 
- expunge (
 - 
do_can_refresh_folder(info) virtual¶
- Parameters: - info ( - Camel.FolderInfo) – a- Camel.FolderInfo- Returns: - whether folder should be checked for new mails - Return type: - bool- 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. - New in version 2.22. 
 - 
do_create_folder_sync(parent_name, folder_name, cancellable) virtual¶
- Parameters: - parent_name (strorNone) – name of the new folder’s parent, orNone
- folder_name (str) – name of the folder to create
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - info about the created folder, or - Noneon error- Return type: - Creates a new folder as a child of an existing folder. parent_name can be - Noneto create a new top-level folder. The returned- Camel.FolderInfostruct should be freed with- Camel.FolderInfo.free().- New in version 3.0. 
- parent_name (
 - 
do_delete_folder_sync(folder_name, cancellable) virtual¶
- Parameters: - folder_name (str) – name of the folder to delete
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Return type: - Deletes the folder described by folder_name. The folder must be empty. - New in version 3.0. 
- folder_name (
 - 
do_folder_created(folder_info) virtual¶
- Parameters: - folder_info ( - Camel.FolderInfo) – information about the created folder- Emits the - Camel.Store- ::folder-createdsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
 - 
do_folder_deleted(folder_info) virtual¶
- Parameters: - folder_info ( - Camel.FolderInfo) – information about the deleted folder- Emits the - Camel.Store- ::folder-deletedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
 - 
do_folder_info_stale() virtual¶
- Emits the - Camel.Store- ::folder-info-stalesignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_LOW.- See the - Camel.Store- ::folder-info-staledocumentation for details on when to use this signal.- This function is only intended for Camel providers. - New in version 3.10. 
 - 
do_folder_opened(folder) virtual¶
- Parameters: - folder ( - Camel.Folder) – the- Camel.Folderthat was opened- Emits the - Camel.Store- ::folder-openedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 3.0. 
 - 
do_folder_renamed(old_name, folder_info) virtual¶
- Parameters: - old_name (str) – the old name of the folder
- folder_info (Camel.FolderInfo) – information about the renamed folder
 - Emits the - Camel.Store- ::folder-renamedsignal from an idle source on the main loop. The idle source’s priority is- GLib.PRIORITY_HIGH_IDLE.- This function is only intended for Camel providers. - New in version 2.32. 
- old_name (
 - 
do_get_can_auto_save_changes() virtual¶
- Returns: - Whether there can be done automatic save of folder changes. - Return type: - bool- 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().- New in version 3.38.2. 
 - 
do_get_folder_info_sync(top, flags, cancellable) virtual¶
- Parameters: - top (strorNone) – the name of the folder to start from
- flags (Camel.StoreGetFolderInfoFlags) – various CAMEL_STORE_FOLDER_INFO_* flags to control behavior
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - a - Camel.FolderInfotree, or- Noneon error- Return type: - This fetches information about the folder structure of store, starting with top, and returns a tree of - Camel.FolderInfostructures. If flags includes- Camel.StoreGetFolderInfoFlags.SUBSCRIBED, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If flags includes- Camel.StoreGetFolderInfoFlags.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.StoreGetFolderInfoFlags.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.StoreGetFolderInfoFlags.NO_VIRTUAL, don’t include special virtual folders (such as vTrash or vJunk).- The returned - Camel.FolderInfotree should be freed with- Camel.FolderInfo.free().- The - Camel.StoreGetFolderInfoFlags.FASTflag should be considered deprecated; most backends will behave the same whether it is supplied or not. The only guaranteed way to get updated folder counts is to both open the folder and invoke- Camel.Folder.refresh_info() it.- New in version 3.0. 
- top (
 - 
do_get_folder_sync(folder_name, flags, cancellable) virtual¶
- Parameters: - folder_name (str) – name of the folder to get
- flags (Camel.StoreGetFolderFlags) – folder flags (create, save body index, etc)
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - the requested - Camel.Folderobject, or- Noneon error- Return type: - Camel.Folderor- None- Gets a specific folder object from store by name. - New in version 3.0. 
- folder_name (
 - 
do_get_inbox_folder_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - the inbox folder for store, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in store into which new mail is delivered. - New in version 3.0. 
 - 
do_get_junk_folder_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - the junk folder for store, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in store into which junk is delivered. - New in version 3.0. 
 - 
do_get_trash_folder_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - the trash folder for store, or - Noneon error or if no such folder exists- Return type: - Camel.Folderor- None- Gets the folder in store into which trash is delivered. - New in version 3.0. 
 - 
do_initial_setup_sync(cancellable) virtual¶
- Parameters: - cancellable ( - Gio.Cancellableor- None) – optional- Gio.Cancellableobject, or- None- Returns: - Trueon success,- Falseon error- out_save_setup: - setup values to save - Return type: - ( - bool, out_save_setup: {- str:- str})- 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 - Trueeven if it didn’t populate anything. The default implementation does just that.- The save_setup result, if not - None, should be freed using- GLib.HashTable.destroy(). It’s not an error to have it- None, it only means the store doesn’t have anything to save. Both the key and the value in the hash are newly allocated UTF-8 strings, owned by the hash table.- The store advertises support of this function by including - Camel.StoreFlags.SUPPORTS_INITIAL_SETUPin- Camel.Store- ::flags.- New in version 3.20. 
 - 
do_rename_folder_sync(old_name, new_name, cancellable) virtual¶
- Parameters: - old_name (str) – the current name of the folder
- new_name (str) – the new name of the folder
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Return type: - Renames the folder described by old_name to new_name. - New in version 3.0. 
- old_name (
 - 
do_synchronize_sync(expunge, cancellable) virtual¶
- Parameters: - expunge (bool) – whether to expunge after synchronizing
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Return type: - Synchronizes any changes that have been made to store and its folders with the real store. - New in version 3.0. 
- expunge (
 
- 
Signal Details¶
- 
Camel.Store.signals.folder_created(store, object)¶
- Signal Name: - folder-created- Flags: - Parameters: - store (Camel.Store) – The object which received the signal
- object (Camel.FolderInfo) –
 
- store (
- 
Camel.Store.signals.folder_deleted(store, object)¶
- Signal Name: - folder-deleted- Flags: - Parameters: - store (Camel.Store) – The object which received the signal
- object (Camel.FolderInfo) –
 
- store (
- 
Camel.Store.signals.folder_info_stale(store)¶
- Signal Name: - folder-info-stale- Flags: - RUN_FIRST- Parameters: - store ( - Camel.Store) – The object which received the signal- This signal indicates significant changes have occurred to the folder hierarchy of store, and that previously fetched - Camel.FolderInfodata should be considered stale.- Applications should handle this signal by replacing cached - Camel.FolderInfodata for store with fresh data by way of- Camel.Store.get_folder_info().- More often than not this signal will be emitted as a result of user preference changes rather than actual server-side changes. For example, a user may change a preference that reveals a set of folders previously hidden from view, or that alters whether to augment the store with virtual Junk and Trash folders. 
- 
Camel.Store.signals.folder_opened(store, object)¶
- Signal Name: - folder-opened- Flags: - Parameters: - store (Camel.Store) – The object which received the signal
- object (Camel.Folder) –
 
- store (
- 
Camel.Store.signals.folder_renamed(store, object, p0)¶
- Signal Name: - folder-renamed- Flags: - Parameters: - store (Camel.Store) – The object which received the signal
- object (str) –
- p0 (Camel.FolderInfo) –
 
- store (