Mercurial > pidgin.yaz
comparison libpurple/cmds.h @ 32381:5876584828e8
Please correct me if I'm wrong, but I don't think we gain anything
from declaring _PurpleBlah versions of enums if we do a typedef
at the same time. I don't think it's necessary.
Fixes #4475
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Aug 2011 07:20:49 +0000 |
parents | d8452c0bec7b |
children | 02a2e8183b1d |
comparison
equal
deleted
inserted
replaced
32380:4f2d99bcb195 | 32381:5876584828e8 |
---|---|
30 /** @name Structures */ | 30 /** @name Structures */ |
31 /**************************************************************************/ | 31 /**************************************************************************/ |
32 /*@{*/ | 32 /*@{*/ |
33 | 33 |
34 /** The possible results of running a command with purple_cmd_do_command(). */ | 34 /** The possible results of running a command with purple_cmd_do_command(). */ |
35 typedef enum _PurpleCmdStatus { | 35 typedef enum { |
36 PURPLE_CMD_STATUS_OK, | 36 PURPLE_CMD_STATUS_OK, |
37 PURPLE_CMD_STATUS_FAILED, | 37 PURPLE_CMD_STATUS_FAILED, |
38 PURPLE_CMD_STATUS_NOT_FOUND, | 38 PURPLE_CMD_STATUS_NOT_FOUND, |
39 PURPLE_CMD_STATUS_WRONG_ARGS, | 39 PURPLE_CMD_STATUS_WRONG_ARGS, |
40 PURPLE_CMD_STATUS_WRONG_PRPL, | 40 PURPLE_CMD_STATUS_WRONG_PRPL, |
46 * unusual cases, you might want to have several functions called for a | 46 * unusual cases, you might want to have several functions called for a |
47 * particular command; in this case, they should return | 47 * particular command; in this case, they should return |
48 * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other | 48 * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other |
49 * commands with the same name. | 49 * commands with the same name. |
50 */ | 50 */ |
51 typedef enum _PurpleCmdRet { | 51 typedef enum { |
52 PURPLE_CMD_RET_OK, /**< Everything's okay; Don't look for another command to call. */ | 52 PURPLE_CMD_RET_OK, /**< Everything's okay; Don't look for another command to call. */ |
53 PURPLE_CMD_RET_FAILED, /**< The command failed, but stop looking.*/ | 53 PURPLE_CMD_RET_FAILED, /**< The command failed, but stop looking.*/ |
54 PURPLE_CMD_RET_CONTINUE /**< Continue, looking for other commands with the same name to call. */ | 54 PURPLE_CMD_RET_CONTINUE /**< Continue, looking for other commands with the same name to call. */ |
55 } PurpleCmdRet; | 55 } PurpleCmdRet; |
56 | 56 |
66 * purple_cmd_register(), which can subsequently be passed to | 66 * purple_cmd_register(), which can subsequently be passed to |
67 * purple_cmd_unregister() to unregister that command. | 67 * purple_cmd_unregister() to unregister that command. |
68 */ | 68 */ |
69 typedef guint PurpleCmdId; | 69 typedef guint PurpleCmdId; |
70 | 70 |
71 typedef enum _PurpleCmdPriority { | 71 typedef enum { |
72 PURPLE_CMD_P_VERY_LOW = -1000, | 72 PURPLE_CMD_P_VERY_LOW = -1000, |
73 PURPLE_CMD_P_LOW = 0, | 73 PURPLE_CMD_P_LOW = 0, |
74 PURPLE_CMD_P_DEFAULT = 1000, | 74 PURPLE_CMD_P_DEFAULT = 1000, |
75 PURPLE_CMD_P_PRPL = 2000, | 75 PURPLE_CMD_P_PRPL = 2000, |
76 PURPLE_CMD_P_PLUGIN = 3000, | 76 PURPLE_CMD_P_PLUGIN = 3000, |
83 * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in | 83 * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in |
84 * order to be even slighly useful. | 84 * order to be even slighly useful. |
85 * | 85 * |
86 * @see purple_cmd_register | 86 * @see purple_cmd_register |
87 */ | 87 */ |
88 typedef enum _PurpleCmdFlag { | 88 typedef enum { |
89 /** Command is usable in IMs. */ | 89 /** Command is usable in IMs. */ |
90 PURPLE_CMD_FLAG_IM = 0x01, | 90 PURPLE_CMD_FLAG_IM = 0x01, |
91 /** Command is usable in multi-user chats. */ | 91 /** Command is usable in multi-user chats. */ |
92 PURPLE_CMD_FLAG_CHAT = 0x02, | 92 PURPLE_CMD_FLAG_CHAT = 0x02, |
93 /** Command is usable only for a particular prpl. */ | 93 /** Command is usable only for a particular prpl. */ |