docs/reference/tmpl/lm-message.sgml
author Mikael Hallendal <micke@imendio.com>
Wed, 29 Oct 2008 21:53:19 +0100
changeset 555 695c909d0c45
parent 349 3dafc8376e9b
permissions -rw-r--r--
Fixed up the documentation for 1.4.3 [#27] Went over the documentation and made sure that the API docs are back to 100% documented. [#27 responsible:Hallski state:resolved]

<!-- ##### SECTION Title ##### -->
LmMessage

<!-- ##### SECTION Short_Description ##### -->
A message is built up like a tree of message nodes.

<!-- ##### SECTION Long_Description ##### -->
<para>
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.

</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT LmMessage ##### -->
<para>
The LmMessage struct 
</para>

@node: The root node of the message, you can also use lm_message_get_node() to retrieve this.
@priv: A pointer to message private data. Should never be touched from application code.

<!-- ##### ENUM LmMessageType ##### -->
<para>
Describes what type of message a message is. This maps directly to top level elements in the jabber protocol.
</para>

@LM_MESSAGE_TYPE_MESSAGE: a message, <message/>
@LM_MESSAGE_TYPE_PRESENCE: a presence element, <presence/>
@LM_MESSAGE_TYPE_IQ: an info/query element, <iq/>
@LM_MESSAGE_TYPE_STREAM: the stream:stream element, you probably don't need to create a message of this type.
@LM_MESSAGE_TYPE_STREAM_ERROR: a stream:error element
@LM_MESSAGE_TYPE_STREAM_FEATURES: Internal
@LM_MESSAGE_TYPE_AUTH: Internal
@LM_MESSAGE_TYPE_CHALLENGE: Internal
@LM_MESSAGE_TYPE_RESPONSE: Internal
@LM_MESSAGE_TYPE_SUCCESS: Internal
@LM_MESSAGE_TYPE_FAILURE: Internal
@LM_MESSAGE_TYPE_PROCEED: Internal
@LM_MESSAGE_TYPE_STARTTLS: Internal
@LM_MESSAGE_TYPE_UNKNOWN: incoming message is of some unknown type.

<!-- ##### ENUM LmMessageSubType ##### -->
<para>
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.
</para>

@LM_MESSAGE_SUB_TYPE_NOT_SET: the default. No "type" attribute will be sent.
@LM_MESSAGE_SUB_TYPE_AVAILABLE: presence is available, applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_NORMAL: a normal message.
@LM_MESSAGE_SUB_TYPE_CHAT: message is a chat message, applies to message type "message"
@LM_MESSAGE_SUB_TYPE_GROUPCHAT: message is a group chat message, applies to message type "message"
@LM_MESSAGE_SUB_TYPE_HEADLINE: message is a headline message, applies to message type "message"
@LM_MESSAGE_SUB_TYPE_UNAVAILABLE: presence is unavailable, applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_PROBE: a probe presence, applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_SUBSCRIBE: try to subscribe to another jids presence, applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_UNSUBSCRIBE: unsubscribes from another jids presence, applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_SUBSCRIBED: reply from a subscribe message, informs that the subscription was successful. Applies to message type "presence"
@LM_MESSAGE_SUB_TYPE_UNSUBSCRIBED: 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"
@LM_MESSAGE_SUB_TYPE_GET: used to get information from an IQ query, applies to message type "iq"
@LM_MESSAGE_SUB_TYPE_SET: used to set information in a IQ call, applised to message type "iq"
@LM_MESSAGE_SUB_TYPE_RESULT: message is an IQ reply, applies to message type "iq"
@LM_MESSAGE_SUB_TYPE_ERROR: messages is an error, applies to all message types.

<!-- ##### FUNCTION lm_message_new ##### -->
<para>

</para>

@to: 
@type: 
@Returns: 


<!-- ##### FUNCTION lm_message_new_with_sub_type ##### -->
<para>

</para>

@to: 
@type: 
@sub_type: 
@Returns: 


<!-- ##### FUNCTION lm_message_get_type ##### -->
<para>

</para>

@message: 
@Returns: 


<!-- ##### FUNCTION lm_message_get_sub_type ##### -->
<para>

</para>

@message: 
@Returns: 


<!-- ##### FUNCTION lm_message_get_node ##### -->
<para>

</para>

@message: 
@Returns: 


<!-- ##### FUNCTION lm_message_ref ##### -->
<para>

</para>

@message: 
@Returns: 


<!-- ##### FUNCTION lm_message_unref ##### -->
<para>

</para>

@message: