Mercurial > pidgin
annotate src/protocols/msn/msg.h @ 6764:6d0d4e9149b9
[gaim-migrate @ 7296]
well, jabber.org is being a pain in the moment, as is my server. but this seems to work, so here it is. Jabber SSL support. Make sure you set the port to 5223 and check the "Use SSL" checkbox in the account editor.
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sat, 06 Sep 2003 16:04:41 +0000 |
| parents | b7e113a59b51 |
| children | 8efafdc38718 |
| rev | line source |
|---|---|
| 4542 | 1 /** |
| 2 * @file msg.h Message functions | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
7 * |
| 4542 | 8 * This program is free software; you can redistribute it and/or modify |
| 9 * it under the terms of the GNU General Public License as published by | |
| 10 * the Free Software Foundation; either version 2 of the License, or | |
| 11 * (at your option) any later version. | |
| 12 * | |
| 13 * This program is distributed in the hope that it will be useful, | |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 * GNU General Public License for more details. | |
| 17 * | |
| 18 * You should have received a copy of the GNU General Public License | |
| 19 * along with this program; if not, write to the Free Software | |
| 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 */ | |
| 22 #ifndef _MSN_MSG_H_ | |
| 23 #define _MSN_MSG_H_ | |
| 24 | |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
25 typedef struct _MsnMessage MsnMessage; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
26 |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
27 #include "msnslp.h" |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
28 #include "session.h" |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
29 #include "user.h" |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
30 |
| 4542 | 31 /** |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
32 * A message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
33 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
34 struct _MsnMessage |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
35 { |
|
5506
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
36 size_t ref_count; /**< The reference count. */ |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
37 |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
38 gboolean msnslp_message; |
|
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
39 |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
40 MsnUser *sender; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
41 MsnUser *receiver; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
42 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
43 unsigned int tid; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
44 char flag; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
45 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
46 gboolean incoming; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
47 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
48 size_t size; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
49 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
50 char *content_type; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
51 char *charset; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
52 char *body; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
53 |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
54 MsnSlpHeader msnslp_header; |
|
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
55 MsnSlpFooter msnslp_footer; |
|
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
56 |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
57 GHashTable *attr_table; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
58 GList *attr_list; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
59 }; |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
60 |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
61 #define MSN_MESSAGE(msg) ((MsnMessage *)(msg)) |
|
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
62 |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
63 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
64 * Creates a new, empty message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
65 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
66 * @return A new message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
67 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
68 MsnMessage *msn_message_new(void); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
69 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
70 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
71 * Creates a new message based off a string. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
72 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
73 * @param session The MSN session. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
74 * @param str The string. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
75 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
76 * @return The new message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
77 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
78 MsnMessage *msn_message_new_from_str(MsnSession *session, const char *str); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
79 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
80 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
81 * Destroys a message. |
|
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
82 * |
|
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
83 * @param msg The message to destroy. |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
84 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
85 void msn_message_destroy(MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
86 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
87 /** |
|
5506
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
88 * Increments the reference count on a message. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
89 * |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
90 * @param msg The message. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
91 * |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
92 * @return @a msg |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
93 */ |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
94 MsnMessage *msn_message_ref(MsnMessage *msg); |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
95 |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
96 /** |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
97 * Decrements the reference count on a message. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
98 * |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
99 * This will destroy the structure if the count hits 0. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
100 * |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
101 * @param msg The message. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
102 * |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
103 * @return @a msg, or @c NULL if the new count is 0. |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
104 */ |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
105 MsnMessage *msn_message_unref(MsnMessage *msg); |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
106 |
|
4f72b611f0ee
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
107 /** |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
108 * Converts a message to a string. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
109 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
110 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
111 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
112 * @return The string representation of a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
113 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
114 char *msn_message_build_string(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
115 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
116 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
117 * Returns TRUE if the message is outgoing. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
118 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
119 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
120 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
121 * @return @c TRUE if the message is outgoing, or @c FALSE otherwise. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
122 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
123 gboolean msn_message_is_outgoing(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
124 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
125 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
126 * Returns TRUE if the message is incoming. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
127 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
128 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
129 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
130 * @return @c TRUE if the message is incoming, or @c FALSE otherwise. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
131 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
132 gboolean msn_message_is_incoming(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
133 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
134 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
135 * Sets the message's sender. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
136 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
137 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
138 * @param user The sender. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
139 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
140 void msn_message_set_sender(MsnMessage *msg, MsnUser *user); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
141 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
142 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
143 * Returns the message's sender. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
144 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
145 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
146 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
147 * @return The sender. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
148 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
149 MsnUser *msn_message_get_sender(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
150 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
151 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
152 * Sets the message's receiver. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
153 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
154 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
155 * @param user The receiver. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
156 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
157 void msn_message_set_receiver(MsnMessage *msg, MsnUser *user); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
158 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
159 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
160 * Returns the message's receiver. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
161 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
162 * @param msg The message. |
| 4542 | 163 * |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
164 * @return The receiver. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
165 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
166 MsnUser *msn_message_get_receiver(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
167 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
168 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
169 * Sets the message transaction ID. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
170 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
171 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
172 * @param tid The transaction ID. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
173 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
174 void msn_message_set_transaction_id(MsnMessage *msg, unsigned int tid); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
175 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
176 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
177 * Returns the message transaction ID. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
178 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
179 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
180 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
181 * @return The transaction ID. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
182 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
183 unsigned int msn_message_get_transaction_id(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
184 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
185 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
186 * Sets the flag for an outgoing message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
187 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
188 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
189 * @param flag The flag. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
190 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
191 void msn_message_set_flag(MsnMessage *msg, char flag); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
192 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
193 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
194 * Returns the flag for an outgoing message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
195 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
196 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
197 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
198 * @return The flag. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
199 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
200 char msn_message_get_flag(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
201 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
202 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
203 * Sets the body of a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
204 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
205 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
206 * @param body The body of the message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
207 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
208 void msn_message_set_body(MsnMessage *msg, const char *body); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
209 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
210 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
211 * Returns the body of the message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
212 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
213 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
214 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
215 * @return The body of the message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
216 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
217 const char *msn_message_get_body(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
218 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
219 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
220 * Sets the content type in a message. |
| 4542 | 221 * |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
222 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
223 * @param type The content-type. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
224 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
225 void msn_message_set_content_type(MsnMessage *msg, const char *type); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
226 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
227 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
228 * Returns the content type in a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
229 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
230 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
231 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
232 * @return The content-type. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
233 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
234 const char *msn_message_get_content_type(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
235 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
236 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
237 * Sets the charset in a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
238 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
239 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
240 * @param charset The charset. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
241 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
242 void msn_message_set_charset(MsnMessage *msg, const char *charset); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
243 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
244 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
245 * Returns the charset in a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
246 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
247 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
248 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
249 * @return The charset. |
| 4542 | 250 */ |
|
5309
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
251 const char *msn_message_get_charset(const MsnMessage *msg); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
252 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
253 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
254 * Sets an attribute in a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
255 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
256 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
257 * @param attr The attribute name. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
258 * @param value The attribute value. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
259 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
260 void msn_message_set_attr(MsnMessage *msg, const char *attr, |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
261 const char *value); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
262 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
263 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
264 * Returns an attribute from a message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
265 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
266 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
267 * @param attr The attribute. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
268 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
269 * @return The value, or @c NULL if not found. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
270 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
271 const char *msn_message_get_attr(const MsnMessage *msg, const char *attr); |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
272 |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
273 /** |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
274 * Parses the body and returns it in the form of a hashtable. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
275 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
276 * @param msg The message. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
277 * |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
278 * @return The resulting hashtable. |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
279 */ |
|
e2e53316a21d
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
280 GHashTable *msn_message_get_hashtable_from_body(const MsnMessage *msg); |
| 4542 | 281 |
| 282 #endif /* _MSN_MSG_H_ */ |
