Wed, 26 May 2010 20:01:05 +0000
propagate from branch 'im.pidgin.cpw.qulogic.msnp16' (head 6b703b827c8c834fa6b785d9e2d2fa2b34849c09)
to branch 'im.pidgin.soc.2010.msn-tlc' (head f3f4e9b1b6ccbd6ab82dfbd0a4a7d1dec8c5bd9c)
| 8810 | 1 | /** |
| 2 | * @file cmdproc.h MSN command processor functions | |
| 3 | * | |
| 15884 | 4 | * purple |
| 8810 | 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. |
| 8810 | 9 | * |
| 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 |
| 8810 | 23 | */ |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
24 | #ifndef MSN_CMDPROC_H |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
25 | #define MSN_CMDPROC_H |
| 8810 | 26 | |
| 27 | typedef struct _MsnCmdProc MsnCmdProc; | |
| 28 | ||
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
29 | #include "command.h" |
| 8810 | 30 | #include "error.h" |
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
31 | #include "history.h" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
32 | #include "servconn.h" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
33 | #include "session.h" |
| 8810 | 34 | #include "table.h" |
| 35 | ||
| 36 | struct _MsnCmdProc | |
| 37 | { | |
| 38 | MsnSession *session; | |
| 39 | MsnServConn *servconn; | |
| 40 | ||
| 41 | GQueue *txqueue; | |
| 42 | ||
| 43 | MsnCommand *last_cmd; | |
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
44 | |
| 8810 | 45 | MsnTable *cbs_table; |
| 46 | ||
| 47 | MsnHistory *history; | |
|
10463
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
48 | |
|
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:
19859
diff
changeset
|
49 | GHashTable *multiparts; /**< Multi-part message ID's */ |
|
d3a7fa855992
Re-combine large (multi-part) messages on MSN since we seem to say that we
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
19859
diff
changeset
|
50 | |
|
10463
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
51 | void *data; /**< Extra data, like the switchboard. */ |
| 8810 | 52 | }; |
| 53 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
54 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
55 | * Creates a MsnCmdProc structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
56 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
57 | * @param session The session to associate with. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
58 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
59 | * @return A new MsnCmdProc structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
60 | */ |
| 8810 | 61 | MsnCmdProc *msn_cmdproc_new(MsnSession *session); |
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
62 | |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
63 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
64 | * Destroys an MsnCmdProc. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
65 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
66 | * @param cmdproc The object structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
67 | */ |
| 8810 | 68 | void msn_cmdproc_destroy(MsnCmdProc *cmdproc); |
| 69 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
70 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
71 | * Process the queued transactions. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
72 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
73 | * @param cmdproc The MsnCmdProc. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
74 | */ |
| 8810 | 75 | void msn_cmdproc_process_queue(MsnCmdProc *cmdproc); |
| 76 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
77 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
78 | * Sends transaction using this servconn. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
79 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
80 | * @param cmdproc The MsnCmdProc to be used. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
81 | * @param trans The MsnTransaction to be sent. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
82 | */ |
| 8810 | 83 | void msn_cmdproc_send_trans(MsnCmdProc *cmdproc, MsnTransaction *trans); |
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
84 | |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
85 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
86 | * Add a transaction to the queue to be processed latter. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
87 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
88 | * @param cmdproc The MsnCmdProc in which the transaction will be queued. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
89 | * @param trans The MsnTransaction to be queued. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
90 | */ |
| 8810 | 91 | void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc, |
| 92 | MsnTransaction *trans); | |
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
93 | |
| 8810 | 94 | void msn_cmdproc_process_msg(MsnCmdProc *cmdproc, |
| 95 | MsnMessage *msg); | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
96 | void msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd); |
| 8810 | 97 | void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command); |
| 98 | void msn_cmdproc_process_payload(MsnCmdProc *cmdproc, | |
| 99 | char *payload, int payload_len); | |
| 100 | ||
|
29305
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
101 | #endif /* MSN_CMDPROC_H */ |