Mercurial > pidgin
diff src/cmds.h @ 9597:d6f398e80b32
[gaim-migrate @ 10440]
denyri added a void *data argument to most of the command related
functions. This makes it easier for language binding and such.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Mon, 26 Jul 2004 03:27:03 +0000 |
parents | 5f6ba17ef9f5 |
children | db62420a53a2 |
line wrap: on
line diff
--- a/src/cmds.h Sun Jul 25 22:47:11 2004 +0000 +++ b/src/cmds.h Mon Jul 26 03:27:03 2004 +0000 @@ -50,7 +50,10 @@ GAIM_CMD_RET_CONTINUE, /**< Continue, looking for other commands with the same name to call. */ }; -typedef GaimCmdRet (*GaimCmdFunc)(GaimConversation *, const gchar *cmd, gchar **args, gchar **error); +#define GAIM_CMD_FUNC(func) ((GaimCmdFunc)func) + +typedef GaimCmdRet (*GaimCmdFunc)(GaimConversation *, const gchar *cmd, + gchar **args, gchar **error, void *data); typedef guint GaimCmdId; enum _GaimCmdPriority { @@ -120,7 +123,7 @@ * Returns @c NULL on failure. */ GaimCmdId gaim_cmd_register(const gchar *cmd, const gchar *args, GaimCmdPriority p, GaimCmdFlag f, - const gchar *prpl_id, GaimCmdFunc func, const gchar *helpstr); + const gchar *prpl_id, GaimCmdFunc func, const gchar *helpstr, void *data); /** * Unregister a command with the core. @@ -142,8 +145,8 @@ * @param conv The conversation the command was typed in. * @param cmdline The command the user typed (including all arguments) as a single string. * The caller doesn't have to do any parsing, except removing the command - * prefix, which the core has no knowledge of. cmd should not contain the - * any formatting, and should be in plain text (no html entities). + * prefix, which the core has no knowledge of. cmd should not contain any + * formatting, and should be in plain text (no html entities). * @param markup This is the same as cmd, but is the formatted version. It should be in * HTML, with < > and &, at least, escaped to html entities, and should * include both the default formatting and any extra manual formatting.