Top | ![]() |
![]() |
![]() |
![]() |
guint | deleted-count | Read |
CamelFolder * | folder | Read / Write / Construct Only |
guint | junk-count | Read |
guint | junk-not-deleted-count | Read |
guint | saved-count | Read |
guint | unread-count | Read |
guint | visible-count | Read |
GObject ╰── CamelFolderSummary ├── CamelIMAPXSummary ├── CamelLocalSummary ├── CamelNNTPSummary ╰── CamelVeeSummary
CamelFolderSummary *
camel_folder_summary_new (struct _CamelFolder *folder
);
Create a new CamelFolderSummary object.
struct _CamelFolder *
camel_folder_summary_get_folder (CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_flags (CamelFolderSummary *summary
);
Since: 3.24
void camel_folder_summary_set_flags (CamelFolderSummary *summary
,guint32 flags
);
Sets flags of the summary
, a bit-or of CamelFolderSummaryFlags.
Since: 3.24
gint64
camel_folder_summary_get_timestamp (CamelFolderSummary *summary
);
Since: 3.24
void camel_folder_summary_set_timestamp (CamelFolderSummary *summary
,gint64 timestamp
);
Sets timestamp of the summary
, provided by the descendants. This doesn't
change the 'dirty' flag of the summary
.
Since: 3.24
guint32
camel_folder_summary_get_version (CamelFolderSummary *summary
);
Since: 3.24
void camel_folder_summary_set_version (CamelFolderSummary *summary
,guint32 version
);
Sets version of the summary
.
Since: 3.24
guint32
camel_folder_summary_get_saved_count (CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_unread_count (CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_deleted_count
(CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_junk_count (CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_junk_not_deleted_count
(CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_get_visible_count
(CamelFolderSummary *summary
);
Since: 3.4
void camel_folder_summary_set_index (CamelFolderSummary *summary
,CamelIndex *index
);
Set the index used to index body content. If the index is NULL
, or
not set (the default), no indexing of body content will take place.
CamelIndex *
camel_folder_summary_get_index (CamelFolderSummary *summary
);
Since: 3.4
guint32
camel_folder_summary_next_uid (CamelFolderSummary *summary
);
Generate a new unique uid value as an integer. This may be used to create a unique sequence of numbers.
void camel_folder_summary_set_next_uid (CamelFolderSummary *summary
,guint32 uid
);
Set the next minimum uid available. This can be used to ensure new uid's do not clash with existing uid's.
summary |
a CamelFolderSummary object |
|
uid |
The next minimum uid to assign. To avoid clashing uid's, set this to the uid of a given messages + 1. |
guint32
camel_folder_summary_get_next_uid (CamelFolderSummary *summary
);
Next uid currently awaiting for assignment. The difference from
camel_folder_summary_next_uid()
is that this function returns actual
value and doesn't increment it before returning.
Since: 3.4
gchar *
camel_folder_summary_next_uid_string (CamelFolderSummary *summary
);
Retrieve the next uid, but as a formatted string.
gboolean camel_folder_summary_save (CamelFolderSummary *summary
,GError **error
);
Saves the content of the summary
to disk. It does nothing,
when the summary is not changed or when it doesn't support
permanent save.
Since: 3.24
gboolean camel_folder_summary_load (CamelFolderSummary *summary
,GError **error
);
Loads the summary from the disk. It also saves any pending changes first.
Since: 3.24
gboolean camel_folder_summary_header_load (CamelFolderSummary *summary
,struct _CamelStore *store
,const gchar *folder_name
,GError **error
);
Loads a summary header for the summary
, which corresponds to folder_name
provided by store
.
summary |
||
store |
||
folder_name |
a folder name corresponding to |
|
error |
return location for a GError, or |
Since: 3.24
gboolean camel_folder_summary_header_save (CamelFolderSummary *summary
,GError **error
);
Saves summary header information into the disk. The function does nothing, if the summary doesn't support save to disk.
Since: 3.24
void
camel_folder_summary_touch (CamelFolderSummary *summary
);
Mark the summary as changed, so that a save will force it to be written back to disk.
CamelMessageInfo * camel_folder_summary_info_new_from_headers (CamelFolderSummary *summary
,const CamelNameValueArray *headers
);
Create a new info record from a header.
[virtual message_info_new_from_headers]
a newly created CamelMessageInfo. Unref it
with g_object_unref()
, when done with it.
[transfer full]
Since: 3.24
CamelMessageInfo * camel_folder_summary_info_new_from_parser (CamelFolderSummary *summary
,CamelMimeParser *parser
);
Create a new info record from a parser. If the parser cannot determine a uid, then none will be assigned.
If indexing is enabled, and the parser cannot determine a new uid, then one is automatically assigned.
If indexing is enabled, then the content will be indexed based
on this new uid. In this case, the message info MUST be
added using :add()
.
Once complete, the parser will be positioned at the end of the message.
[virtual message_info_new_from_parser]
a newly created CamelMessageInfo. Unref it
with g_object_unref()
, when done with it.
[transfer full]
CamelMessageInfo * camel_folder_summary_info_new_from_message (CamelFolderSummary *summary
,CamelMimeMessage *message
);
Create a summary item from a message.
[virtual message_info_new_from_message]
a newly created CamelMessageInfo. Unref it
with g_object_unref()
, when done with it.
[transfer full]
void camel_folder_summary_add (CamelFolderSummary *summary
,CamelMessageInfo *info
,gboolean force_keep_uid
);
Adds a new info
record to the summary. If the force_keep_uid
is FALSE
,
then a new uid is automatically re-assigned by calling
camel_folder_summary_next_uid_string()
. It's an error to use
force_keep_uid
when the info
has none set.
The summary
adds its own reference to info
, if needed, and any
previously loaded info is replaced with the new one.
summary |
a CamelFolderSummary object |
|
info |
||
force_keep_uid |
whether to keep set UID of the |
gboolean camel_folder_summary_remove (CamelFolderSummary *summary
,CamelMessageInfo *info
);
Remove a specific info
record from the summary.
gboolean camel_folder_summary_remove_uid (CamelFolderSummary *summary
,const gchar *uid
);
Remove a specific info record from the summary, by uid
.
gboolean camel_folder_summary_remove_uids (CamelFolderSummary *summary
,GList *uids
);
Remove a specific info record from the summary, by uid
.
Since: 3.6
gboolean camel_folder_summary_clear (CamelFolderSummary *summary
,GError **error
);
Empty the summary contents.
guint
camel_folder_summary_count (CamelFolderSummary *summary
);
Get the number of summary items stored in this summary.
gboolean camel_folder_summary_check_uid (CamelFolderSummary *summary
,const gchar *uid
);
Check if the uid is valid. This isn't very efficient, so it shouldn't be called iteratively.
Since: 2.24
CamelMessageInfo * camel_folder_summary_get (CamelFolderSummary *summary
,const gchar *uid
);
Retrieve a summary item by uid.
A referenced to the summary item is returned, which may be ref'd or free'd as appropriate.
[virtual message_info_from_uid]
the summary item, or NULL
if the uid uid
is not available
See camel_folder_summary_get_info_flags()
.
[nullable][transfer full]
Since: 3.4
guint32 camel_folder_summary_get_info_flags (CamelFolderSummary *summary
,const gchar *uid
);
Retrieve CamelMessageInfo::flags for a message info with UID uid
.
This is much quicker than camel_folder_summary_get()
, because it
doesn't require reading the message info from a disk.
Since: 3.12
GPtrArray *
camel_folder_summary_get_array (CamelFolderSummary *summary
);
Obtain a copy of the summary array. This is done atomically, so cannot contain empty entries.
Free with camel_folder_summary_free_array()
Since: 3.4
void
camel_folder_summary_free_array (GPtrArray *array
);
Free's array and its elements returned from camel_folder_summary_get_array()
.
Since: 3.4
GHashTable *
camel_folder_summary_get_hash (CamelFolderSummary *summary
);
Returns hash of current stored 'uids' in summary, where key is 'uid'
from the string pool, and value is 1. The returned pointer should
be freed with g_hash_table_destroy()
.
Note: When searching for values always use uids from the string pool.
Since: 3.6
gboolean camel_folder_summary_replace_flags (CamelFolderSummary *summary
,CamelMessageInfo *info
);
Updates internal counts based on the flags in info
.
Since: 3.6
CamelMessageInfo * camel_folder_summary_peek_loaded (CamelFolderSummary *summary
,const gchar *uid
);
a CamelMessageInfo for the given uid
,
if it's currently loaded in memory, or NULL
otherwise. Unref the non-NULL
info with g_object_unref()
when done with it.
[nullable][transfer full]
Since: 2.26
GPtrArray *
camel_folder_summary_get_changed (CamelFolderSummary *summary
);
Returns an array of changed UID-s. A UID is considered changed when its corresponding CamelMesageInfo is 'dirty' or when it has set the CAMEL_MESSAGE_FOLDER_FLAGGED flag.
a GPtrArray with changed UID-s.
Free it with camel_folder_summary_free_array()
when no longer needed.
[element-type utf8][transfer full]
Since: 2.24
void camel_folder_summary_prepare_fetch_all (CamelFolderSummary *summary
,GError **error
);
Loads all infos into memory, if they are not yet and ensures they will not be freed in next couple minutes. Call this function before any mass operation or when all message infos will be needed, for better performance.
Since: 2.32
void
camel_folder_summary_lock (CamelFolderSummary *summary
);
Locks summary
. Unlock it with camel_folder_summary_unlock()
.
Since: 2.32
void
camel_folder_summary_unlock (CamelFolderSummary *summary
);
Unlocks summary
, previously locked with camel_folder_summary_lock()
.
Since: 2.32
gboolean camel_system_flag_get (CamelMessageFlags flags
,const gchar *name
);
Find the state of the flag name
in flags
.
CamelMessageInfo * camel_message_info_new_from_headers (CamelFolderSummary *summary
,const CamelNameValueArray *headers
);
Create a new CamelMessageInfo pre-populated with info from
headers
.
Since: 3.24
CamelMessageInfo * camel_message_info_new_from_message (CamelFolderSummary *summary
,CamelMimeMessage *message
);
Create a new CamelMessageInfo pre-populated with info from
message
.
Since: 3.54
“deleted-count”
property “deleted-count” guint
How many deleted infos is saved in a summary.
Owner: CamelFolderSummary
Flags: Read
Default value: 0
“folder”
property“folder” CamelFolder *
The CamelFolder to which the folder summary belongs.
Owner: CamelFolderSummary
Flags: Read / Write / Construct Only
“junk-count”
property “junk-count” guint
How many junk infos is saved in a summary.
Owner: CamelFolderSummary
Flags: Read
Default value: 0
“junk-not-deleted-count”
property “junk-not-deleted-count” guint
How many junk and not deleted infos is saved in a summary.
Owner: CamelFolderSummary
Flags: Read
Default value: 0
“saved-count”
property “saved-count” guint
How many infos is saved in a summary.
Owner: CamelFolderSummary
Flags: Read
Default value: 0
“unread-count”
property “unread-count” guint
How many unread infos is saved in a summary.
Owner: CamelFolderSummary
Flags: Read
Default value: 0
“changed”
signalvoid user_function (CamelFolderSummary *camelfoldersummary, gpointer user_data)
Flags: Run First