Class
CamelStoreSummary
Description [src]
class Camel.StoreSummary : GObject.Object
{
CamelStoreSummaryPrivate* priv
}
Cached folder listing for a mail store.
CamelStoreSummary is a helper class used by CamelStore implementations
to cache the list of known folders and their metadata (name, flags, unread
count, etc.). Like CamelFolderSummary for messages, it avoids the need to
query the remote server for the folder list on every session start.
The summary is stored on disk in a versioned binary format that supports subclassing, so backend-specific implementations can add their own per-folder fields.
Backends subclass CamelStoreSummary to store additional information
relevant to their storage format, and typically call
camel_store_summary_load() at startup and camel_store_summary_save()
when the folder list changes.
Instance methods
camel_store_summary_add
The info record should have been generated by calling one of the
info_new_*() functions, as it will be free’d based on the summary
class. And MUST NOT be allocated directly using malloc.
camel_store_summary_add_from_path
Build a new info record based on the name, and add it to the summary.
camel_store_summary_array
Obtain a copy of the summary array. This is done atomically, so cannot contain empty entries.
camel_store_summary_connect_folder_summary
Connects listeners for count changes on folder_summary to keep
CamelStoreInfo.total and CamelStoreInfo.unread in sync transparently. The folder_summary is stored in summary as path. Use
camel_store_summary_disconnect_folder_summary() to disconnect from listening.
since: 3.4
camel_store_summary_disconnect_folder_summary
Diconnects count change listeners previously connected by camel_store_summary_connect_folder_summary().
since: 3.4
camel_store_summary_save
Writes the summary to disk. The summary is only written if changes have occurred.
camel_store_summary_touch
Mark the summary as changed, so that a save will force it to be written back to disk.
Signals
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 CamelStoreSummaryClass {
GObjectClass parent_class;
gsize store_info_size;
gint (* summary_header_load) (
CamelStoreSummary* summary,
FILE* file
);
gint (* summary_header_save) (
CamelStoreSummary* summary,
FILE* file
);
CamelStoreInfo* (* store_info_new) (
CamelStoreSummary* summary,
const gchar* path
);
CamelStoreInfo* (* store_info_load) (
CamelStoreSummary* summary,
FILE* file
);
gint (* store_info_save) (
CamelStoreSummary* summary,
FILE* file,
CamelStoreInfo* info
);
void (* store_info_free) (
CamelStoreSummary* summary,
CamelStoreInfo* info
);
void (* store_info_set_value) (
CamelStoreSummary* summary,
CamelStoreInfo* info,
gint type,
const gchar* value
);
gpointer reserved;
}
No description available.
Class members
parent_class: GObjectClassNo description available.
store_info_size: gsizeNo description available.
summary_header_load: gint (* summary_header_load) ( CamelStoreSummary* summary, FILE* file )No description available.
summary_header_save: gint (* summary_header_save) ( CamelStoreSummary* summary, FILE* file )No description available.
store_info_new: CamelStoreInfo* (* store_info_new) ( CamelStoreSummary* summary, const gchar* path )No description available.
store_info_load: CamelStoreInfo* (* store_info_load) ( CamelStoreSummary* summary, FILE* file )No description available.
store_info_save: gint (* store_info_save) ( CamelStoreSummary* summary, FILE* file, CamelStoreInfo* info )No description available.
store_info_free: void (* store_info_free) ( CamelStoreSummary* summary, CamelStoreInfo* info )No description available.
store_info_set_value: void (* store_info_set_value) ( CamelStoreSummary* summary, CamelStoreInfo* info, gint type, const gchar* value )No description available.
reserved: gpointerNo description available.