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.

Hierarchy

hierarchy this CamelStoreSummary ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

camel_store_summary_new

Create a new CamelStoreSummary object.

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_count

Get the number of summary items stored in this summary.

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_info_new

Allocate a new CamelStoreInfo, suitable for adding to this summary.

camel_store_summary_load

Load the summary off disk.

camel_store_summary_path

Retrieve a summary item by path name.

camel_store_summary_remove

Remove a specific info record from the summary.

camel_store_summary_remove_path

Remove a specific info record from the summary, by path.

camel_store_summary_save

Writes the summary to disk. The summary is only written if changes have occurred.

camel_store_summary_set_filename

Set the filename where the summary will be loaded to/saved from.

camel_store_summary_sort

Sorts the array of the folders using the compare_func.

since: 3.24

camel_store_summary_touch

Mark the summary as changed, so that a save will force it to be written back to disk.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

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: GObjectClass

No description available.

store_info_size: gsize

No 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: gpointer

No description available.

Virtual methods

Camel.StoreSummaryClass.store_info_free
No description available.

Camel.StoreSummaryClass.store_info_load
No description available.

Camel.StoreSummaryClass.store_info_new
No description available.

Camel.StoreSummaryClass.store_info_save
No description available.