| 54 typedef GaimCmdRet (*GaimCmdFunc)(GaimConversation *, const gchar *cmd, |
54 typedef GaimCmdRet (*GaimCmdFunc)(GaimConversation *, const gchar *cmd, |
| 55 gchar **args, gchar **error, void *data); |
55 gchar **args, gchar **error, void *data); |
| 56 typedef guint GaimCmdId; |
56 typedef guint GaimCmdId; |
| 57 |
57 |
| 58 enum _GaimCmdPriority { |
58 enum _GaimCmdPriority { |
| 59 GAIM_CMD_P_VERY_LOW = -1000, |
59 GAIM_CMD_P_VERY_LOW = -1000, |
| 60 GAIM_CMD_P_LOW = 0, |
60 GAIM_CMD_P_LOW = 0, |
| 61 GAIM_CMD_P_DEFAULT = 1000, |
61 GAIM_CMD_P_DEFAULT = 1000, |
| 62 GAIM_CMD_P_PRPL = 2000, |
62 GAIM_CMD_P_PRPL = 2000, |
| 63 GAIM_CMD_P_PLUGIN = 3000, |
63 GAIM_CMD_P_PLUGIN = 3000, |
| 64 GAIM_CMD_P_ALIAS = 4000, |
64 GAIM_CMD_P_ALIAS = 4000, |
| 65 GAIM_CMD_P_HIGH = 5000, |
65 GAIM_CMD_P_HIGH = 5000, |
| 66 GAIM_CMD_P_VERYHIGH = 6000, |
66 GAIM_CMD_P_VERY_HIGH = 6000, |
| 67 }; |
67 }; |
| 68 |
68 |
| 69 enum _GaimCmdFlag { |
69 enum _GaimCmdFlag { |
| 70 GAIM_CMD_FLAG_IM = 0x01, |
70 GAIM_CMD_FLAG_IM = 0x01, |
| 71 GAIM_CMD_FLAG_CHAT = 0x02, |
71 GAIM_CMD_FLAG_CHAT = 0x02, |
| 109 * @param p This is the priority. Higher priority commands will be run first, and usually the |
109 * @param p This is the priority. Higher priority commands will be run first, and usually the |
| 110 * first command will stop any others from being called. |
110 * first command will stop any others from being called. |
| 111 * @param f These are the flags. You need to at least pass one of GAIM_CMD_FLAG_IM or |
111 * @param f These are the flags. You need to at least pass one of GAIM_CMD_FLAG_IM or |
| 112 * GAIM_CMD_FLAG_CHAT (can may pass both) in order for the command to ever actually |
112 * GAIM_CMD_FLAG_CHAT (can may pass both) in order for the command to ever actually |
| 113 * be called. |
113 * be called. |
| 114 * @param prpl_id This is the prpl's id string. This is only meaningful is the proper flag is set. |
114 * @param prpl_id This is the prpl's id string. This is only meaningful if the proper flag is set. |
| 115 * @param func This is the function to call when someone enters this command. |
115 * @param func This is the function to call when someone enters this command. |
| 116 * @param helpstr This is a whitespace sensitive, UTF-8, HTML string describing how to use the command. |
116 * @param helpstr This is a whitespace sensitive, UTF-8, HTML string describing how to use the command. |
| 117 * The preferred format of this string shall be the commands name, followed by a space |
117 * The preferred format of this string shall be the commands name, followed by a space |
| 118 * and any arguments it accpets (if it takes any arguments, otherwise no space), follow |
118 * and any arguments it accepts (if it takes any arguments, otherwise no space), followed |
| 119 * by a colon, two spaces, and a description of the command in sentence form. No slash |
119 * by a colon, two spaces, and a description of the command in sentence form. No slash |
| 120 * before the command name. |
120 * before the command name. |
| 121 * @param data User defined data to pass to the GaimCmdFunc |
121 * @param data User defined data to pass to the GaimCmdFunc |
| 122 * @return A GaimCmdId. This is only used for calling gaim_cmd_unregister. |
122 * @return A GaimCmdId. This is only used for calling gaim_cmd_unregister. |
| 123 * Returns 0 on failure. |
123 * Returns 0 on failure. |