Top |
Represents a message that can be sent with lm_connection_send()
, lm_connection_send_with_reply()
or lm_connection_send_with_reply_and_block()
. Either use lm_message_new()
or lm_message_new_with_subtype()
to create a message. You need to call lm_message_unref()
when are finished with it.
LmMessage * lm_message_new (const gchar *to
,LmMessageType type
);
Creates a new LmMessage which can be sent with lm_connection_send()
or
lm_connection_send_with_reply()
. If to
is NULL
the message is sent to the
server. The returned message should be unreferenced with lm_message_unref()
when caller is finished with it.
LmMessage * lm_message_new_with_sub_type (const gchar *to
,LmMessageType type
,LmMessageSubType sub_type
);
Creates a new LmMessage with sub type set. See lm_message_new()
for more
information.
LmMessageType
lm_message_get_type (LmMessage *message
);
Fetches the type of message
.
LmMessageSubType
lm_message_get_sub_type (LmMessage *message
);
Fetches the sub type of message
.
LmMessageNode *
lm_message_get_node (LmMessage *message
);
Retrieves the root node from message
.
Describes what type of message a message is. This maps directly to top level elements in the jabber protocol.
Describes the sub type of a message. This is equal to the "type" attribute in the jabber protocol. What sub type a message can have is depending on the type of the message.
the default. No "type" attribute will be sent. |
||
presence is available, applies to message type "presence" |
||
message is a chat message, applies to message type "message" |
||
message is a group chat message, applies to message type "message" |
||
message is a headline message, applies to message type "message" |
||
presence is unavailable, applies to message type "presence" |
||
a probe presence, applies to message type "presence" |
||
try to subscribe to another jids presence, applies to message type "presence" |
||
unsubscribes from another jids presence, applies to message type "presence" |
||
reply from a subscribe message, informs that the subscription was successful. Applies to message type "presence" |
||
reply from subscribe or unsubscribe message. If it's a reply from a subscribe message it notifies that the subscription failed. Applies to message type "presence" |
||
used to get information from an IQ query, applies to message type "iq" |
||
used to set information in a IQ call, applised to message type "iq" |
||
message is an IQ reply, applies to message type "iq" |
||
messages is an error, applies to all message types. |