24 #ifndef _PURPLE_CMDS_H_ 25 #define _PURPLE_CMDS_H_ 37 PURPLE_CMD_STATUS_FAILED,
38 PURPLE_CMD_STATUS_NOT_FOUND,
39 PURPLE_CMD_STATUS_WRONG_ARGS,
40 PURPLE_CMD_STATUS_WRONG_PRPL,
41 PURPLE_CMD_STATUS_WRONG_TYPE
57 #define PURPLE_CMD_FUNC(func) ((PurpleCmdFunc)func) 64 gchar **args, gchar **error,
void *data);
71 typedef enum _PurpleCmdPriority {
72 PURPLE_CMD_P_VERY_LOW = -1000,
74 PURPLE_CMD_P_DEFAULT = 1000,
75 PURPLE_CMD_P_PRPL = 2000,
76 PURPLE_CMD_P_PLUGIN = 3000,
77 PURPLE_CMD_P_ALIAS = 4000,
78 PURPLE_CMD_P_HIGH = 5000,
79 PURPLE_CMD_P_VERY_HIGH = 6000
162 const gchar *prpl_id,
PurpleCmdFunc func,
const gchar *helpstr,
void *data);
194 const gchar *markup, gchar **errormsg);
void purple_cmds_init(void)
Initialize the commands subsystem.
The command failed, but stop looking.
enum _PurpleCmdRet PurpleCmdRet
Commands registered with the core return one of these values when run.
PurpleCmdStatus purple_cmd_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **errormsg)
Do a command.
PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args, PurpleCmdPriority p, PurpleCmdFlag f, const gchar *prpl_id, PurpleCmdFunc func, const gchar *helpstr, void *data)
Register a new command with the core.
guint PurpleCmdId
A unique integer representing a command registered with purple_cmd_register(), which can subsequently...
Command is usable only for a particular prpl.
_PurpleCmdRet
Commands registered with the core return one of these values when run.
Command is usable in IMs.
_PurpleCmdStatus
The possible results of running a command with purple_cmd_do_command().
void purple_cmd_unregister(PurpleCmdId id)
Unregister a command with the core.
GList * purple_cmd_help(PurpleConversation *conv, const gchar *cmd)
Get the help string for a command.
Command is usable in multi-user chats.
enum _PurpleCmdStatus PurpleCmdStatus
The possible results of running a command with purple_cmd_do_command().
Everything's okay; Don't look for another command to call.
enum _PurpleCmdFlag PurpleCmdFlag
Flags used to set various properties of commands.
Incorrect arguments to this command should be accepted anyway.
GList * purple_cmd_list(PurpleConversation *conv)
List registered commands.
gpointer purple_cmds_get_handle(void)
Get the handle for the commands API.
void purple_cmds_uninit(void)
Uninitialize the commands subsystem.
_PurpleCmdFlag
Flags used to set various properties of commands.
Continue, looking for other commands with the same name to call.
A core representation of a conversation between two or more people.
PurpleCmdRet(* PurpleCmdFunc)(PurpleConversation *, const gchar *cmd, gchar **args, gchar **error, void *data)
A function implementing a command, as passed to purple_cmd_register().