Mon, 13 Jul 2009 05:01:42 +0000
On MSN, pop up an "invite message" request similar to oscar, and send that
in the add request. We really should try and move this into the add buddy
dialog instead of an extra prompt.
Fixes #8503.
| 8810 | 1 | /** |
| 2 | * @file transaction.h MSN transaction 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 | */ |
| 24 | #ifndef _MSN_TRANSACTION_H | |
| 25 | #define _MSN_TRANSACTION_H | |
| 26 | ||
| 27 | typedef struct _MsnTransaction MsnTransaction; | |
| 28 | ||
| 29 | #include "command.h" | |
| 30 | #include "cmdproc.h" | |
| 31 | ||
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
32 | typedef void (*MsnTransCb)(MsnCmdProc *cmdproc, MsnCommand *cmd); |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
33 | typedef void (*MsnTimeoutCb)(MsnCmdProc *cmdproc, MsnTransaction *trans); |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
34 | typedef void (*MsnErrorCb)(MsnCmdProc *cmdproc, MsnTransaction *trans, |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
35 | int error); |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
36 | |
| 8810 | 37 | /** |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
38 | * A transaction. A sending command that will initiate the transaction. |
| 8810 | 39 | */ |
| 40 | struct _MsnTransaction | |
| 41 | { | |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
42 | MsnCmdProc *cmdproc; |
| 8810 | 43 | unsigned int trId; |
| 44 | ||
| 45 | char *command; | |
| 46 | char *params; | |
| 47 | ||
|
24031
f9c3efb8afa6
Fix up some types.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
23444
diff
changeset
|
48 | guint timer; |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
49 | |
|
10403
4647a87ef73b
[gaim-migrate @ 11648]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10284
diff
changeset
|
50 | void *data; /**< The data to be used on the different callbacks. */ |
| 8810 | 51 | GHashTable *callbacks; |
|
10284
257978b5df5b
[gaim-migrate @ 11454]
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
10225
diff
changeset
|
52 | gboolean has_custom_callbacks; |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
53 | MsnErrorCb error_cb; |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
54 | MsnTimeoutCb timeout_cb; |
| 8810 | 55 | |
| 56 | char *payload; | |
| 57 | size_t payload_len; | |
| 58 | ||
| 59 | GQueue *queue; | |
|
10403
4647a87ef73b
[gaim-migrate @ 11648]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10284
diff
changeset
|
60 | MsnCommand *pendent_cmd; /**< The command that is waiting for the result of |
|
4647a87ef73b
[gaim-migrate @ 11648]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
10284
diff
changeset
|
61 | this transaction. */ |
| 8810 | 62 | }; |
| 63 | ||
|
22670
2ad82dd45c56
Another patch from Maiku that improves the way we send mobile messages, this
Ka-Hing Cheung <khc@pidgin.im>
parents:
19859
diff
changeset
|
64 | MsnTransaction *msn_transaction_new(MsnCmdProc *cmdproc, const char *command, |
|
23444
cfa3325f53a0
Payload length is an int here, so treat it as such. Get's rid of this warning:
Mark Doliner <markdoliner@pidgin.im>
parents:
22670
diff
changeset
|
65 | const char *format, ...) G_GNUC_PRINTF(3, 4); |
| 8810 | 66 | void msn_transaction_destroy(MsnTransaction *trans); |
| 67 | ||
| 68 | char *msn_transaction_to_string(MsnTransaction *trans); | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
69 | void msn_transaction_queue_cmd(MsnTransaction *trans, MsnCommand *cmd); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
70 | void msn_transaction_unqueue_cmd(MsnTransaction *trans, MsnCmdProc *cmdproc); |
| 8810 | 71 | void msn_transaction_set_payload(MsnTransaction *trans, |
| 72 | const char *payload, int payload_len); | |
|
9193
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
73 | void msn_transaction_set_data(MsnTransaction *trans, void *data); |
|
6e76f1367896
[gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
8810
diff
changeset
|
74 | void msn_transaction_add_cb(MsnTransaction *trans, char *answer, |
|
10225
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
75 | MsnTransCb cb); |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
76 | void msn_transaction_set_error_cb(MsnTransaction *trans, MsnErrorCb cb); |
|
0dfea1bc8695
[gaim-migrate @ 11357]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
9198
diff
changeset
|
77 | void msn_transaction_set_timeout_cb(MsnTransaction *trans, MsnTimeoutCb cb); |
| 8810 | 78 | |
| 79 | #endif /* _MSN_TRANSACTION_H */ |