Top | ![]() |
![]() |
![]() |
![]() |
CamelFolderSummary * camel_folder_summary_new (struct _CamelFolder *folder
);
Create a new
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
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.
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 *summarystruct _CamelStore *store
,const
,gchar *folder_name);
GError **error
Loads a summary header for the summary
, which corresponds to folder_name
provided by store
.
summary |
a |
|
store |
a |
|
folder_name |
a folder name corresponding to |
|
error |
return location for a |
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 *summaryconst CamelNameValueArray *headers
);
Create a new info record from a header.
a newly created g_object_unref()
[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.
CamelMessageInfo * camel_folder_summary_info_new_from_message (,
CamelFolderSummary *summary);
CamelMimeMessage *message
Create a summary item from a message.
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
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.
gboolean camel_folder_summary_remove (,
CamelFolderSummary *summary);
CamelMessageInfo *info
Remove a specific info
record from the summary.
gboolean camel_folder_summary_remove_uid (,
CamelFolderSummary *summaryconst
);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 *summaryconst
);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 *summaryconst
);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.
the summary item, or NULL
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 *summaryconst
);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 *summaryconst
);gchar *uid
a uid
,
if it's currently loaded in memory, or NULL
g_object_unref()
[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 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 *summaryconst CamelNameValueArray *headers
);
Create a new headers
.
Since: 3.24