Mercurial > pidgin
annotate src/protocols/msn/transaction.h @ 9193:502707ca1836
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 02:39:08 +0000 |
parents | a7affa2e2986 |
children | ab6636c5a136 |
rev | line source |
---|---|
8810 | 1 /** |
2 * @file transaction.h MSN transaction 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_TRANSACTION_H | |
23 #define _MSN_TRANSACTION_H | |
24 | |
25 typedef struct _MsnTransaction MsnTransaction; | |
26 | |
27 #include "command.h" | |
28 #include "cmdproc.h" | |
29 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
30 typedef void (*MsnTransCb)(MsnCmdProc *cmdproc, MsnCommand *cmd); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
31 |
8810 | 32 /** |
33 * A transaction. A command that will initiate the transaction. | |
34 */ | |
35 struct _MsnTransaction | |
36 { | |
37 unsigned int trId; | |
38 | |
39 char *command; | |
40 char *params; | |
41 | |
42 GHashTable *callbacks; | |
43 void *data; | |
44 | |
45 char *payload; | |
46 size_t payload_len; | |
47 | |
48 GQueue *queue; | |
49 MsnCommand *pendent_cmd; | |
50 }; | |
51 | |
52 MsnTransaction *msn_transaction_new(const char *command, | |
53 const char *format, ...); | |
54 void msn_transaction_destroy(MsnTransaction *trans); | |
55 | |
56 char *msn_transaction_to_string(MsnTransaction *trans); | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
57 void msn_transaction_queue_cmd(MsnTransaction *trans, MsnCommand *cmd); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
58 void msn_transaction_unqueue_cmd(MsnTransaction *trans, MsnCmdProc *cmdproc); |
8810 | 59 void msn_transaction_set_payload(MsnTransaction *trans, |
60 const char *payload, int payload_len); | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
61 void msn_transaction_set_data(MsnTransaction *trans, void *data); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
62 void msn_transaction_add_cb(MsnTransaction *trans, char *answer, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8810
diff
changeset
|
63 MsnTransCb cb, void *data); |
8810 | 64 |
65 #endif /* _MSN_TRANSACTION_H */ |