1
|
1 |
<!-- ##### SECTION Title ##### --> |
|
2 |
LmMessage |
|
3 |
|
|
4 |
<!-- ##### SECTION Short_Description ##### --> |
|
5 |
A message is built up like a tree of message nodes. |
|
6 |
|
|
7 |
<!-- ##### SECTION Long_Description ##### --> |
|
8 |
<para> |
|
9 |
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. |
|
10 |
|
|
11 |
</para> |
|
12 |
|
|
13 |
<!-- ##### SECTION See_Also ##### --> |
|
14 |
<para> |
|
15 |
|
|
16 |
</para> |
|
17 |
|
51
|
18 |
<!-- ##### STRUCT LmMessage ##### --> |
1
|
19 |
<para> |
|
20 |
Struct |
|
21 |
</para> |
|
22 |
|
51
|
23 |
@node: |
|
24 |
@priv: |
1
|
25 |
|
|
26 |
<!-- ##### ENUM LmMessageType ##### --> |
|
27 |
<para> |
|
28 |
Describes what type of message a message is. This maps directly to top level elements in the jabber protocol. |
|
29 |
</para> |
|
30 |
|
|
31 |
@LM_MESSAGE_TYPE_MESSAGE: a message, <message/> |
|
32 |
@LM_MESSAGE_TYPE_PRESENCE: a presence element, <presence/> |
|
33 |
@LM_MESSAGE_TYPE_IQ: an info/query element, <iq/> |
|
34 |
@LM_MESSAGE_TYPE_STREAM: the stream:stream element, you probably don't need to create a message of this type. |
|
35 |
@LM_MESSAGE_TYPE_STREAM_ERROR: a stream:error element |
|
36 |
@LM_MESSAGE_TYPE_UNKNOWN: incoming message is of some unknown type. |
|
37 |
|
|
38 |
<!-- ##### ENUM LmMessageSubType ##### --> |
|
39 |
<para> |
|
40 |
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. |
|
41 |
</para> |
|
42 |
|
|
43 |
@LM_MESSAGE_SUB_TYPE_NOT_SET: the default. No "type" attribute will be sent. |
51
|
44 |
@LM_MESSAGE_SUB_TYPE_AVAILABLE: presence is available, applies to message type "presence" |
1
|
45 |
@LM_MESSAGE_SUB_TYPE_NORMAL: |
|
46 |
@LM_MESSAGE_SUB_TYPE_CHAT: message is a chat message, applies to message type "message" |
|
47 |
@LM_MESSAGE_SUB_TYPE_GROUPCHAT: message is a group chat message, applies to message type "message" |
|
48 |
@LM_MESSAGE_SUB_TYPE_HEADLINE: message is a headline message, applies to message type "message" |
|
49 |
@LM_MESSAGE_SUB_TYPE_UNAVAILABLE: presence is unavailable, applies to message type "presence" |
|
50 |
@LM_MESSAGE_SUB_TYPE_PROBE: a probe presence, applies to message type "presence" |
|
51 |
@LM_MESSAGE_SUB_TYPE_SUBSCRIBE: try to subscribe to another jids presence, applies to message type "presence" |
|
52 |
@LM_MESSAGE_SUB_TYPE_UNSUBSCRIBE: unsubscribes from another jids presence, applies to message type "presence" |
|
53 |
@LM_MESSAGE_SUB_TYPE_SUBSCRIBED: reply from a subscribe message, informs that the subscription was successful. Applies to message type "presence" |
|
54 |
@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" |
|
55 |
@LM_MESSAGE_SUB_TYPE_GET: used to get information from an IQ query, applies to message type "iq" |
|
56 |
@LM_MESSAGE_SUB_TYPE_SET: used to set information in a IQ call, applised to message type "iq" |
|
57 |
@LM_MESSAGE_SUB_TYPE_RESULT: message is an IQ reply, applies to message type "iq" |
|
58 |
@LM_MESSAGE_SUB_TYPE_ERROR: messages is an error, applies to all message types. |
|
59 |
|
|
60 |
<!-- ##### FUNCTION lm_message_new ##### --> |
|
61 |
<para> |
|
62 |
|
|
63 |
</para> |
|
64 |
|
|
65 |
@to: |
|
66 |
@type: |
|
67 |
@Returns: |
|
68 |
|
|
69 |
|
|
70 |
<!-- ##### FUNCTION lm_message_new_with_sub_type ##### --> |
|
71 |
<para> |
|
72 |
|
|
73 |
</para> |
|
74 |
|
|
75 |
@to: |
|
76 |
@type: |
|
77 |
@sub_type: |
|
78 |
@Returns: |
|
79 |
|
|
80 |
|
|
81 |
<!-- ##### FUNCTION lm_message_get_type ##### --> |
|
82 |
<para> |
|
83 |
|
|
84 |
</para> |
|
85 |
|
|
86 |
@message: |
|
87 |
@Returns: |
|
88 |
|
|
89 |
|
|
90 |
<!-- ##### FUNCTION lm_message_get_sub_type ##### --> |
|
91 |
<para> |
|
92 |
|
|
93 |
</para> |
|
94 |
|
|
95 |
@message: |
|
96 |
@Returns: |
|
97 |
|
|
98 |
|
|
99 |
<!-- ##### FUNCTION lm_message_get_node ##### --> |
|
100 |
<para> |
|
101 |
|
|
102 |
</para> |
|
103 |
|
|
104 |
@message: |
|
105 |
@Returns: |
|
106 |
|
|
107 |
|
|
108 |
<!-- ##### FUNCTION lm_message_ref ##### --> |
|
109 |
<para> |
|
110 |
|
|
111 |
</para> |
|
112 |
|
|
113 |
@message: |
|
114 |
@Returns: |
|
115 |
|
|
116 |
|
|
117 |
<!-- ##### FUNCTION lm_message_unref ##### --> |
|
118 |
<para> |
|
119 |
|
|
120 |
</para> |
|
121 |
|
|
122 |
@message: |
|
123 |
|
|
124 |
|