Top | ![]() |
![]() |
![]() |
![]() |
#define | CAMEL_STORE_ERROR |
#define | CAMEL_STORE_SETUP_ARCHIVE_FOLDER |
#define | CAMEL_STORE_SETUP_DRAFTS_FOLDER |
#define | CAMEL_STORE_SETUP_SENT_FOLDER |
#define | CAMEL_STORE_SETUP_TEMPLATES_FOLDER |
enum | CamelStoreError |
enum | CamelStoreGetFolderFlags |
CamelObjectBag *
camel_store_get_folders_bag (CamelStore *store
);
Since: 3.24
GPtrArray * camel_store_dup_opened_folders ();
CamelStore *store
Returns a store
. 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);
an array with all currently
opened folders for the store
.
[element-type CamelFolder][transfer full]
Since: 3.24
void camel_store_set_flags (,
CamelStore *store);
guint32 flags
Sets flags for the store
, a bit-or of CamelStoreFlags.
Since: 3.24
void camel_store_set_permissions (,
CamelStore *store);
guint32 permissions
Sets permissions for the store
, a bit-or of CamelStorePermissionFlags
store |
a |
|
permissions |
permissions of the |
Since: 3.24
void camel_store_folder_created (,
CamelStore *store);
CamelFolderInfo *folder_info
Emits the
This function is only intended for Camel providers.
Since: 2.32
void camel_store_folder_deleted (,
CamelStore *store);
CamelFolderInfo *folder_info
Emits the
This function is only intended for Camel providers.
Since: 2.32
void camel_store_folder_opened (,
CamelStore *store);
CamelFolder *folder
Emits the
This function is only intended for Camel providers.
Since: 3.0
void camel_store_folder_renamed (,
CamelStore *storeconst
,gchar *old_name);
CamelFolderInfo *folder_info
Emits the
This function is only intended for Camel providers.
store |
a |
|
old_name |
the old name of the folder |
|
folder_info |
information about the renamed folder |
Since: 2.32
void camel_store_folder_info_stale ();
CamelStore *store
Emits the
See the
This function is only intended for Camel providers.
Since: 3.10
CamelFolderInfo * camel_folder_info_new (void
);
Allocates a new camel_folder_info_free()
.
Since: 2.22
CamelFolderInfo * camel_folder_info_build (,
GPtrArray *foldersconst
,gchar *namespace_,
gchar separator);
gboolean short_names
camel_folder_info_build
is deprecated and should not be used in newly-written code.
This takes an array of folders and attaches them together according
to the hierarchy described by their full_names and separator
. If
namespace_
is non-NULL
camel_folder_info_build()
will create additional NULL
short_names
is used in constructing the names of these intermediate folders.
NOTE: This is deprected, do not use this. FIXME: remove this/move it to imap, which is the only user of it now.
folders |
an array of |
[element-type CamelFolderInfo] |
namespace_ |
an ignorable prefix on the folder names |
|
separator |
the hieararchy separator character |
|
short_names |
|
CamelFolderInfo * camel_folder_info_clone ();
CamelFolderInfo *fi
camel_folder_info_clone
is deprecated and should not be used in newly-written code.
Clones fi
recursively.
gboolean camel_store_can_refresh_folder (,
CamelStore *store,
CamelFolderInfo *info);
GError **error
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
CamelFolder * camel_store_get_folder_sync (,
CamelStore *storeconst
,gchar *folder_nameCamelStoreGetFolderFlags flags
,,
GCancellable *cancellable);
GError **error
Gets a specific folder object from store
by name.
store |
a |
|
folder_name |
name of the folder to get |
|
flags |
folder flags (create, save body index, etc) |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_get_folder (,
CamelStore *storeconst
,gchar *folder_nameCamelStoreGetFolderFlags flags
,,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously gets a specific folder object from store
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.
store |
a |
|
folder_name |
name of the folder to get |
|
flags |
folder flags (create, save body index, etc) |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolder * camel_store_get_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_get_folder()
.
Since: 3.0
CamelFolderInfo * camel_store_get_folder_info_sync (,
CamelStore *storeconst
,gchar *topCamelStoreGetFolderInfoFlags flags
,,
GCancellable *cancellable);
GError **error
This fetches information about the folder structure of store
,
starting with top
, and returns a tree of 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
flags
includes
CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL
, don't include special virtual
folders (such as vTrash or vJunk).
The returned camel_folder_info_free()
.
The CAMEL_STORE_FOLDER_INFO_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 invoke refresh_info()
store |
a |
|
top |
the name of the folder to start from. |
[nullable] |
flags |
various CAMEL_STORE_FOLDER_INFO_* flags to control behavior |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_get_folder_info (,
CamelStore *storeconst
,gchar *topCamelStoreGetFolderInfoFlags flags
,,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously fetches information about the folder structure of store
,
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.
store |
a |
|
top |
the name of the folder to start from. |
[nullable] |
flags |
various CAMEL_STORE_FOLDER_INFO_* flags to control behavior |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolderInfo * camel_store_get_folder_info_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_get_folder_info()
.
The returned camel_folder_info_free()
.
store |
a |
|
result |
a |
|
error |
return location for a |
[nullable] |
Since: 3.0
CamelFolder * camel_store_get_inbox_folder_sync (,
CamelStore *store,
GCancellable *cancellable);
GError **error
Gets the folder in store
into which new mail is delivered.
store |
a |
|
cancellable |
optional |
|
error |
return location for a |
the inbox folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
void camel_store_get_inbox_folder (,
CamelStore *store,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously gets the folder in store
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.
store |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolder * camel_store_get_inbox_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_get_inbox_folder()
.
the inbox folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
CamelFolder * camel_store_get_junk_folder_sync (,
CamelStore *store,
GCancellable *cancellable);
GError **error
Gets the folder in store
into which junk is delivered.
store |
a |
|
cancellable |
optional |
|
error |
return location for a |
the junk folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
void camel_store_get_junk_folder (,
CamelStore *store,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously gets the folder in store
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.
store |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolder * camel_store_get_junk_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_get_junk_folder()
.
the junk folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
CamelFolder * camel_store_get_trash_folder_sync (,
CamelStore *store,
GCancellable *cancellable);
GError **error
Gets the folder in store
into which trash is delivered.
store |
a |
|
cancellable |
optional |
|
error |
return location for a |
the trash folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
void camel_store_get_trash_folder (,
CamelStore *store,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously gets the folder in store
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.
store |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolder * camel_store_get_trash_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_get_trash_folder()
.
the trash folder for store
, or NULL
[transfer full][nullable]
Since: 3.0
CamelFolderInfo * camel_store_create_folder_sync (,
CamelStore *storeconst
,gchar *parent_nameconst
,gchar *folder_name,
GCancellable *cancellable);
GError **error
Creates a new folder as a child of an existing folder.
parent_name
can be NULL
camel_folder_info_free()
.
store |
a |
|
parent_name |
name of the new folder's parent, or |
[nullable] |
folder_name |
name of the folder to create |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_create_folder (,
CamelStore *storeconst
,gchar *parent_nameconst
,gchar *folder_name,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously creates a new folder as a child of an existing folder.
parent_name
can be NULL
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.
store |
a |
|
parent_name |
name of the new folder's parent, or |
[nullable] |
folder_name |
name of the folder to create |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
CamelFolderInfo * camel_store_create_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_create_folder()
.
The returned camel_folder_info_free()
.
Since: 3.0
gboolean camel_store_delete_folder_sync (,
CamelStore *storeconst
,gchar *folder_name,
GCancellable *cancellable);
GError **error
Deletes the folder described by folder_name
. The folder must be empty.
store |
a |
|
folder_name |
name of the folder to delete |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_delete_folder (,
CamelStore *storeconst
,gchar *folder_name,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
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.
store |
a |
|
folder_name |
name of the folder to delete |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
gboolean camel_store_delete_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_delete_folder()
.
Since: 3.0
gboolean camel_store_rename_folder_sync (,
CamelStore *storeconst
,gchar *old_nameconst
,gchar *new_name,
GCancellable *cancellable);
GError **error
Renames the folder described by old_name
to new_name
.
store |
a |
|
old_name |
the current name of the folder |
|
new_name |
the new name of the folder |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_rename_folder (,
CamelStore *storeconst
,gchar *old_nameconst
,gchar *new_name,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
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.
store |
a |
|
old_name |
the current name of the folder |
|
new_name |
the new name of the folder |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
gboolean camel_store_rename_folder_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_rename_folder()
.
Since: 3.0
gboolean camel_store_synchronize_sync (,
CamelStore *store,
gboolean expunge,
GCancellable *cancellable);
GError **error
Synchronizes any changes that have been made to store
and its folders
with the real store.
store |
a |
|
expunge |
whether to expunge after synchronizing |
|
cancellable |
optional |
|
error |
return location for a |
Since: 3.0
void camel_store_synchronize (,
CamelStore *store,
gboolean expunge,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Synchronizes any changes that have been made to store
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.
store |
a |
|
expunge |
whether to expunge after synchronizing |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.0
gboolean camel_store_synchronize_finish (,
CamelStore *store,
GAsyncResult *result);
GError **error
Finishes the operation started with camel_store_synchronize()
.
Since: 3.0
gboolean camel_store_initial_setup_sync (,
CamelStore *store,
GHashTable **out_save_setup,
GCancellable *cancellable);
GError **error
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
The save_setup result, if not NULL
g_hash_table_destroy()
NULL
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_STORE_SUPPORTS_INITIAL_SETUP in CamelStore::flags.
store |
a |
|
out_save_setup |
setup values to save. |
[out][transfer container][element-type utf8 utf8] |
cancellable |
optional |
|
error |
return location for a |
Since: 3.20
void camel_store_initial_setup (,
CamelStore *store,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Runs initial setup for the store
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 store
advertises support of this function by including
CAMEL_STORE_SUPPORTS_INITIAL_SETUP in CamelStore::flags.
store |
a |
|
io_priority |
the I/O priority of the request |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.20
gboolean camel_store_initial_setup_finish (,
CamelStore *store,
GAsyncResult *result,
GHashTable **out_save_setup);
GError **error
Finishes the operation started with camel_store_initial_setup()
.
The save_setup result, if not NULL
g_hash_table_destroy()
NULL
store
doesn't have anything to save.
store |
a |
|
result |
a |
|
out_save_setup |
setup values to save. |
[out][transfer container][element-type utf8 utf8] |
error |
return location for a |
Since: 3.20
gboolean camel_store_maybe_run_db_maintenance (,
CamelStore *store);
GError **error
Checks the state of the current CamelDB used for the store
and eventually
runs maintenance routines on it.
Since: 3.16
void camel_store_delete_cached_folder (,
CamelStore *storeconst
);gchar *folder_name
Deletes local data for the given folder_name
. The folder should
be 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.
Since: 3.24
#define CAMEL_STORE_SETUP_ARCHIVE_FOLDER "Account:Mail Account:archive-folder:f"
#define CAMEL_STORE_SETUP_DRAFTS_FOLDER "Submission:Mail Composition:drafts-folder:f"
#define CAMEL_STORE_SETUP_SENT_FOLDER "Submission:Mail Submission:sent-folder:f"
#define CAMEL_STORE_SETUP_TEMPLATES_FOLDER "Submission:Mail Composition:templates-folder:f"