Tue, 22 Jun 2010 22:44:28 +0000
Destroy Parts when the SlpMessage is destroyed.
| 4542 | 1 | /** |
| 2 | * @file msg.h Message functions | |
| 3 | * | |
| 15884 | 4 | * purple |
| 4542 | 5 | * |
| 15884 | 6 | * Purple is the legal property of its developers, whose names are too numerous |
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 | * source distribution. |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
9 | * |
| 4542 | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15884
diff
changeset
|
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 4542 | 23 | */ |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
24 | #ifndef MSN_MSG_H |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
25 | #define MSN_MSG_H |
| 4542 | 26 | |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
27 | typedef struct _MsnMessage MsnMessage; |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
28 | |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
29 | /* |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
30 | typedef enum |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
31 | { |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
32 | MSN_MSG_NORMAL, |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
33 | MSN_MSG_SLP_SB, |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
34 | MSN_MSG_SLP_DC |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
35 | } MsnMsgType; |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
36 | */ |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
37 | |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
38 | typedef enum |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
39 | { |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
40 | MSN_MSG_UNKNOWN, |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
41 | MSN_MSG_TEXT, |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
42 | MSN_MSG_TYPING, |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
43 | MSN_MSG_CAPS, |
|
11321
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
44 | MSN_MSG_SLP, |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
45 | MSN_MSG_NUDGE |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
46 | } MsnMsgType; |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
47 | |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
48 | typedef enum |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
49 | { |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
50 | MSN_MSG_ERROR_NONE, /**< No error. */ |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
51 | MSN_MSG_ERROR_TIMEOUT, /**< The message timedout. */ |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
52 | MSN_MSG_ERROR_NAK, /**< The message could not be sent. */ |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
53 | MSN_MSG_ERROR_SB, /**< The error comes from the switchboard. */ |
|
10451
2df35a139363
[gaim-migrate @ 11717]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10346
diff
changeset
|
54 | MSN_MSG_ERROR_UNKNOWN /**< An unknown error occurred. */ |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
55 | } MsnMsgErrorType; |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
56 | |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
57 | #include "command.h" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
58 | #include "session.h" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
59 | #include "transaction.h" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
60 | #include "user.h" |
|
30986
5e30592f85e5
Drop slp header and footer from MsnMessage in favor of MsnSlpMessage->header and footer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30971
diff
changeset
|
61 | #include "slpmsg.h" |
|
31002
126ef1c978a5
Add support for Parts in the MsnSlpMessages and MsnMessages structs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30989
diff
changeset
|
62 | #include "slpmsg_part.h" |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
63 | |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
64 | typedef void (*MsnMsgCb)(MsnMessage *, void *data); |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
65 | |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
66 | #define MSG_BODY_DEM "\r\n\r\n" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
67 | #define MSG_LINE_DEM "\r\n" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
68 | |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
69 | #define MSG_OIM_BODY_DEM "\n\n" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
70 | #define MSG_OIM_LINE_DEM "\n" |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
71 | |
| 4542 | 72 | /** |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
73 | * A message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
74 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
75 | struct _MsnMessage |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
76 | { |
|
5506
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
77 | size_t ref_count; /**< The reference count. */ |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
78 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
79 | MsnMsgType type; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
80 | |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
81 | gboolean msnslp_message; |
|
30986
5e30592f85e5
Drop slp header and footer from MsnMessage in favor of MsnSlpMessage->header and footer.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30971
diff
changeset
|
82 | MsnSlpMessage *slpmsg; |
|
31002
126ef1c978a5
Add support for Parts in the MsnSlpMessages and MsnMessages structs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30989
diff
changeset
|
83 | MsnSlpMessagePart *part; |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
84 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
85 | char *remote_user; |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
86 | char flag; |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
87 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
88 | char *content_type; |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
89 | char *charset; |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
90 | char *body; |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
91 | gsize body_len; |
|
25469
d3a7fa855992
Re-combine large (multi-part) messages on MSN since we seem to say that we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24420
diff
changeset
|
92 | guint total_chunks; /**< How many chunks in this multi-part message */ |
|
d3a7fa855992
Re-combine large (multi-part) messages on MSN since we seem to say that we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24420
diff
changeset
|
93 | guint received_chunks; /**< How many chunks we've received so far */ |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
94 | |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
95 | GHashTable *header_table; |
|
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
96 | GList *header_list; |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
97 | |
|
10346
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10345
diff
changeset
|
98 | gboolean ack_ref; /**< A flag that states if this message has |
|
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10345
diff
changeset
|
99 | been ref'ed for using it in a callback. */ |
|
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10345
diff
changeset
|
100 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
101 | MsnCommand *cmd; |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
102 | MsnTransaction *trans; |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
103 | |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
104 | MsnMsgCb ack_cb; /**< The callback to call when we receive an ACK of this |
|
10346
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10345
diff
changeset
|
105 | message. */ |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
106 | MsnMsgCb nak_cb; /**< The callback to call when we receive a NAK of this |
|
10346
9c65a007b4a5
[gaim-migrate @ 11560]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10345
diff
changeset
|
107 | message. */ |
|
10345
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
108 | void *ack_data; /**< The data used by callbacks. */ |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
109 | |
|
7d7f8cfa2b4f
[gaim-migrate @ 11556]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10225
diff
changeset
|
110 | MsnMsgErrorType error; /**< The error of the message. */ |
|
24420
e83317602b22
attempts to resend message on switchboard error once, tested by maually
Ka-Hing Cheung <khc@pidgin.im>
parents:
20597
diff
changeset
|
111 | |
|
e83317602b22
attempts to resend message on switchboard error once, tested by maually
Ka-Hing Cheung <khc@pidgin.im>
parents:
20597
diff
changeset
|
112 | guint32 retries; |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
113 | }; |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
114 | |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
115 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
116 | * Creates a new, empty message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
117 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
118 | * @return A new message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
119 | */ |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
120 | MsnMessage *msn_message_new(MsnMsgType type); |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
121 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
122 | /** |
|
6800
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
123 | * Creates a new, empty MSNSLP message. |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
124 | * |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
125 | * @return A new MSNSLP message. |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
126 | */ |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
127 | MsnMessage *msn_message_new_msnslp(void); |
|
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
128 | |
|
11321
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
129 | /** |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
130 | * Creates a new nudge message. |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
131 | * |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
132 | * @return A new nudge message. |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
133 | */ |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
134 | MsnMessage *msn_message_new_nudge(void); |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
135 | |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
136 | /** |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
137 | * Creates a new plain message. |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
138 | * |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
139 | * @return A new plain message. |
|
a93121c0ea16
[gaim-migrate @ 13525]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10451
diff
changeset
|
140 | */ |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
141 | MsnMessage *msn_message_new_plain(const char *message); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
142 | |
|
6800
8f99c220b503
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
143 | /** |
|
6868
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
144 | * Creates a MSNSLP ack message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
145 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
146 | * @param acked_msg The message to acknowledge. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
147 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
148 | * @return A new MSNSLP ack message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
149 | */ |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
150 | MsnMessage *msn_message_new_msnslp_ack(MsnMessage *acked_msg); |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
151 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
152 | /** |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
153 | * Creates a new message based off a command. |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
154 | * |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
155 | * @param session The MSN session. |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
156 | * @param cmd The command. |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
157 | * |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
158 | * @return The new message. |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
159 | */ |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
160 | MsnMessage *msn_message_new_from_cmd(MsnSession *session, MsnCommand *cmd); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
161 | |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
162 | /** |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
163 | * Parses the payload of a message. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
164 | * |
|
8646
74d0e7406e3b
[gaim-migrate @ 9398]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
165 | * @param msg The message. |
|
74d0e7406e3b
[gaim-migrate @ 9398]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
166 | * @param payload The payload. |
|
9158
f8dab42adeaf
[gaim-migrate @ 9942]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8646
diff
changeset
|
167 | * @param payload_len The length of the payload. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
168 | */ |
|
9158
f8dab42adeaf
[gaim-migrate @ 9942]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8646
diff
changeset
|
169 | void msn_message_parse_payload(MsnMessage *msg, const char *payload, |
| 13886 | 170 | size_t payload_len, |
| 171 | const char *line_dem,const char *body_dem); | |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
172 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
173 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
174 | * Destroys a message. |
|
6701
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
175 | * |
|
7e2db9273748
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5506
diff
changeset
|
176 | * @param msg The message to destroy. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
177 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
178 | void msn_message_destroy(MsnMessage *msg); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
179 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
180 | /** |
|
5506
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
181 | * Increments the reference count on a message. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
182 | * |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
183 | * @param msg The message. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
184 | * |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
185 | * @return @a msg |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
186 | */ |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
187 | MsnMessage *msn_message_ref(MsnMessage *msg); |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
188 | |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
189 | /** |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
190 | * Decrements the reference count on a message. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
191 | * |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
192 | * This will destroy the structure if the count hits 0. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
193 | * |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
194 | * @param msg The message. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
195 | * |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
196 | * @return @a msg, or @c NULL if the new count is 0. |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
197 | */ |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
198 | MsnMessage *msn_message_unref(MsnMessage *msg); |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
199 | |
|
b53a1acacefe
[gaim-migrate @ 5905]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
200 | /** |
|
8646
74d0e7406e3b
[gaim-migrate @ 9398]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
201 | * Generates the payload data of a message. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
202 | * |
|
6826
986589449e69
[gaim-migrate @ 7371]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
203 | * @param msg The message. |
|
8646
74d0e7406e3b
[gaim-migrate @ 9398]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
204 | * @param ret_size The returned size of the payload. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
205 | * |
|
8646
74d0e7406e3b
[gaim-migrate @ 9398]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8475
diff
changeset
|
206 | * @return The payload data of the message. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
207 | */ |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
208 | char *msn_message_gen_payload(MsnMessage *msg, size_t *ret_size); |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
209 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
210 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
211 | * Sets the flag for an outgoing message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
212 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
213 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
214 | * @param flag The flag. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
215 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
216 | void msn_message_set_flag(MsnMessage *msg, char flag); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
217 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
218 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
219 | * Returns the flag for an outgoing message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
220 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
221 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
222 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
223 | * @return The flag. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
224 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
225 | char msn_message_get_flag(const MsnMessage *msg); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
226 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
227 | /** |
|
6868
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
228 | * Sets the binary content of the message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
229 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
230 | * @param msg The message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
231 | * @param data The binary data. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
232 | * @param len The length of the data. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
233 | */ |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
234 | void msn_message_set_bin_data(MsnMessage *msg, const void *data, size_t len); |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
235 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
236 | /** |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
237 | * Returns the binary content of the message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
238 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
239 | * @param msg The message. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
240 | * @param len The returned length of the data. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
241 | * |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
242 | * @return The binary data. |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
243 | */ |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
244 | const void *msn_message_get_bin_data(const MsnMessage *msg, size_t *len); |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
245 | |
|
b9cc0730e11c
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6826
diff
changeset
|
246 | /** |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
247 | * Sets the content type in a message. |
| 4542 | 248 | * |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
249 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
250 | * @param type The content-type. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
251 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
252 | void msn_message_set_content_type(MsnMessage *msg, const char *type); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
253 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
254 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
255 | * Returns the content type in a message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
256 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
257 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
258 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
259 | * @return The content-type. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
260 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
261 | const char *msn_message_get_content_type(const MsnMessage *msg); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
262 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
263 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
264 | * Sets the charset in a message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
265 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
266 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
267 | * @param charset The charset. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
268 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
269 | void msn_message_set_charset(MsnMessage *msg, const char *charset); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
270 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
271 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
272 | * Returns the charset in a message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
273 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
274 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
275 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
276 | * @return The charset. |
| 4542 | 277 | */ |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
278 | const char *msn_message_get_charset(const MsnMessage *msg); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
279 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
280 | /** |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
281 | * Sets a header in a message. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
282 | * |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
283 | * @param msg The message. |
|
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
284 | * @param header The header name. |
|
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
285 | * @param value The header value. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
286 | */ |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
287 | void msn_message_set_header(MsnMessage *msg, const char *name, |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
288 | const char *value); |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
289 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
290 | /** |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
291 | * Returns the value of a header from a message. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
292 | * |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
293 | * @param msg The message. |
|
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
294 | * @param header The header value. |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
295 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
296 | * @return The value, or @c NULL if not found. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
297 | */ |
|
29457
15f977c9ac76
Rename "attribute" to "header" in a bunch of places. The SLP protocol
Mark Doliner <markdoliner@pidgin.im>
parents:
29305
diff
changeset
|
298 | const char *msn_message_get_header_value(const MsnMessage *msg, const char *name); |
|
5309
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
299 | |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
300 | /** |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
301 | * Parses the body and returns it in the form of a hashtable. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
302 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
303 | * @param msg The message. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
304 | * |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
305 | * @return The resulting hashtable. |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
306 | */ |
|
3178acad1449
[gaim-migrate @ 5681]
Christian Hammond <chipx86@chipx86.com>
parents:
4542
diff
changeset
|
307 | GHashTable *msn_message_get_hashtable_from_body(const MsnMessage *msg); |
| 4542 | 308 | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
309 | void msn_message_show_readable(MsnMessage *msg, const char *info, |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
310 | gboolean text_body); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
311 | |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
312 | char *msn_message_gen_slp_body(MsnMessage *msg, size_t *ret_size); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
313 | |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
314 | char *msn_message_to_string(MsnMessage *msg); |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
315 | |
|
25538
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
316 | void msn_plain_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
317 | |
|
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
318 | void msn_control_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
319 | |
|
31016
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
320 | /** |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
321 | * Processes peer to peer messages. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
322 | * |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
323 | * @param cmdproc The command processor. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
324 | * @param msg The message. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
325 | */ |
|
31014
3a5550f5ab47
Move MsnMessage callbacks to msn.c instead of polluting everywhere.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31002
diff
changeset
|
326 | void msn_p2p_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
3a5550f5ab47
Move MsnMessage callbacks to msn.c instead of polluting everywhere.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31002
diff
changeset
|
327 | |
|
31016
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
328 | /** |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
329 | * Processes emoticon messages. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
330 | * |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
331 | * @param cmdproc The command processor. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
332 | * @param msg The message. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
333 | */ |
|
31014
3a5550f5ab47
Move MsnMessage callbacks to msn.c instead of polluting everywhere.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31002
diff
changeset
|
334 | void msn_emoticon_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
3a5550f5ab47
Move MsnMessage callbacks to msn.c instead of polluting everywhere.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31002
diff
changeset
|
335 | |
|
25538
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
336 | void msn_datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
22182aef4300
Move some MSN message handlers from switchboard to general msg.c.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25469
diff
changeset
|
337 | |
|
31016
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
338 | /** |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
339 | * Processes INVITE messages. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
340 | * |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
341 | * @param cmdproc The command processor. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
342 | * @param msg The message. |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
343 | */ |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
344 | void msn_invite_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
5a62118fd77a
Move this function definitions where they belong.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
31014
diff
changeset
|
345 | |
|
27569
7f08e35e35ac
Add support for receiving handwritten (Ink) messages from MSN buddies.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25538
diff
changeset
|
346 | void msn_handwritten_msg(MsnCmdProc *cmdproc, MsnMessage *msg); |
|
7f08e35e35ac
Add support for receiving handwritten (Ink) messages from MSN buddies.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
25538
diff
changeset
|
347 | |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
27569
diff
changeset
|
348 | #endif /* MSN_MSG_H */ |