Top |
TpMessage * | tp_cm_message_new () |
TpMessage * | tp_cm_message_new_text () |
void | tp_cm_message_set_message () |
void | tp_cm_message_take_message () |
TpHandle | tp_cm_message_get_sender () |
void | tp_cm_message_set_sender () |
TpMessage * tp_cm_message_new (TpBaseConnection *connection
,guint initial_parts
);
connection |
a connection on which to reference handles |
|
initial_parts |
number of parts to create (at least 1) |
Since 0.13.9
TpMessage * tp_cm_message_new_text (TpBaseConnection *conn
,TpHandle sender
,TpChannelTextMessageType type
,const gchar *text
);
A convenient function to create a new TpCMMessage having
'text/plain' as 'content-type', type
as 'message-type',
text
as 'content' and sender
as its sender.
conn |
a connection |
|
sender |
the TpHandle of the sender of the message |
|
type |
the type of message |
|
text |
content of the messsage |
Since 0.13.10
void tp_cm_message_set_message (TpMessage *self
,guint part
,const gchar *key
,TpMessage *message
);
Set key
in part part
of self
to have message
as an aa{sv} value (that
is, an array of Message_Part).
self |
a message |
|
part |
a part number, which must be strictly less than the number
returned by |
|
key |
a key in the mapping representing the part |
|
message |
another (distinct) message created for the same TpBaseConnection |
Since 0.15.5
void tp_cm_message_take_message (TpMessage *self
,guint part
,const gchar *key
,TpMessage *message
);
Set key
in part part
of self
to have message
as an aa{sv} value (that
is, an array of Message_Part), and take ownership of message
. The caller
should not use message
after passing it to this function. All handle
references owned by message
will subsequently belong to and be released
with self
.
self |
a message |
|
part |
a part number, which must be strictly less than the number
returned by |
|
key |
a key in the mapping representing the part |
|
message |
another (distinct) message created for the same TpBaseConnection |
Since 0.13.9
TpHandle
tp_cm_message_get_sender (TpMessage *self
);
Return the sender of self
, i.e. the "message-sender" key of the header,
or 0 if there is no sender.
Since 0.13.9