Mercurial > pidgin.yaz
annotate src/protocols/msn/cmdproc.h @ 9158:c30d81b4dd22
[gaim-migrate @ 9942]
Patch from Felipe Contreras to sync our MSN prpl with what's in his tree.
He says this may fix a couple bugs, but the important thing is the
restructuring of how MsnMessages work. Lots of style changes and other
stuff as well.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 01 Jun 2004 06:42:20 +0000 |
parents | a7affa2e2986 |
children | 502707ca1836 |
rev | line source |
---|---|
8810 | 1 /** |
2 * @file cmdproc.h MSN command processor functions | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org> | |
7 * | |
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_CMDPROC_H_ | |
23 #define _MSN_CMDPROC_H_ | |
24 | |
25 typedef struct _MsnCmdProc MsnCmdProc; | |
26 | |
27 #include "session.h" | |
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
28 #include "servconn.h" |
8810 | 29 #include "error.h" |
30 #include "command.h" | |
31 #include "table.h" | |
32 #include "history.h" | |
33 #include "msg.h" | |
34 | |
35 typedef void (*MsnPayloadCb)(MsnCmdProc *cmdproc, char *payload, | |
36 size_t len); | |
37 | |
38 struct _MsnCmdProc | |
39 { | |
40 MsnSession *session; | |
41 MsnServConn *servconn; | |
42 | |
43 GQueue *txqueue; | |
44 | |
45 gboolean ready; | |
46 MsnErrorType error; | |
47 | |
48 MsnCommand *last_cmd; | |
49 char *last_trans; | |
50 | |
51 MsnTable *cbs_table; | |
52 MsnPayloadCb payload_cb; | |
53 | |
54 MsnHistory *history; | |
55 | |
56 GSList *msg_queue; | |
57 | |
58 char *temp; | |
59 }; | |
60 | |
61 MsnCmdProc *msn_cmdproc_new(MsnSession *session); | |
62 void msn_cmdproc_destroy(MsnCmdProc *cmdproc); | |
63 | |
64 void msn_cmdproc_process_queue(MsnCmdProc *cmdproc); | |
65 | |
66 void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans); | |
67 void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc, | |
68 MsnTransaction *trans); | |
69 void msn_cmdproc_send(MsnCmdProc *cmdproc, const char *command, | |
70 const char *format, ...); | |
71 void msn_cmdproc_send_quick(MsnCmdProc *cmdproc, const char *command, | |
9158
c30d81b4dd22
[gaim-migrate @ 9942]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
72 const char *format, ...); |
8810 | 73 void msn_cmdproc_process_msg(MsnCmdProc *cmdproc, |
74 MsnMessage *msg); | |
75 void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command); | |
76 void msn_cmdproc_process_payload(MsnCmdProc *cmdproc, | |
77 char *payload, int payload_len); | |
78 | |
79 void msn_cmdproc_queue_message(MsnCmdProc *cmdproc, const char *command, | |
80 MsnMessage *msg); | |
81 | |
82 void msn_cmdproc_unqueue_message(MsnCmdProc *cmdproc, MsnMessage *msg); | |
83 | |
84 #endif /* _MSN_CMDPROC_H_ */ |