Camel.Store¶
- Subclasses:
Methods¶
- Inherited:
Camel.Service (32), Camel.Object (4), GObject.Object (37), Gio.Initable (2)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Camel.Service (5), Camel.Object (2), GObject.Object (7), Gio.Initable (1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
This signal indicates significant changes have occurred to the folder hierarchy of store, and that previously fetched |
|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.Store(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- can_refresh_folder(info)¶
- Parameters:
info (
Camel.FolderInfo
) – aCamel.FolderInfo
- Raises:
- Returns:
whether folder should be checked for new mails
- Return type:
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 (
str
orNone
) – name of the new folder’s parent, orNone
folder_name (
str
) – name of the folder to createio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – data to pass to the callback function
Asynchronously creates a new folder as a child of an existing folder. parent_name can be
None
to 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.
- create_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
info about the created folder, or
None
on error- Return type:
Finishes the operation started with
Camel.Store.create_folder
(). The returnedCamel.FolderInfo
struct should be freed withCamel.FolderInfo.free
().New in version 3.0.
- create_folder_sync(parent_name, folder_name, cancellable)¶
- Parameters:
parent_name (
str
orNone
) – name of the new folder’s parent, orNone
folder_name (
str
) – name of the folder to createcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
info about the created folder, or
None
on error- Return type:
Creates a new folder as a child of an existing folder. parent_name can be
None
to create a new top-level folder. The returnedCamel.FolderInfo
struct should be freed withCamel.FolderInfo.free
().New in version 3.0.
- 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.part
of 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 deleteio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- delete_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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 deletecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Deletes the folder described by folder_name. The folder must be empty.
New in version 3.0.
- dup_opened_folders()¶
- Returns:
an array with all currently opened folders for the self.
- Return type:
Returns a
GLib.PtrArray
of 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-created
signal from an idle source on the main loop. The idle source’s priority isGLib.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-deleted
signal from an idle source on the main loop. The idle source’s priority isGLib.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-stale
signal from an idle source on the main loop. The idle source’s priority isGLib.PRIORITY_LOW
.See the
Camel.Store
::folder-info-stale
documentation 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
) – theCamel.Folder
that was opened
Emits the
Camel.Store
::folder-opened
signal from an idle source on the main loop. The idle source’s priority isGLib.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 folderfolder_info (
Camel.FolderInfo
) – information about the renamed folder
Emits the
Camel.Store
::folder-renamed
signal from an idle source on the main loop. The idle source’s priority isGLib.PRIORITY_HIGH_IDLE
.This function is only intended for Camel providers.
New in version 2.32.
- get_can_auto_save_changes()¶
- Returns:
Whether there can be done automatic save of folder changes.
- Return type:
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.40.
- get_db()¶
-
New in version 3.24.
- get_flags()¶
- Returns:
bit-or of
Camel.StoreFlags
set for the self- Return type:
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 getflags (
Camel.StoreGetFolderFlags
) – folder flags (create, save body index, etc)io_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- get_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the requested
Camel.Folder
object, orNone
on error- Return type:
Camel.Folder
orNone
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:
flags (
Camel.StoreGetFolderInfoFlags
) – various CAMEL_STORE_FOLDER_INFO_* flags to control behaviorio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- get_folder_info_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a
Camel.FolderInfo
tree, orNone
on error- Return type:
Finishes the operation started with
Camel.Store.get_folder_info
(). The returnedCamel.FolderInfo
tree should be freed withCamel.FolderInfo.free
().New in version 3.0.
- get_folder_info_sync(top, flags, cancellable)¶
- Parameters:
flags (
Camel.StoreGetFolderInfoFlags
) – various CAMEL_STORE_FOLDER_INFO_* flags to control behaviorcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
a
Camel.FolderInfo
tree, orNone
on error- Return type:
This fetches information about the folder structure of self, starting with top, and returns a tree of
Camel.FolderInfo
structures. If flags includesCamel.StoreGetFolderInfoFlags.SUBSCRIBED
, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If flags includesCamel.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 includesCamel.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 includesCamel.StoreGetFolderInfoFlags.NO_VIRTUAL
, don’t include special virtual folders (such as vTrash or vJunk).The returned
Camel.FolderInfo
tree should be freed withCamel.FolderInfo.free
().The
Camel.StoreGetFolderInfoFlags.FAST
flag 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 invokeCamel.Folder.refresh_info
() it.New in version 3.0.
- get_folder_sync(folder_name, flags, cancellable)¶
- Parameters:
folder_name (
str
) – name of the folder to getflags (
Camel.StoreGetFolderFlags
) – folder flags (create, save body index, etc)cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the requested
Camel.Folder
object, orNone
on error- Return type:
Camel.Folder
orNone
Gets a specific folder object from self by name.
New in version 3.0.
- get_folders_bag()¶
- Returns:
a
Camel.ObjectBag
of openedCamel.Folder
s- Return type:
New in version 3.24.
- get_inbox_folder(io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- get_inbox_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the inbox folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
Finishes the operation started with
Camel.Store.get_inbox_folder
().New in version 3.0.
- get_inbox_folder_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the inbox folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
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 requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- get_junk_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the junk folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
Finishes the operation started with
Camel.Store.get_junk_folder
().New in version 3.0.
- get_junk_folder_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the junk folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
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:
New in version 3.24.
- get_trash_folder(io_priority, cancellable, callback, *user_data)¶
- Parameters:
io_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- get_trash_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
the trash folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
Finishes the operation started with
Camel.Store.get_trash_folder
().New in version 3.0.
- get_trash_folder_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
the trash folder for self, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
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 requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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_SETUP
inCamel.Store
::flags
.New in version 3.20.
- initial_setup_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
on success,False
on error- out_save_setup:
setup values to save
- Return type:
Finishes the operation started with
Camel.Store.initial_setup
().The save_setup result, if not
None
, should be freed usingGLib.HashTable.destroy
(). It’s not an error to have itNone
, it only means the self doesn’t have anything to save.New in version 3.20.
- initial_setup_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
True
on success,False
on error- out_save_setup:
setup values to save
- Return type:
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
True
even if it didn’t populate anything. The default implementation does just that.The save_setup result, if not
None
, should be freed usingGLib.HashTable.destroy
(). It’s not an error to have itNone
, 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_SETUP
inCamel.Store
::flags
.New in version 3.20.
- maybe_run_db_maintenance()¶
- Raises:
- Returns:
Whether succeeded.
- Return type:
Checks the state of the current
Camel.DB
used 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 foldernew_name (
str
) – the new name of the folderio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- rename_folder_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
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 foldernew_name (
str
) – the new name of the foldercancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Raises:
- Returns:
- Return type:
Renames the folder described by old_name to new_name.
New in version 3.0.
- set_flags(flags)¶
- Parameters:
flags (
int
) – bit-or ofCamel.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 ofCamel.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 synchronizingio_priority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – 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.
- synchronize_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finishes the operation started with
Camel.Store.synchronize
().New in version 3.0.
- synchronize_sync(expunge, cancellable)¶
- Parameters:
expunge (
bool
) – whether to expunge after synchronizingcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, 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.
- do_can_refresh_folder(info) virtual¶
- Parameters:
info (
Camel.FolderInfo
) – aCamel.FolderInfo
- Returns:
whether folder should be checked for new mails
- Return type:
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 (
str
orNone
) – name of the new folder’s parent, orNone
folder_name (
str
) – name of the folder to createcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
info about the created folder, or
None
on error- Return type:
Creates a new folder as a child of an existing folder. parent_name can be
None
to create a new top-level folder. The returnedCamel.FolderInfo
struct should be freed withCamel.FolderInfo.free
().New in version 3.0.
- do_delete_folder_sync(folder_name, cancellable) virtual¶
- Parameters:
folder_name (
str
) – name of the folder to deletecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Deletes the folder described by folder_name. The folder must be empty.
New in version 3.0.
- do_folder_created(folder_info) virtual¶
- Parameters:
folder_info (
Camel.FolderInfo
) – information about the created folder
Emits the
Camel.Store
::folder-created
signal from an idle source on the main loop. The idle source’s priority isGLib.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-deleted
signal from an idle source on the main loop. The idle source’s priority isGLib.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-stale
signal from an idle source on the main loop. The idle source’s priority isGLib.PRIORITY_LOW
.See the
Camel.Store
::folder-info-stale
documentation 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
) – theCamel.Folder
that was opened
Emits the
Camel.Store
::folder-opened
signal from an idle source on the main loop. The idle source’s priority isGLib.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 folderfolder_info (
Camel.FolderInfo
) – information about the renamed folder
Emits the
Camel.Store
::folder-renamed
signal from an idle source on the main loop. The idle source’s priority isGLib.PRIORITY_HIGH_IDLE
.This function is only intended for Camel providers.
New in version 2.32.
- do_get_can_auto_save_changes() virtual¶
- Returns:
Whether there can be done automatic save of folder changes.
- Return type:
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.40.
- do_get_folder_info_sync(top, flags, cancellable) virtual¶
- Parameters:
flags (
Camel.StoreGetFolderInfoFlags
) – various CAMEL_STORE_FOLDER_INFO_* flags to control behaviorcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
a
Camel.FolderInfo
tree, orNone
on error- Return type:
This fetches information about the folder structure of store, starting with top, and returns a tree of
Camel.FolderInfo
structures. If flags includesCamel.StoreGetFolderInfoFlags.SUBSCRIBED
, only subscribed folders will be listed. If the store doesn’t support subscriptions, then it will list all folders. If flags includesCamel.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 includesCamel.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 includesCamel.StoreGetFolderInfoFlags.NO_VIRTUAL
, don’t include special virtual folders (such as vTrash or vJunk).The returned
Camel.FolderInfo
tree should be freed withCamel.FolderInfo.free
().The
Camel.StoreGetFolderInfoFlags.FAST
flag 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 invokeCamel.Folder.refresh_info
() it.New in version 3.0.
- do_get_folder_sync(folder_name, flags, cancellable) virtual¶
- Parameters:
folder_name (
str
) – name of the folder to getflags (
Camel.StoreGetFolderFlags
) – folder flags (create, save body index, etc)cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the requested
Camel.Folder
object, orNone
on error- Return type:
Camel.Folder
orNone
Gets a specific folder object from store by name.
New in version 3.0.
- do_get_inbox_folder_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the inbox folder for store, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the junk folder for store, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
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.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
the trash folder for store, or
None
on error or if no such folder exists- Return type:
Camel.Folder
orNone
Gets the folder in store into which trash is delivered.
New in version 3.0.
- do_initial_setup_sync(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
True
on success,False
on error- out_save_setup:
setup values to save
- Return type:
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.The save_setup result, if not
None
, should be freed usingGLib.HashTable.destroy
(). It’s not an error to have itNone
, 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_SETUP
inCamel.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 foldernew_name (
str
) – the new name of the foldercancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, orNone
- Returns:
- Return type:
Renames the folder described by old_name to new_name.
New in version 3.0.
- do_synchronize_sync(expunge, cancellable) virtual¶
- Parameters:
expunge (
bool
) – whether to expunge after synchronizingcancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object, 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.
Signal Details¶
- Camel.Store.signals.folder_created(store, object)¶
- Signal Name:
folder-created
- Flags:
- Parameters:
store (
Camel.Store
) – The object which received the signalobject (
Camel.FolderInfo
) –
- Camel.Store.signals.folder_deleted(store, object)¶
- Signal Name:
folder-deleted
- Flags:
- Parameters:
store (
Camel.Store
) – The object which received the signalobject (
Camel.FolderInfo
) –
- Camel.Store.signals.folder_info_stale(store)¶
- Signal Name:
folder-info-stale
- Flags:
- 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.FolderInfo
data should be considered stale.Applications should handle this signal by replacing cached
Camel.FolderInfo
data for store with fresh data by way ofCamel.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 signalobject (
Camel.Folder
) –
- Camel.Store.signals.folder_renamed(store, object, p0)¶
- Signal Name:
folder-renamed
- Flags:
- Parameters:
store (
Camel.Store
) – The object which received the signalobject (
str
) –p0 (
Camel.FolderInfo
) –