Camel.StoreSummary¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.StoreSummary(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Camel.StoreSummary
object- Return type:
Create a new
Camel.StoreSummary
object.
- add(info)¶
- Parameters:
info (
Camel.StoreInfo
) – aCamel.StoreInfo
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.
- add_from_path(path)¶
- Parameters:
path (
str
) – item path- Returns:
the newly added record or
None
if the path already exists- Return type:
Build a new info record based on the name, and add it to the summary.
- array()¶
- Returns:
the summary array
- Return type:
Obtain a copy of the summary array. This is done atomically, so cannot contain empty entries.
It must be freed using g_ptr_array_unref().
- array_free(array)¶
- Parameters:
array ([
Camel.StoreInfo
]) – the summary array as gotten fromCamel.StoreSummary.array
()
Free the folder summary array.
Deprecated since version 3.46: Use g_ptr_array_unref() directly.
- connect_folder_summary(path, folder_summary)¶
- Parameters:
path (
str
) – used path for folder_summaryfolder_summary (
Camel.FolderSummary
) – aCamel.FolderSummary
object
- Returns:
Whether successfully connect callbacks for count change notifications.
- Return type:
Connects listeners for count changes on folder_summary to keep Camel.StoreInfo.total and Camel.StoreInfo.unread in sync transparently. The folder_summary is stored in self as path. Use
Camel.StoreSummary.disconnect_folder_summary
() to disconnect from listening.New in version 3.4.
- count()¶
-
Get the number of summary items stored in this summary.
- disconnect_folder_summary(folder_summary)¶
- Parameters:
folder_summary (
Camel.FolderSummary
) – aCamel.FolderSummary
object- Returns:
Whether such connection existed and whether was successfully removed.
- Return type:
Diconnects count change listeners previously connected by
Camel.StoreSummary.connect_folder_summary
().New in version 3.4.
- info_new()¶
- Returns:
the newly allocated
Camel.StoreInfo
- Return type:
Allocate a new
Camel.StoreInfo
, suitable for adding to this summary.
- info_unref(info)¶
- Parameters:
info (
Camel.StoreInfo
) – aCamel.StoreInfo
Unref and potentially free info, and all associated memory.
Deprecated since version 3.46: Use
Camel.StoreInfo.unref
() instead.
- remove(info)¶
- Parameters:
info (
Camel.StoreInfo
) – aCamel.StoreInfo
Remove a specific info record from the summary.
- remove_path(path)¶
- Parameters:
path (
str
) – item path
Remove a specific info record from the summary, by path.
- save()¶
- Returns:
0 on success or -1 on fail
- Return type:
Writes the summary to disk. The summary is only written if changes have occurred.
- set_filename(filename)¶
- Parameters:
filename (
str
) – a filename
Set the filename where the summary will be loaded to/saved from.
- sort(compare_func, *user_data)¶
- Parameters:
compare_func (
GLib.CompareDataFunc
) – a compare functionuser_data (
object
orNone
) – user data passed to the compare_func
Sorts the array of the folders using the compare_func.
New in version 3.24.
- touch()¶
Mark the summary as changed, so that a save will force it to be written back to disk.
- do_store_info_free(info) virtual¶
- Parameters:
info (
Camel.StoreInfo
) –
- do_store_info_load(file) virtual¶
- Parameters:
- Return type:
- do_store_info_save(file, info) virtual¶
- Parameters:
info (
Camel.StoreInfo
) –
- Return type:
- do_store_info_set_value(info, type, value) virtual¶
- Parameters:
info (
Camel.StoreInfo
) –type (
int
) –value (
str
) –