Top | ![]() |
![]() |
![]() |
![]() |
gboolean | abort-notifications | Read / Write |
char * | cc | Read / Write |
gint64 | date-received | Read / Write |
gint64 | date-sent | Read / Write |
gboolean | dirty | Read / Write |
guint | flags | Read / Write |
gboolean | folder-flagged | Read / Write |
guint | folder-flagged-stamp | Read |
char * | from | Read / Write |
CamelNameValueArray * | headers | Read / Write |
guint64 | message-id | Read / Write |
char * | mlist | Read / Write |
GArray * | references | Read / Write |
guint | size | Read / Write |
char * | subject | Read / Write |
CamelFolderSummary * | summary | Read / Write / Construct Only |
char * | to | Read / Write |
char * | uid | Read / Write |
CamelNamedFlags * | user-flags | Read / Write |
CamelNameValueArray * | user-tags | Read / Write |
CamelMessageInfo *
camel_message_info_new (struct _CamelFolderSummary *summary
);
Create a new CamelMessageInfo object, optionally for given summary
.
Since: 3.24
CamelMessageInfo * camel_message_info_clone (const CamelMessageInfo *mi
,struct _CamelFolderSummary *assign_summary
);
Clones the mi
as a new CamelMessageInfo and eventually assigns
a new CamelFolderSummary to it. If it's not set, then the same
summary as the one with mi
is used.
mi |
a CamelMessageInfo to clone |
|
assign_summary |
parent CamelFolderSummary object, or |
[nullable][type CamelFolderSummary] |
Since: 3.24
gboolean camel_message_info_load (CamelMessageInfo *mi
,const struct _CamelMIRecord *record
,gchar **bdata_ptr
);
Load content of mi
from the data stored in record
. The bdata_ptr
points
to the current position of the record->bdata, where the read can continue.
Use helper functions camel_util_bdata_get_number()
and camel_util_bdata_get_string()
to read data from it and also move forward the *bdata_ptr.
After successful load of the mi
, the 'dirty' flag is unset.
mi |
a CamelMessageInfo to load |
|
record |
a CamelMIRecord to load the |
[type CamelMIRecord] |
bdata_ptr |
a backend specific data (bdata) pointer |
Since: 3.24
gboolean camel_message_info_save (const CamelMessageInfo *mi
,struct _CamelMIRecord *record
,GString *bdata_str
);
Save the mi
content to the message info record record
. It can populate all
but the record->bdata value, which is set fro mthe bdata_str
. Use helper functions
camel_util_bdata_put_number()
and camel_util_bdata_put_string()
to put data into the bdata_str
.
mi |
||
record |
a CamelMIRecord to populate. |
[type CamelMIRecord] |
bdata_str |
a GString with a string to save as backend specific data (bdata) |
Since: 3.24
struct _CamelFolderSummary *
camel_message_info_ref_summary (const CamelMessageInfo *mi
);
Referenced CamelFolderSummary to which the mi
belongs, or NULL
,
if there is none. Use g_object_unref()
for non-NULL returned values when done with it.
[transfer full]
Since: 3.24
void
camel_message_info_property_lock (const CamelMessageInfo *mi
);
Acquires a property lock, which is used to ensure thread safety
when properties are changing. Release the lock with
camel_message_info_property_unlock()
.
Note: Make sure the CamelFolderSummary lock is held before this lock,
if there will be called any 'set' function on the mi
, to avoid deadlock
when the summary would be set as dirty while another thread might try
to read values from the mi
, waiting for the property lock and holding
the summary lock at the same time.
Since: 3.24
void
camel_message_info_property_unlock (const CamelMessageInfo *mi
);
Releases a property lock, previously acquired with
camel_message_info_property_lock()
.
Since: 3.24
gboolean
camel_message_info_get_dirty (const CamelMessageInfo *mi
);
Whether the mi
is dirty, which means that it had been
changed and a save to the local summary is required.
Since: 3.24
void camel_message_info_set_dirty (CamelMessageInfo *mi
,gboolean dirty
);
Marks the mi
as dirty, which means a save to the local summary
is required.
Since: 3.24
gboolean
camel_message_info_get_folder_flagged (const CamelMessageInfo *mi
);
The folder flagged flag is used to mark the message infor as being changed and this change should be propagated to the remote store (server). This is different from the 'dirty' flag, which is set for local changes only. It can happen that the 'folder-flagged' flag is set, but the 'dirty' flag not.
This is only a convenient wrapper around CAMEL_MESSAGE_FOLDER_FLAGGED flag, for better readiness of the code.
Since: 3.24
gboolean camel_message_info_set_folder_flagged (CamelMessageInfo *mi
,gboolean folder_flagged
);
Changes the folder-flagged flag to the folder_flagged
value. See
camel_message_info_get_folder_flagged()
for more information about
the use of this flag.
This is only a convenient wrapper around CAMEL_MESSAGE_FOLDER_FLAGGED flag, for better readiness of the code.
Since: 3.24
guint
camel_message_info_get_folder_flagged_stamp
(const CamelMessageInfo *mi
);
The 'folder-flagged-stamp' is a stamp of the 'folder-flagged' flag. This stamp
changes whenever anything would mark the mi
as 'folder-flagged', regardless
the mi
being already 'folder-flagged'. It can be used to recognize changes
on the 'folder-flagged' flag during the time.
Since: 3.24
gboolean
camel_message_info_get_abort_notifications
(const CamelMessageInfo *mi
);
Whether the mi
is aborting notifications, which means
that it will not influence 'dirty' and 'folder-flagged' flags
in the set/take functions, neither it will emit any GObject::notify
signals on change, nor associated folder's "changed" signal.
Since: 3.24
void camel_message_info_set_abort_notifications (CamelMessageInfo *mi
,gboolean abort_notifications
);
Marks the mi
to abort any notifications, which means that it
will not influence 'dirty' and 'folder-flagged' flags in
the set/take functions, neither it will emit any GObject::notify
signals on change, nor associated folder's "changed" signal.
Since: 3.24
void
camel_message_info_freeze_notifications
(CamelMessageInfo *mi
);
Freezes all the notifications until the camel_message_info_thaw_notifications()
is called.
This function can be called multiple times, where the last thaw will do the notifications.
Since: 3.24
void
camel_message_info_thaw_notifications (CamelMessageInfo *mi
);
Reverses the call of the camel_message_info_freeze_notifications()
.
If this is the last freeze, then the associated folder is also notified
about the change, if any happened during the freeze.
Since: 3.24
gboolean
camel_message_info_get_notifications_frozen
(const CamelMessageInfo *mi
);
Since: 3.24
const gchar *
camel_message_info_get_uid (const CamelMessageInfo *mi
);
Get the UID of the mi.
Since: 3.24
const gchar *
camel_message_info_pooldup_uid (const CamelMessageInfo *mi
);
Get the UID of the mi, duplicated on the Camel's string pool. This is good for thread safety, though the UID should not change once set.
A newly references string in the string pool, the mi UID.
Free it with camel_pstring_free()
when no longer needed.
Since: 3.24
gboolean camel_message_info_set_uid (CamelMessageInfo *mi
,const gchar *uid
);
Changes UID of the mi
to uid
. If it changes, the 'dirty' flag
of the mi
is set too, unless the mi
is aborting notifications. This change
does not influence the 'folder-flagged' flag.
Since: 3.24
guint32
camel_message_info_get_flags (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_flags (CamelMessageInfo *mi
,guint32 mask
,guint32 set
);
Change the state of the flags on the mi
. Both mask
and set
are bit-or
of CamelMessageFlags.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is also emitted
folder's "changed" signal for this mi
, if necessary. In case
the CAMEL_MESSAGE_FOLDER_FLAGGED flag would be set and the mi
is
not aborting notifications, the 'folder-flagged-stamp' changes too.
Since: 3.24
gboolean camel_message_info_get_user_flag (const CamelMessageInfo *mi
,const gchar *name
);
Since: 3.24
gboolean camel_message_info_set_user_flag (CamelMessageInfo *mi
,const gchar *name
,gboolean state
);
Change state
of the flag named name
. Unlike user tags, user flags
can only be set or unset, while the user tags can contain certain values.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is also emitted
folder's "changed" signal for this mi
, if necessary.
Since: 3.24
const CamelNamedFlags *
camel_message_info_get_user_flags (const CamelMessageInfo *mi
);
A CamelNamedFlags with all the currently set
user flags on the mi
. Do not modify it.
[transfer none][nullable]
Since: 3.24
CamelNamedFlags *
camel_message_info_dup_user_flags (const CamelMessageInfo *mi
);
A newly allocated CamelNamedFlags with all the currently set
user flags on the mi
. Free the returned structure with camel_named_flags_free()
when no londer needed.
[transfer full]
Since: 3.24
gboolean camel_message_info_take_user_flags (CamelMessageInfo *mi
,CamelNamedFlags *user_flags
);
Takes all the user_flags
, which replaces any current user flags on the mi
.
The passed-in user_flags
is consumed by the mi
, which becomes an owner
of it. The caller should not change user_flags
afterwards.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is also emitted
folder's "changed" signal for this mi
, if necessary.
Note that it's not safe to use the user_flags
after the call to this function,
because it can be freed due to no change.
Since: 3.24
const gchar * camel_message_info_get_user_tag (const CamelMessageInfo *mi
,const gchar *name
);
Since: 3.24
gchar * camel_message_info_dup_user_tag (const CamelMessageInfo *mi
,const gchar *name
);
Value of the user tag as newly allocated
string, or NULL
when it is not set. Free it with g_free()
when no longer needed.
[transfer full][nullable]
Since: 3.24
gboolean camel_message_info_set_user_tag (CamelMessageInfo *mi
,const gchar *name
,const gchar *value
);
Set user tag name
to value
, or remove it, if value
is NULL
.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is also emitted
folder's "changed" signal for this mi
, if necessary.
Since: 3.24
const CamelNameValueArray *
camel_message_info_get_user_tags (const CamelMessageInfo *mi
);
a CamelNameValueArray containing all set
user tags of the mi
. Do not modify it.
[transfer none][nullable]
Since: 3.24
CamelNameValueArray *
camel_message_info_dup_user_tags (const CamelMessageInfo *mi
);
a newly allocated CamelNameValueArray containing all set
user tags of the mi
. Free it with camel_name_value_array_free()
when no longer needed.
[transfer full][nullable]
Since: 3.24
gboolean camel_message_info_take_user_tags (CamelMessageInfo *mi
,CamelNameValueArray *user_tags
);
Takes all the user_tags
, which replaces any current user tags on the mi
.
The passed-in user_tags
is consumed by the mi
, which becomes an owner
of it. The caller should not change user_tags
afterwards.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is also emitted
folder's "changed" signal for this mi
, if necessary.
Note that it's not safe to use the user_tags
after the call to this function,
because it can be freed due to no change.
Since: 3.24
const gchar *
camel_message_info_get_subject (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_subject (CamelMessageInfo *mi
,const gchar *subject
);
Sets Subject from the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
const gchar *
camel_message_info_get_from (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_from (CamelMessageInfo *mi
,const gchar *from
);
Sets From from the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
const gchar *
camel_message_info_get_to (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_to (CamelMessageInfo *mi
,const gchar *to
);
Sets To from the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
const gchar *
camel_message_info_get_cc (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_cc (CamelMessageInfo *mi
,const gchar *cc
);
Sets CC from the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
const gchar *
camel_message_info_get_mlist (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_mlist (CamelMessageInfo *mi
,const gchar *mlist
);
Sets mesage list address from the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
guint32
camel_message_info_get_size (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_size (CamelMessageInfo *mi
,guint32 size
);
Sets size of the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
gint64
camel_message_info_get_date_sent (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_date_sent (CamelMessageInfo *mi
,gint64 date_sent
);
Sets sent date (the Date header) of the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
gint64
camel_message_info_get_date_received (const CamelMessageInfo *mi
);
Since: 3.24
gboolean camel_message_info_set_date_received (CamelMessageInfo *mi
,gint64 date_received
);
Sets received date (the Received header) of the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
guint64
camel_message_info_get_message_id (const CamelMessageInfo *mi
);
Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.
Since: 3.24
gboolean camel_message_info_set_message_id (CamelMessageInfo *mi
,guint64 message_id
);
Sets encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Since: 3.24
const GArray *
camel_message_info_get_references (const CamelMessageInfo *mi
);
Gets encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.
A GArray of
guint64 encoded Message-ID-s; or NULL
when none are available.
[transfer none][nullable][element-type guint64]
Since: 3.24
GArray *
camel_message_info_dup_references (const CamelMessageInfo *mi
);
Duplicates encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.
A GArray of
guint64 encoded Message-ID-s; or NULL
when none are available. Free returned
array with g_array_unref()
when no longer needed.
[transfer full][nullable][element-type guint64]
Since: 3.24
gboolean camel_message_info_take_references (CamelMessageInfo *mi
,GArray *references
);
Takes encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Note that it's not safe to use the references
after the call to this function,
because it can be freed due to no change.
Since: 3.24
const CamelNameValueArray *
camel_message_info_get_headers (const CamelMessageInfo *mi
);
All the message headers of the associated
message, or NULL
, when none are available.
[transfer none][nullable]
Since: 3.24
CamelNameValueArray *
camel_message_info_dup_headers (const CamelMessageInfo *mi
);
Duplicates array of headers for the mi
.
All the message headers of the associated
message, or NULL
, when none are available. Free returned array with
camel_name_value_array_free()
when no longer needed.
[transfer full][nullable]
Since: 3.24
gboolean camel_message_info_take_headers (CamelMessageInfo *mi
,CamelNameValueArray *headers
);
Takes headers of the associated message.
This property is considered static, in a meaning that it should
not change during the life-time of the mi
, the same as it doesn't
change in the associated message.
If the mi
changed, the 'dirty' flag and the 'folder-flagged' flag are
set automatically, unless the mi
is aborting notifications. There is not emitted
folder's "changed" signal for this mi
.
Note that it's not safe to use the headers
after the call to this function,
because it can be freed due to no change.
Since: 3.24
void
camel_message_info_dump (CamelMessageInfo *mi
);
Dumps the mesasge info mi
to stdout. This is meand for debugging
purposes only.
Since: 3.24
typedef struct { union { guint64 id; guchar hash[8]; struct { guint32 hi; guint32 lo; } part; } id; } CamelSummaryMessageID;
“abort-notifications”
property“abort-notifications” gboolean
Flag, whether the info is currently aborting notifications. It is used to avoid unnecessary 'folder-flagged' and 'dirty' flags changes and also to avoid associated folder's "changed" signal. f
Owner: CamelMessageInfo
Flags: Read / Write
Default value: FALSE
Since: 3.24
“cc”
property “cc” char *
CC address of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“date-received”
property“date-received” gint64
Received date of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: 0
Since: 3.24
“date-sent”
property“date-sent” gint64
Sent Date of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: 0
Since: 3.24
“dirty”
property“dirty” gboolean
Flag, whether the info is changed and requires save to disk. Compare with CamelMessageInfo:folder-flagged
Owner: CamelMessageInfo
Flags: Read / Write
Default value: FALSE
Since: 3.24
“flags”
property“flags” guint
Bit-or of CamelMessageFlags.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: 0
Since: 3.24
“folder-flagged”
property“folder-flagged” gboolean
Flag, whether the info is changed and requires save to the destination store/server. This is different from the CamelMessageInfo:dirty, which takes care of the local information only.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: FALSE
Since: 3.24
“folder-flagged-stamp”
property“folder-flagged-stamp” guint
The 'folder-flagged-stamp' is a stamp of the 'folder-flagged' flag. This stamp
changes whenever anything would mark the mi
'folder-flagged', regardless the mi
being already 'folder-flagged'. It can be used to recognize changes
on the 'folder-flagged' flag during the time.
Owner: CamelMessageInfo
Flags: Read
Default value: 0
Since: 3.24
“from”
property “from” char *
From address of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“headers”
property“headers” CamelNameValueArray *
Headers of the associated message. Can be NULL
.
Owner: CamelMessageInfo
Flags: Read / Write
Since: 3.24
“message-id”
property“message-id” guint64
Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to CamelSummaryMessageID.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: 0
Since: 3.24
“mlist”
property “mlist” char *
Mailing list address of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“references”
property“references” GArray *
Encoded In-Reply-To and References headers of the associated message as an array of guint64 numbers, partial MD5 sums. Each value can be cast to CamelSummaryMessageID.
Owner: CamelMessageInfo
Flags: Read / Write
Since: 3.24
“size”
property“size” guint
Size of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: 0
Since: 3.24
“subject”
property “subject” char *
Subject of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“summary”
property“summary” CamelFolderSummary *
The CamelFolderSummary to which the message info belongs, or NULL
.
It can be set only during construction of the object.
Owner: CamelMessageInfo
Flags: Read / Write / Construct Only
Since: 3.24
“to”
property “to” char *
To address of the associated message.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“uid”
property “uid” char *
A unique ID of the message in its folder.
Owner: CamelMessageInfo
Flags: Read / Write
Default value: NULL
Since: 3.24
“user-flags”
property“user-flags” CamelNamedFlags *
User flags for the associated message. Can be NULL
.
Unlike user-tags, which can contain various values, the user-flags
can only be set or not.
Owner: CamelMessageInfo
Flags: Read / Write
Since: 3.24
“user-tags”
property“user-tags” CamelNameValueArray *
User tags for the associated message. Can be NULL
.
Unlike user-flags, which can be set or not, the user-tags
can contain various values.
Owner: CamelMessageInfo
Flags: Read / Write
Since: 3.24