Camel.MessageInfo¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/co |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.MessageInfo(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod new(summary)¶
- Parameters:
summary (
Camel.FolderSummary
orNone
) – parentCamel.FolderSummary
object, orNone
- Returns:
a new
Camel.MessageInfo
object- Return type:
Create a new
Camel.MessageInfo
object, optionally for given summary.New in version 3.24.
- classmethod new_from_headers(summary, headers)¶
- Parameters:
summary (
Camel.FolderSummary
orNone
) – aCamel.FolderSummary
object orNone
headers (
Camel.NameValueArray
) – aCamel.NameValueArray
- Returns:
a new
Camel.MessageInfo
- Return type:
Create a new
Camel.MessageInfo
pre-populated with info from headers.New in version 3.24.
- classmethod new_from_message(summary, message)¶
- Parameters:
summary (
Camel.FolderSummary
orNone
) – aCamel.FolderSummary
orNone
message (
Camel.MimeMessage
) – aCamel.MimeMessage
- Returns:
a new
Camel.MessageInfo
- Return type:
Create a new
Camel.MessageInfo
pre-populated with info from message.New in version 3.52.3.
- clone(assign_summary)¶
- Parameters:
assign_summary (
Camel.FolderSummary
orNone
) – parentCamel.FolderSummary
object, orNone
, to set on the clone- Returns:
a new
Camel.MessageInfo
object, clone of the self- Return type:
Clones the self as a new
Camel.MessageInfo
and eventually assigns a newCamel.FolderSummary
to it. If it’s not set, then the same summary as the one with self is used.New in version 3.24.
- dump()¶
Dumps the mesasge info self to stdout. This is meand for debugging purposes only.
New in version 3.24.
- dup_headers()¶
- Returns:
All the message headers of the associated message, or
None
, when none are available. Free returned array withCamel.NameValueArray.free
() when no longer needed.- Return type:
Duplicates array of headers for the self.
New in version 3.24.
- dup_preview()¶
- Returns:
Body preview of the associated message, or
None
, when not available. Free the returned string withGLib.free
(), when no longer needed.- Return type:
New in version 3.42.
- dup_references()¶
- Returns:
A
GLib.Array
of guint64 encoded Message-ID-s; orNone
when none are available. Free returned array with g_array_unref() when no longer needed.- Return type:
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
Camel.SummaryMessageID
.New in version 3.24.
- dup_user_flags()¶
- Returns:
A newly allocated
Camel.NamedFlags
with all the currently set user flags on the self. Free the returned structure withCamel.NamedFlags.free
() when no londer needed.- Return type:
New in version 3.24.
- dup_user_header(name)¶
- Parameters:
name (
str
) – header name- Returns:
Value of the header named name from the user-defined message headers of the associated message, or
None
, when not available. Free the returned string withGLib.free
(), when no longer needed.- Return type:
New in version 3.42.
- dup_user_headers()¶
- Returns:
All the user-defined message headers of the associated message, or
None
, when none are available. Free returned array withCamel.NameValueArray.free
() when no longer needed.- Return type:
New in version 3.42.
- dup_user_tag(name)¶
- Parameters:
name (
str
) – user tag name- Returns:
Value of the user tag as newly allocated string, or
None
when it is not set. Free it withGLib.free
() when no longer needed.- Return type:
New in version 3.24.
- dup_user_tags()¶
- Returns:
a newly allocated
Camel.NameValueArray
containing all set user tags of the self. Free it withCamel.NameValueArray.free
() when no longer needed.- Return type:
New in version 3.24.
- freeze_notifications()¶
Freezes all the notifications until the
Camel.MessageInfo.thaw_notifications
() is called. This function can be called multiple times, where the last thaw will do the notifications.New in version 3.24.
- get_abort_notifications()¶
- Returns:
Whether the self 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.Object
::notify
signals on change, nor associated folder’s “changed” signal.- Return type:
New in version 3.24.
- get_date_received()¶
- Returns:
time_t of the Received header of the message, encoded as gint64.
- Return type:
New in version 3.24.
- get_date_sent()¶
- Returns:
time_t of the Date header of the message, encoded as gint64.
- Return type:
New in version 3.24.
- get_dirty()¶
- Returns:
Whether the self is dirty, which means that it had been changed and a save to the local summary is required.
- Return type:
New in version 3.24.
- get_flags()¶
- Returns:
Bit-or of
Camel.MessageFlags
set on the self.- Return type:
New in version 3.24.
- get_folder_flagged()¶
- Returns:
Whether requires save of the local changes into the remote store.
- Return type:
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.MessageFlags.FOLDER_FLAGGED
flag, for better readiness of the code.New in version 3.24.
- get_folder_flagged_stamp()¶
- Returns:
Stamp of the ‘folder-flagged’ flag.
- Return type:
The ‘folder-flagged-stamp’ is a stamp of the ‘folder-flagged’ flag. This stamp changes whenever anything would mark the self as ‘folder-flagged’, regardless the self being already ‘folder-flagged’. It can be used to recognize changes on the ‘folder-flagged’ flag during the time.
New in version 3.24.
- get_headers()¶
- Returns:
All the message headers of the associated message, or
None
, when none are available.- Return type:
New in version 3.24.
- get_message_id()¶
- Returns:
Partial MD5 hash of the Message-ID header of the associated message.
- Return type:
Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to
Camel.SummaryMessageID
.New in version 3.24.
- get_notifications_frozen()¶
- Returns:
Whether the notifications are frozen.
- Return type:
New in version 3.24.
- get_preview()¶
- Returns:
Body preview of the associated message, or
None
, when not available.- Return type:
New in version 3.42.
- get_references()¶
- Returns:
A
GLib.Array
of guint64 encoded Message-ID-s; orNone
when none are available.- Return type:
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
Camel.SummaryMessageID
.New in version 3.24.
- get_uid()¶
- Returns:
The UID of the self.
- Return type:
Get the UID of the #mi.
New in version 3.24.
- get_user_flag(name)¶
- Parameters:
name (
str
) – user flag name- Returns:
Whther the user flag named name is set.
- Return type:
New in version 3.24.
- get_user_flags()¶
- Returns:
A
Camel.NamedFlags
with all the currently set user flags on the self. Do not modify it.- Return type:
New in version 3.24.
- get_user_header(name)¶
- Parameters:
name (
str
) – header name- Returns:
Value of the header named name from the user-defined message headers of the associated message, or
None
, when not available.- Return type:
New in version 3.42.
- get_user_headers()¶
- Returns:
All the user-defined message headers of the associated message, or
None
, when none are available.- Return type:
New in version 3.42.
- get_user_tag(name)¶
- Parameters:
name (
str
) – user tag name- Returns:
Value of the user tag, or
None
when it is not set.- Return type:
New in version 3.24.
- get_user_tags()¶
- Returns:
a
Camel.NameValueArray
containing all set user tags of the self. Do not modify it.- Return type:
New in version 3.24.
- load(record, bdata_ptr)¶
- Parameters:
record (
Camel.MIRecord
) – aCamel.MIRecord
to load the self frombdata_ptr (
str
) – a backend specific data (bdata) pointer
- Returns:
Whether the load was successful.
- Return type:
Load content of self 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
() andCamel.util_bdata_get_string
() to read data from it and also move forward the *bdata_ptr.After successful load of the self, the ‘dirty’ flag is unset.
New in version 3.24.
- pooldup_uid()¶
- Returns:
A newly references string in the string pool, the #mi UID. Free it with
Camel.pstring_free
() when no longer needed.- Return type:
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.
New in version 3.24.
- property_lock()¶
Acquires a property lock, which is used to ensure thread safety when properties are changing. Release the lock with
Camel.MessageInfo.property_unlock
().Note: Make sure the
Camel.FolderSummary
lock is held before this lock, if there will be called any ‘set’ function on the self, to avoid deadlock when the summary would be set as dirty while another thread might try to read values from the self, waiting for the property lock and holding the summary lock at the same time.New in version 3.24.
- property_unlock()¶
Releases a property lock, previously acquired with
Camel.MessageInfo.property_lock
().New in version 3.24.
- ref_summary()¶
- Returns:
Referenced
Camel.FolderSummary
to which the self belongs, orNone
, if there is none. UseGObject.Object.unref
() for non-None
returned values when done with it.- Return type:
New in version 3.24.
- save(record, bdata_str)¶
- Parameters:
record (
Camel.MIRecord
) – aCamel.MIRecord
to populatebdata_str (
GLib.String
) – aGLib.String
with a string to save as backend specific data (bdata)
- Returns:
Whether the save succeeded.
- Return type:
Save the self 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
() andCamel.util_bdata_put_string
() to put data into the bdata_str.New in version 3.24.
- set_abort_notifications(abort_notifications)¶
- Parameters:
abort_notifications (
bool
) – a state to set
Marks the self 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.Object
::notify
signals on change, nor associated folder’s “changed” signal.New in version 3.24.
- set_cc(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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_date_received(date_received)¶
- Parameters:
date_received (
int
) – a received date to set- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_date_sent(date_sent)¶
- Parameters:
date_sent (
int
) – a sent date to set- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_dirty(dirty)¶
- Parameters:
dirty (
bool
) – a dirty state to set
Marks the self as dirty, which means a save to the local summary is required.
New in version 3.24.
- set_flags(mask, set)¶
- Parameters:
- Returns:
Whether the flags changed.
- Return type:
Change the state of the flags on the self. Both mask and set are bit-or of
Camel.MessageFlags
.If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is also emitted folder’s “changed” signal for this self, if necessary. In case the
Camel.MessageFlags.FOLDER_FLAGGED
flag would be set and the self is not aborting notifications, the ‘folder-flagged-stamp’ changes too.New in version 3.24.
- set_folder_flagged(folder_flagged)¶
- Parameters:
folder_flagged (
bool
) – a value to set to- Returns:
Whether the flag had been changed.
- Return type:
Changes the folder-flagged flag to the folder_flagged value. See
Camel.MessageInfo.get_folder_flagged
() for more information about the use of this flag.This is only a convenient wrapper around
Camel.MessageFlags.FOLDER_FLAGGED
flag, for better readiness of the code.New in version 3.24.
- set_from(from_)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_message_id(message_id)¶
- Parameters:
message_id (
int
) – a message id to set- Returns:
Whether the value changed.
- Return type:
Sets encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to
Camel.SummaryMessageID
.This property is considered static, in a meaning that it should not change during the life-time of the self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_mlist(mlist)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_preview(preview)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
Set preview as the body preview of the associated message. Use
None
or an empty string to unset the value.If the self changed, the ‘dirty’ flag is set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.42.
- set_size(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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_subject(subject)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_to(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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.24.
- set_uid(uid)¶
-
Changes UID of the self to uid. If it changes, the ‘dirty’ flag of the self is set too, unless the self is aborting notifications. This change does not influence the ‘folder-flagged’ flag.
New in version 3.24.
- set_user_flag(name, state)¶
- Parameters:
- Returns:
Whether the message info changed.
- Return type:
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 self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is also emitted folder’s “changed” signal for this self, if necessary.
New in version 3.24.
- set_user_header(name, value)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
Set value for a single user-defined message header of the associated message. When the value is
None
, the header name is removed from the user-defined headers.If the self changed, the ‘dirty’ flag is set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
New in version 3.42.
- set_user_tag(name, value)¶
- Parameters:
- Returns:
Whether the self changed.
- Return type:
Set user tag name to value, or remove it, if value is
None
.If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is also emitted folder’s “changed” signal for this self, if necessary.
New in version 3.24.
- take_headers(headers)¶
- Parameters:
headers (
Camel.NameValueArray
orNone
) – headers to set, asCamel.NameValueArray
, orNone
- Returns:
Whether the value changed.
- Return type:
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 self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
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.
New in version 3.24.
- take_references(references)¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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
Camel.SummaryMessageID
.This property is considered static, in a meaning that it should not change during the life-time of the self, the same as it doesn’t change in the associated message.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
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.
New in version 3.24.
- take_user_flags(user_flags)¶
- Parameters:
user_flags (
Camel.NamedFlags
orNone
) – user flags to set- Returns:
Whether the message info changed.
- Return type:
Takes all the user_flags, which replaces any current user flags on the self. The passed-in user_flags is consumed by the self, which becomes an owner of it. The caller should not change user_flags afterwards.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is also emitted folder’s “changed” signal for this self, 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.
New in version 3.24.
- take_user_headers(headers)¶
- Parameters:
headers (
Camel.NameValueArray
orNone
) – headers to set, asCamel.NameValueArray
, orNone
- Returns:
Whether the value changed.
- Return type:
Takes user-defined message headers of the associated message.
If the self changed, the ‘dirty’ flag is set automatically, unless the self is aborting notifications. There is not emitted folder’s “changed” signal for this self.
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.
New in version 3.42.
- take_user_tags(user_tags)¶
- Parameters:
user_tags (
Camel.NameValueArray
orNone
) – user tags to set- Returns:
Whether the self changed.
- Return type:
Takes all the user_tags, which replaces any current user tags on the self. The passed-in user_tags is consumed by the self, which becomes an owner of it. The caller should not change user_tags afterwards.
If the self changed, the ‘dirty’ flag and the ‘folder-flagged’ flag are set automatically, unless the self is aborting notifications. There is also emitted folder’s “changed” signal for this self, 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.
New in version 3.24.
- thaw_notifications()¶
Reverses the call of the
Camel.MessageInfo.freeze_notifications
(). If this is the last freeze, then the associated folder is also notified about the change, if any happened during the freeze.New in version 3.24.
- do_clone(assign_summary) virtual¶
- Parameters:
assign_summary (
Camel.FolderSummary
orNone
) – parentCamel.FolderSummary
object, orNone
, to set on the clone- Returns:
a new
Camel.MessageInfo
object, clone of the mi- Return type:
Clones the mi as a new
Camel.MessageInfo
and eventually assigns a newCamel.FolderSummary
to it. If it’s not set, then the same summary as the one with mi is used.New in version 3.24.
- do_dup_user_flags() virtual¶
- Returns:
A newly allocated
Camel.NamedFlags
with all the currently set user flags on the mi. Free the returned structure withCamel.NamedFlags.free
() when no londer needed.- Return type:
New in version 3.24.
- do_dup_user_tags() virtual¶
- Returns:
a newly allocated
Camel.NameValueArray
containing all set user tags of the mi. Free it withCamel.NameValueArray.free
() when no longer needed.- Return type:
New in version 3.24.
- do_get_date_received() virtual¶
- Returns:
time_t of the Received header of the message, encoded as gint64.
- Return type:
New in version 3.24.
- do_get_date_sent() virtual¶
- Returns:
time_t of the Date header of the message, encoded as gint64.
- Return type:
New in version 3.24.
- do_get_flags() virtual¶
- Returns:
Bit-or of
Camel.MessageFlags
set on the mi.- Return type:
New in version 3.24.
- do_get_headers() virtual¶
- Returns:
All the message headers of the associated message, or
None
, when none are available.- Return type:
New in version 3.24.
- do_get_message_id() virtual¶
- Returns:
Partial MD5 hash of the Message-ID header of the associated message.
- Return type:
Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to
Camel.SummaryMessageID
.New in version 3.24.
- do_get_mlist() virtual¶
- Returns:
Mailing list address of the mi.
- Return type:
New in version 3.24.
- do_get_preview() virtual¶
- Returns:
Body preview of the associated message, or
None
, when not available.- Return type:
New in version 3.42.
- do_get_references() virtual¶
- Returns:
A
GLib.Array
of guint64 encoded Message-ID-s; orNone
when none are available.- Return type:
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
Camel.SummaryMessageID
.New in version 3.24.
- do_get_size() virtual¶
- Returns:
Size of the associated message.
- Return type:
New in version 3.24.
- do_get_user_flag(name) virtual¶
- Parameters:
name (
str
) – user flag name- Returns:
Whther the user flag named name is set.
- Return type:
New in version 3.24.
- do_get_user_flags() virtual¶
- Returns:
A
Camel.NamedFlags
with all the currently set user flags on the mi. Do not modify it.- Return type:
New in version 3.24.
- do_get_user_header(name) virtual¶
- Parameters:
name (
str
) – header name- Returns:
Value of the header named name from the user-defined message headers of the associated message, or
None
, when not available.- Return type:
New in version 3.42.
- do_get_user_headers() virtual¶
- Returns:
All the user-defined message headers of the associated message, or
None
, when none are available.- Return type:
New in version 3.42.
- do_get_user_tag(name) virtual¶
- Parameters:
name (
str
) – user tag name- Returns:
Value of the user tag, or
None
when it is not set.- Return type:
New in version 3.24.
- do_get_user_tags() virtual¶
- Returns:
a
Camel.NameValueArray
containing all set user tags of the mi. Do not modify it.- Return type:
New in version 3.24.
- do_load(record, bdata_ptr) virtual¶
- Parameters:
record (
Camel.MIRecord
orNone
) – aCamel.MIRecord
to load the mi frombdata_ptr (
str
) – a backend specific data (bdata) pointer
- Returns:
Whether the load was successful.
- Return type:
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
() andCamel.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.
New in version 3.24.
- do_save(record, bdata_str) virtual¶
- Parameters:
record (
Camel.MIRecord
orNone
) – aCamel.MIRecord
to populatebdata_str (
GLib.String
) – aGLib.String
with a string to save as backend specific data (bdata)
- Returns:
Whether the save succeeded.
- Return type:
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
() andCamel.util_bdata_put_string
() to put data into the bdata_str.New in version 3.24.
- do_set_cc(cc) virtual¶
-
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.
New in version 3.24.
- do_set_date_received(date_received) virtual¶
- Parameters:
date_received (
int
) – a received date to set- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_set_date_sent(date_sent) virtual¶
- Parameters:
date_sent (
int
) – a sent date to set- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_set_flags(mask, set) virtual¶
- Parameters:
- Returns:
Whether the flags changed.
- Return type:
Change the state of the flags on the mi. Both mask and set are bit-or of
Camel.MessageFlags
.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.MessageFlags.FOLDER_FLAGGED
flag would be set and the mi is not aborting notifications, the ‘folder-flagged-stamp’ changes too.New in version 3.24.
- do_set_from(from_) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_set_message_id(message_id) virtual¶
- Parameters:
message_id (
int
) – a message id to set- Returns:
Whether the value changed.
- Return type:
Sets encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to
Camel.SummaryMessageID
.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.
New in version 3.24.
- do_set_mlist(mlist) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_set_preview(preview) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
Set preview as the body preview of the associated message. Use
None
or an empty string to unset the value.If the mi changed, the ‘dirty’ flag is set automatically, unless the mi is aborting notifications. There is not emitted folder’s “changed” signal for this mi.
New in version 3.42.
- do_set_size(size) virtual¶
-
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.
New in version 3.24.
- do_set_subject(subject) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_set_to(to) virtual¶
-
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.
New in version 3.24.
- do_set_user_flag(name, state) virtual¶
- Parameters:
- Returns:
Whether the message info changed.
- Return type:
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.
New in version 3.24.
- do_set_user_header(name, value) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
Set value for a single user-defined message header of the associated message. When the value is
None
, the header name is removed from the user-defined headers.If the mi changed, the ‘dirty’ flag is set automatically, unless the mi is aborting notifications. There is not emitted folder’s “changed” signal for this mi.
New in version 3.42.
- do_set_user_tag(name, value) virtual¶
- Parameters:
- Returns:
Whether the mi changed.
- Return type:
Set user tag name to value, or remove it, if value is
None
.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.
New in version 3.24.
- do_take_headers(headers) virtual¶
- Parameters:
headers (
Camel.NameValueArray
orNone
) – headers to set, asCamel.NameValueArray
, orNone
- Returns:
Whether the value changed.
- Return type:
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.
New in version 3.24.
- do_take_references(references) virtual¶
- Parameters:
- Returns:
Whether the value changed.
- Return type:
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
Camel.SummaryMessageID
.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.
New in version 3.24.
- do_take_user_flags(user_flags) virtual¶
- Parameters:
user_flags (
Camel.NamedFlags
orNone
) – user flags to set- Returns:
Whether the message info changed.
- Return type:
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.
New in version 3.24.
- do_take_user_headers(headers) virtual¶
- Parameters:
headers (
Camel.NameValueArray
orNone
) – headers to set, asCamel.NameValueArray
, orNone
- Returns:
Whether the value changed.
- Return type:
Takes user-defined message headers of the associated message.
If the mi changed, the ‘dirty’ flag is 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.
New in version 3.42.
- do_take_user_tags(user_tags) virtual¶
- Parameters:
user_tags (
Camel.NameValueArray
orNone
) – user tags to set- Returns:
Whether the mi changed.
- Return type:
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.
New in version 3.24.
Property Details¶
- Camel.MessageInfo.props.abort_notifications¶
- Name:
abort-notifications
- Type:
- Default Value:
- Flags:
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
New in version 3.24.
- Camel.MessageInfo.props.cc¶
- Name:
cc
- Type:
- Default Value:
- Flags:
CC address of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.date_received¶
- Name:
date-received
- Type:
- Default Value:
0
- Flags:
Received date of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.date_sent¶
- Name:
date-sent
- Type:
- Default Value:
0
- Flags:
Sent Date of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.dirty¶
- Name:
dirty
- Type:
- Default Value:
- Flags:
Flag, whether the info is changed and requires save to disk. Compare with
Camel.MessageInfo
:folder-flagged
New in version 3.24.
- Camel.MessageInfo.props.flags¶
- Name:
flags
- Type:
- Default Value:
0
- Flags:
Bit-or of
Camel.MessageFlags
.New in version 3.24.
- Camel.MessageInfo.props.folder_flagged¶
- Name:
folder-flagged
- Type:
- Default Value:
- Flags:
Flag, whether the info is changed and requires save to the destination store/server. This is different from the
Camel.MessageInfo
:dirty
, which takes care of the local information only.New in version 3.24.
- Camel.MessageInfo.props.folder_flagged_stamp¶
-
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.
New in version 3.24.
- Camel.MessageInfo.props.from_¶
- Name:
from
- Type:
- Default Value:
- Flags:
From address of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.headers¶
- Name:
headers
- Type:
- Default Value:
- Flags:
Headers of the associated message. Can be
None
.New in version 3.24.
- Camel.MessageInfo.props.message_id¶
- Name:
message-id
- Type:
- Default Value:
0
- Flags:
Encoded Message-ID of the associated message as a guint64 number, partial MD5 sum. The value can be cast to
Camel.SummaryMessageID
.New in version 3.24.
- Camel.MessageInfo.props.mlist¶
- Name:
mlist
- Type:
- Default Value:
- Flags:
Mailing list address of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.preview¶
- Name:
preview
- Type:
- Default Value:
- Flags:
Body preview of the associated message. Can be
None
.New in version 3.42.
- Camel.MessageInfo.props.references¶
- Name:
references
- Type:
- Default Value:
- Flags:
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
Camel.SummaryMessageID
.New in version 3.24.
- Camel.MessageInfo.props.size¶
- Name:
size
- Type:
- Default Value:
0
- Flags:
Size of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.subject¶
- Name:
subject
- Type:
- Default Value:
- Flags:
Subject of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.summary¶
- Name:
summary
- Type:
- Default Value:
- Flags:
The
Camel.FolderSummary
to which the message info belongs, orNone
. It can be set only during construction of the object.New in version 3.24.
- Camel.MessageInfo.props.to¶
- Name:
to
- Type:
- Default Value:
- Flags:
To address of the associated message.
New in version 3.24.
- Camel.MessageInfo.props.uid¶
- Name:
uid
- Type:
- Default Value:
- Flags:
A unique ID of the message in its folder.
New in version 3.24.
- Camel.MessageInfo.props.user_flags¶
- Name:
user-flags
- Type:
- Default Value:
- Flags:
User flags for the associated message. Can be
None
. Unlike user-tags, which can contain various values, the user-flags can only be set or not.New in version 3.24.
- Camel.MessageInfo.props.user_headers¶
- Name:
user-headers
- Type:
- Default Value:
- Flags:
User-defined headers of the associated message. Can be
None
.New in version 3.42.