Fri, 11 Apr 2014 20:08:22 +0200
imgstore: unref msn
| 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" |
|
202cb72ed5b0
Minor header file cleanup. Mostly I wanted to move some enums above some #includes
Mark Doliner <markdoliner@pidgin.im>
parents:
28354
diff
changeset
|
30 | #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
|
31 | #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
|
32 | #include "session.h" |
| 8810 | 33 | #include "table.h" |
| 34 | ||
| 35 | struct _MsnCmdProc | |
| 36 | { | |
| 37 | MsnSession *session; | |
| 38 | MsnServConn *servconn; | |
| 39 | ||
| 40 | GQueue *txqueue; | |
| 41 | ||
| 42 | MsnCommand *last_cmd; | |
|
9198
e8eb6d5eb9eb
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
43 | |
| 8810 | 44 | MsnTable *cbs_table; |
| 45 | ||
| 46 | MsnHistory *history; | |
|
10463
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
47 | |
|
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
|
48 | 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
|
49 | |
|
10463
f2f97738b401
[gaim-migrate @ 11737]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
50 | void *data; /**< Extra data, like the switchboard. */ |
| 8810 | 51 | }; |
| 52 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
53 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
54 | * Creates a MsnCmdProc structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
55 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
56 | * @param session The session to associate with. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
57 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
58 | * @return A new MsnCmdProc structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
59 | */ |
| 8810 | 60 | MsnCmdProc *msn_cmdproc_new(MsnSession *session); |
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
61 | |
|
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 | * Destroys an MsnCmdProc. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
64 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
65 | * @param cmdproc The object structure. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
66 | */ |
| 8810 | 67 | void msn_cmdproc_destroy(MsnCmdProc *cmdproc); |
| 68 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
69 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
70 | * Process the queued transactions. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
71 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
72 | * @param cmdproc The MsnCmdProc. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
73 | */ |
| 8810 | 74 | void msn_cmdproc_process_queue(MsnCmdProc *cmdproc); |
| 75 | ||
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
76 | /** |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
77 | * Sends transaction using this servconn. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
78 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
79 | * @param cmdproc The MsnCmdProc to be used. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
80 | * @param trans The MsnTransaction to be sent. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
81 | */ |
|
32008
56d1c64759d6
Fix a crash when the account is disconnected and we have requested a SB. (Hanzz, ported by shlomif)(Fixes #12431)
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
30956
diff
changeset
|
82 | gboolean 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
|
83 | |
|
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 | * 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
|
86 | * |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
87 | * @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
|
88 | * @param trans The MsnTransaction to be queued. |
|
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
89 | */ |
| 8810 | 90 | void msn_cmdproc_queue_trans(MsnCmdProc *cmdproc, |
| 91 | MsnTransaction *trans); | |
|
30906
957af130d083
msn: Improve cmdproc.h docs.
Jorge Villaseñor <masca@cpw.pidgin.im>
parents:
29305
diff
changeset
|
92 | |
| 8810 | 93 | void msn_cmdproc_process_msg(MsnCmdProc *cmdproc, |
| 94 | MsnMessage *msg); | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9158
diff
changeset
|
95 | void msn_cmdproc_process_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd); |
| 8810 | 96 | void msn_cmdproc_process_cmd_text(MsnCmdProc *cmdproc, const char *command); |
| 97 | void msn_cmdproc_process_payload(MsnCmdProc *cmdproc, | |
| 98 | char *payload, int payload_len); | |
| 99 | ||
|
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
|
100 | #endif /* MSN_CMDPROC_H */ |