Class
CamelMessageInfo
Constructors
camel_message_info_new
Create a new CamelMessageInfo
object, optionally for given summary
.
since: 3.24
camel_message_info_new_from_headers
Create a new CamelMessageInfo
pre-populated with info from
headers
.
since: 3.24
Instance methods
camel_message_info_clone
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.
since: 3.24
camel_message_info_dump
Dumps the mesasge info mi
to stdout. This is meand for debugging
purposes only.
since: 3.24
camel_message_info_dup_references
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
.
since: 3.24
camel_message_info_freeze_notifications
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
camel_message_info_get_folder_flagged
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.
since: 3.24
camel_message_info_get_folder_flagged_stamp
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
camel_message_info_get_message_id
Encoded Message-ID of the associated message as a guint64 number,
partial MD5 sum. The value can be cast to CamelSummaryMessageID
.
since: 3.24
camel_message_info_get_references
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
.
since: 3.24
camel_message_info_load
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.
since: 3.24
camel_message_info_pooldup_uid
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.
since: 3.24
camel_message_info_property_lock
Acquires a property lock, which is used to ensure thread safety when properties are changing. Release the lock with camel_message_info_property_unlock().
since: 3.24
camel_message_info_property_unlock
Releases a property lock, previously acquired with camel_message_info_property_lock().
since: 3.24
camel_message_info_save
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
.
since: 3.24
camel_message_info_set_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
camel_message_info_set_date_received
Sets received date (the Received header) of the associated message.
since: 3.24
camel_message_info_set_date_sent
Sets sent date (the Date header) of the associated message.
since: 3.24
camel_message_info_set_dirty
Marks the mi
as dirty, which means a save to the local summary
is required.
since: 3.24
camel_message_info_set_flags
Change the state of the flags on the mi
. Both mask
and set
are bit-or
of CamelMessageFlags
.
since: 3.24
camel_message_info_set_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.
since: 3.24
camel_message_info_set_message_id
Sets encoded Message-ID of the associated message as a guint64 number,
partial MD5 sum. The value can be cast to CamelSummaryMessageID
.
since: 3.24
camel_message_info_set_preview
Set preview
as the body preview of the associated message. Use NULL
or an empty
string to unset the value.
since: 3.42
camel_message_info_set_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
camel_message_info_set_user_flag
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.
since: 3.24
camel_message_info_set_user_header
Set value
for a single user-defined message header of the associated message.
When the value
is NULL
, the header name
is removed from the user-defined headers.
since: 3.42
camel_message_info_set_user_tag
Set user tag name
to value
, or remove it, if value
is NULL
.
since: 3.24
camel_message_info_take_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
.
since: 3.24
camel_message_info_take_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.
since: 3.24
camel_message_info_take_user_headers
Takes user-defined message headers of the associated message.
since: 3.42
camel_message_info_take_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.
since: 3.24
camel_message_info_thaw_notifications
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
Properties
Camel.MessageInfo:abort-notifications
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.
since: 3.24
Camel.MessageInfo:dirty
Flag, whether the info is changed and requires save to disk. Compare with CamelMessageInfo:folder-flagged.
since: 3.24
Camel.MessageInfo:folder-flagged
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.
since: 3.24
Camel.MessageInfo: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.
since: 3.24
Camel.MessageInfo:message-id
Encoded Message-ID of the associated message as a guint64 number,
partial MD5 sum. The value can be cast to CamelSummaryMessageID
.
since: 3.24
Camel.MessageInfo:references
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
.
since: 3.24
Camel.MessageInfo:summary
The CamelFolderSummary
to which the message info belongs, or NULL
.
It can be set only during construction of the object.
since: 3.24
Camel.MessageInfo:user-flags
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.
since: 3.24
Camel.MessageInfo:user-headers
User-defined headers of the associated message. Can be NULL
.
since: 3.42
Camel.MessageInfo:user-tags
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.
since: 3.24
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct CamelMessageInfoClass {
GObjectClass parent_class;
CamelMessageInfo* (* clone) (
const CamelMessageInfo* mi,
_CamelFolderSummary* assign_summary
);
gboolean (* load) (
CamelMessageInfo* mi,
const _CamelMIRecord* record,
gchar** bdata_ptr
);
gboolean (* save) (
const CamelMessageInfo* mi,
_CamelMIRecord* record,
GString* bdata_str
);
guint32 (* get_flags) (
const CamelMessageInfo* mi
);
gboolean (* set_flags) (
CamelMessageInfo* mi,
guint32 mask,
guint32 set
);
gboolean (* get_user_flag) (
const CamelMessageInfo* mi,
const gchar* name
);
gboolean (* set_user_flag) (
CamelMessageInfo* mi,
const gchar* name,
gboolean state
);
const CamelNamedFlags* (* get_user_flags) (
const CamelMessageInfo* mi
);
CamelNamedFlags* (* dup_user_flags) (
const CamelMessageInfo* mi
);
gboolean (* take_user_flags) (
CamelMessageInfo* mi,
CamelNamedFlags* user_flags
);
const gchar* (* get_user_tag) (
const CamelMessageInfo* mi,
const gchar* name
);
gboolean (* set_user_tag) (
CamelMessageInfo* mi,
const gchar* name,
const gchar* value
);
const CamelNameValueArray* (* get_user_tags) (
const CamelMessageInfo* mi
);
CamelNameValueArray* (* dup_user_tags) (
const CamelMessageInfo* mi
);
gboolean (* take_user_tags) (
CamelMessageInfo* mi,
CamelNameValueArray* user_tags
);
const gchar* (* get_subject) (
const CamelMessageInfo* mi
);
gboolean (* set_subject) (
CamelMessageInfo* mi,
const gchar* subject
);
const gchar* (* get_from) (
const CamelMessageInfo* mi
);
gboolean (* set_from) (
CamelMessageInfo* mi,
const gchar* from
);
const gchar* (* get_to) (
const CamelMessageInfo* mi
);
gboolean (* set_to) (
CamelMessageInfo* mi,
const gchar* to
);
const gchar* (* get_cc) (
const CamelMessageInfo* mi
);
gboolean (* set_cc) (
CamelMessageInfo* mi,
const gchar* cc
);
const gchar* (* get_mlist) (
const CamelMessageInfo* mi
);
gboolean (* set_mlist) (
CamelMessageInfo* mi,
const gchar* mlist
);
guint32 (* get_size) (
const CamelMessageInfo* mi
);
gboolean (* set_size) (
CamelMessageInfo* mi,
guint32 size
);
gint64 (* get_date_sent) (
const CamelMessageInfo* mi
);
gboolean (* set_date_sent) (
CamelMessageInfo* mi,
gint64 date_sent
);
gint64 (* get_date_received) (
const CamelMessageInfo* mi
);
gboolean (* set_date_received) (
CamelMessageInfo* mi,
gint64 date_received
);
guint64 (* get_message_id) (
const CamelMessageInfo* mi
);
gboolean (* set_message_id) (
CamelMessageInfo* mi,
guint64 message_id
);
const GArray* (* get_references) (
const CamelMessageInfo* mi
);
gboolean (* take_references) (
CamelMessageInfo* mi,
GArray* references
);
const CamelNameValueArray* (* get_headers) (
const CamelMessageInfo* mi
);
gboolean (* take_headers) (
CamelMessageInfo* mi,
CamelNameValueArray* headers
);
const gchar* (* get_user_header) (
const CamelMessageInfo* mi,
const gchar* name
);
gboolean (* set_user_header) (
CamelMessageInfo* mi,
const gchar* name,
const gchar* value
);
const CamelNameValueArray* (* get_user_headers) (
const CamelMessageInfo* mi
);
gboolean (* take_user_headers) (
CamelMessageInfo* mi,
CamelNameValueArray* headers
);
const gchar* (* get_preview) (
const CamelMessageInfo* mi
);
gboolean (* set_preview) (
CamelMessageInfo* mi,
const gchar* preview
);
None reserved;
}
Class members
parent_class: GObjectClass
- No description available.
clone: CamelMessageInfo* (* clone) ( const CamelMessageInfo* mi, _CamelFolderSummary* assign_summary )
- No description available.
load: gboolean (* load) ( CamelMessageInfo* mi, const _CamelMIRecord* record, gchar** bdata_ptr )
- No description available.
save: gboolean (* save) ( const CamelMessageInfo* mi, _CamelMIRecord* record, GString* bdata_str )
- No description available.
get_flags: guint32 (* get_flags) ( const CamelMessageInfo* mi )
- No description available.
set_flags: gboolean (* set_flags) ( CamelMessageInfo* mi, guint32 mask, guint32 set )
- No description available.
get_user_flag: gboolean (* get_user_flag) ( const CamelMessageInfo* mi, const gchar* name )
- No description available.
set_user_flag: gboolean (* set_user_flag) ( CamelMessageInfo* mi, const gchar* name, gboolean state )
- No description available.
get_user_flags: const CamelNamedFlags* (* get_user_flags) ( const CamelMessageInfo* mi )
- No description available.
dup_user_flags: CamelNamedFlags* (* dup_user_flags) ( const CamelMessageInfo* mi )
- No description available.
take_user_flags: gboolean (* take_user_flags) ( CamelMessageInfo* mi, CamelNamedFlags* user_flags )
- No description available.
get_user_tag: const gchar* (* get_user_tag) ( const CamelMessageInfo* mi, const gchar* name )
- No description available.
set_user_tag: gboolean (* set_user_tag) ( CamelMessageInfo* mi, const gchar* name, const gchar* value )
- No description available.
get_user_tags: const CamelNameValueArray* (* get_user_tags) ( const CamelMessageInfo* mi )
- No description available.
dup_user_tags: CamelNameValueArray* (* dup_user_tags) ( const CamelMessageInfo* mi )
- No description available.
take_user_tags: gboolean (* take_user_tags) ( CamelMessageInfo* mi, CamelNameValueArray* user_tags )
- No description available.
get_subject: const gchar* (* get_subject) ( const CamelMessageInfo* mi )
- No description available.
set_subject: gboolean (* set_subject) ( CamelMessageInfo* mi, const gchar* subject )
- No description available.
get_from: const gchar* (* get_from) ( const CamelMessageInfo* mi )
- No description available.
set_from: gboolean (* set_from) ( CamelMessageInfo* mi, const gchar* from )
- No description available.
get_to: const gchar* (* get_to) ( const CamelMessageInfo* mi )
- No description available.
set_to: gboolean (* set_to) ( CamelMessageInfo* mi, const gchar* to )
- No description available.
get_cc: const gchar* (* get_cc) ( const CamelMessageInfo* mi )
- No description available.
set_cc: gboolean (* set_cc) ( CamelMessageInfo* mi, const gchar* cc )
- No description available.
get_mlist: const gchar* (* get_mlist) ( const CamelMessageInfo* mi )
- No description available.
set_mlist: gboolean (* set_mlist) ( CamelMessageInfo* mi, const gchar* mlist )
- No description available.
get_size: guint32 (* get_size) ( const CamelMessageInfo* mi )
- No description available.
set_size: gboolean (* set_size) ( CamelMessageInfo* mi, guint32 size )
- No description available.
get_date_sent: gint64 (* get_date_sent) ( const CamelMessageInfo* mi )
- No description available.
set_date_sent: gboolean (* set_date_sent) ( CamelMessageInfo* mi, gint64 date_sent )
- No description available.
get_date_received: gint64 (* get_date_received) ( const CamelMessageInfo* mi )
- No description available.
set_date_received: gboolean (* set_date_received) ( CamelMessageInfo* mi, gint64 date_received )
- No description available.
get_message_id: guint64 (* get_message_id) ( const CamelMessageInfo* mi )
- No description available.
set_message_id: gboolean (* set_message_id) ( CamelMessageInfo* mi, guint64 message_id )
- No description available.
get_references: const GArray* (* get_references) ( const CamelMessageInfo* mi )
- No description available.
take_references: gboolean (* take_references) ( CamelMessageInfo* mi, GArray* references )
- No description available.
get_headers: const CamelNameValueArray* (* get_headers) ( const CamelMessageInfo* mi )
- No description available.
take_headers: gboolean (* take_headers) ( CamelMessageInfo* mi, CamelNameValueArray* headers )
- No description available.
get_user_header: const gchar* (* get_user_header) ( const CamelMessageInfo* mi, const gchar* name )
- No description available.
set_user_header: gboolean (* set_user_header) ( CamelMessageInfo* mi, const gchar* name, const gchar* value )
- No description available.
get_user_headers: const CamelNameValueArray* (* get_user_headers) ( const CamelMessageInfo* mi )
- No description available.
take_user_headers: gboolean (* take_user_headers) ( CamelMessageInfo* mi, CamelNameValueArray* headers )
- No description available.
get_preview: const gchar* (* get_preview) ( const CamelMessageInfo* mi )
- No description available.
set_preview: gboolean (* set_preview) ( CamelMessageInfo* mi, const gchar* preview )
- No description available.
reserved: None
- No description available.
Virtual methods
Camel.MessageInfoClass.clone
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.
since: 3.24
Camel.MessageInfoClass.get_message_id
Encoded Message-ID of the associated message as a guint64 number,
partial MD5 sum. The value can be cast to CamelSummaryMessageID
.
since: 3.24
Camel.MessageInfoClass.get_references
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
.
since: 3.24
Camel.MessageInfoClass.load
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.
since: 3.24
Camel.MessageInfoClass.save
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
.
since: 3.24
Camel.MessageInfoClass.set_date_received
Sets received date (the Received header) of the associated message.
since: 3.24
Camel.MessageInfoClass.set_date_sent
Sets sent date (the Date header) of the associated message.
since: 3.24
Camel.MessageInfoClass.set_flags
Change the state of the flags on the mi
. Both mask
and set
are bit-or
of CamelMessageFlags
.
since: 3.24
Camel.MessageInfoClass.set_message_id
Sets encoded Message-ID of the associated message as a guint64 number,
partial MD5 sum. The value can be cast to CamelSummaryMessageID
.
since: 3.24
Camel.MessageInfoClass.set_preview
Set preview
as the body preview of the associated message. Use NULL
or an empty
string to unset the value.
since: 3.42
Camel.MessageInfoClass.set_user_flag
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.
since: 3.24
Camel.MessageInfoClass.set_user_header
Set value
for a single user-defined message header of the associated message.
When the value
is NULL
, the header name
is removed from the user-defined headers.
since: 3.42
Camel.MessageInfoClass.set_user_tag
Set user tag name
to value
, or remove it, if value
is NULL
.
since: 3.24
Camel.MessageInfoClass.take_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
.
since: 3.24
Camel.MessageInfoClass.take_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.
since: 3.24
Camel.MessageInfoClass.take_user_headers
Takes user-defined message headers of the associated message.
since: 3.42
Camel.MessageInfoClass.take_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.
since: 3.24