annotate src/protocols/msn/command.h @ 8830:f8038b1f7449

[gaim-migrate @ 9594] Patch by Daniel Atallah to prevent passing NULL to a vsprintf, which was causing gaim to exit (but not crash, for some reason). committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 27 Apr 2004 02:33:29 +0000
parents a7affa2e2986
children 502707ca1836
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8810
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file command.h MSN command functions
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 *
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 * gaim
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 *
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org>
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 *
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * (at your option) any later version.
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 *
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * GNU General Public License for more details.
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 *
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 #ifndef _MSN_COMMAND_H
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #define _MSN_COMMAND_H
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 typedef struct _MsnCommand MsnCommand;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 #include "cmdproc.h"
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #include "transaction.h"
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 /* typedef void (*MsnPayloadCb)(MsnCmdProc *cmdproc, MsnCommand *cmd, char
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 * *payload, size_t len); */
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 /**
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 * A received command.
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 */
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 struct _MsnCommand
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 {
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 unsigned int trId;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 char *command;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 char **params;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 int param_count;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 int ref_count;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 MsnTransaction *trans;
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 /* MsnPayloadCb payload_cb; */
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
48 };
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50 MsnCommand *msn_command_from_string(const char *string);
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
51 void msn_command_destroy(MsnCommand *cmd);
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 MsnCommand *msn_command_ref(MsnCommand *cmd);
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 MsnCommand *msn_command_unref(MsnCommand *cmd);
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54
a7affa2e2986 [gaim-migrate @ 9572]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
55 #endif /* _MSN_COMMAND_H */