Description:
[
CCode ( type_id =
"tp_message_get_type ()" ) ]
public sealed class Message :
Object
Opaque structure representing a message in the Telepathy messages interface (an array of at least one mapping from string to variant, where
the first mapping contains message headers and subsequent mappings contain the message body).
This base class provides convenience API for most of the common keys that can appear in the header. One notable exception is the sender of
the message. Inside a connection manager, messages are represented by the TpCMMessage subclass, and you should use
tp_cm_message_get_sender. When composing a message in a client using
ClientMessage, messages do not have an explicit sender (the
sender is automatically the local user). When a client sees a sent or received message signalled by the connection manager (represented by
SignalledMessage), the message's sender (if any) can be
accessed with get_sender.
Content:
Creation methods:
Methods:
- public void @set (uint part, string key, Value source)
Set key in part part of
this to have a copy of source as its value.
- public uint append_part ()
Append a body part to the message.
- public uint count_parts ()
- public bool delete_key (uint part, string key)
Remove the given key and its value from the given part.
- public void delete_part (uint part)
Delete the given body part from the message.
- public void destroy ()
Since 0.13.9 this function is a simple wrapper around
unref
- public Variant dup_part (uint part)
- public ChannelTextMessageType get_message_type ()
- public uint32 get_pending_message_id (out bool valid)
Return the incoming message ID of this.
- public int64 get_received_timestamp ()
Return when this message was received locally, as a number of seconds
since the beginning of 1970 in the UTC timezone (the same representation used by
DateTime.from_unix_utc, for instance), or 0 if
not known.
- public int64 get_sent_timestamp ()
Return when this message was sent, as a number of seconds since the
beginning of 1970 in the UTC timezone (the same representation used by
DateTime.from_unix_utc, for instance), or 0 if
not known.
- public unowned string get_specific_to_interface ()
If this message is specific to a particular D-Bus interface and should be
ignored by clients without knowledge of that interface, return the name of the interface.
- public unowned string get_supersedes ()
If this message replaces a previous message, return the value of
get_token for that previous message.
- public unowned string get_token ()
Return this message's identifier in the underlying protocol.
- public bool is_delivery_report ()
If this message is a delivery report indicating success or failure of
delivering a message, return true.
- public bool is_mutable ()
Check if this is mutable.
- public bool is_rescued ()
Returns true if this incoming message has been seen in a
previous channel during the lifetime of the Connection, but had not been acknowledged when that channel closed, causing an identical
channel (in which the message now appears) to open.
- public bool is_scrollback ()
- public unowned HashTable<string,Value?> peek (uint part)
- public void ref_handle (HandleType handle_type, Handle handle)
Reference the given handle until this message is destroyed.
- public void set_boolean (uint part, string key, bool b)
Set key in part part of
this to have b as a boolean value.
- public void set_bytes (uint part, string key, uint len, void* bytes)
Set key in part part of
this to have bytes as a byte-array value.
- public void set_handle (uint part, string key, HandleType handle_type, Handle handle_or_0)
If handle_or_0 is not zero, reference it with
ref_handle.
- public void set_int32 (uint part, string key, int32 i)
Set key in part part of
this to have i as a signed integer value.
- public void set_int64 (uint part, string key, int64 i)
Set key in part part of
this to have i as a signed integer value.
- public void set_string (uint part, string key, string s)
Set key in part part of
this to have s as a string value.
- public void set_uint32 (uint part, string key, uint32 u)
Set key in part part of
this to have u as an unsigned integer value.
- public void set_uint64 (uint part, string key, uint64 u)
Set key in part part of
this to have u as an unsigned integer value.
- public void set_variant (uint part, string key, Variant value)
Set key in part part of
this to have value as its value.
- public void take_message (uint part, string key, Message message)
Set key in part part of
this to have message as an aa{sv} value (that is, an array of Message_Part), and take
ownership of message.
- public string to_text (out ChannelTextMessageFlags out_flags)
Concatene all the text parts contained in this
.
Inherited Members:
All known members inherited from class GLib.Object