Mercurial > pidgin.yaz
diff libpurple/request.h @ 16442:08db93bbd798
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 26 Apr 2007 12:25:49 +0000 |
parents | 32c366eeeb99 |
children | ec8a3ca95a13 |
line wrap: on
line diff
--- a/libpurple/request.h Thu Apr 26 10:49:27 2007 +0000 +++ b/libpurple/request.h Thu Apr 26 12:25:49 2007 +0000 @@ -187,28 +187,34 @@ gboolean multiline, gboolean masked, gchar *hint, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); void *(*request_choice)(const char *title, const char *primary, const char *secondary, unsigned int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, va_list choices); void *(*request_action)(const char *title, const char *primary, const char *secondary, unsigned int default_action, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions); void *(*request_fields)(const char *title, const char *primary, const char *secondary, PurpleRequestFields *fields, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); void *(*request_file)(const char *title, const char *filename, - gboolean savedialog, GCallback ok_cb, - GCallback cancel_cb, void *user_data); + gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, + void *user_data); void (*close_request)(PurpleRequestType type, void *ui_handle); void *(*request_folder)(const char *title, const char *dirname, - GCallback ok_cb, GCallback cancel_cb, - void *user_data); + GCallback ok_cb, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, + void *user_data); } PurpleRequestUiOps; typedef void (*PurpleRequestInputCb)(void *, const char *); @@ -1172,6 +1178,9 @@ * @param ok_cb The callback for the @c OK button. * @param cancel_text The text for the @c Cancel button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. @@ -1182,6 +1191,7 @@ gboolean multiline, gboolean masked, gchar *hint, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); /** @@ -1198,6 +1208,9 @@ * @param ok_cb The callback for the @c OK button. * @param cancel_text The text for the @c Cancel button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param ... The choices. This argument list should be * terminated with a NULL parameter. @@ -1209,6 +1222,7 @@ unsigned int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, ...); /** @@ -1225,6 +1239,9 @@ * @param ok_cb The callback for the @c OK button. * @param cancel_text The text for the @c Cancel button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param choices The choices. This argument list should be * terminated with a @c NULL parameter. @@ -1236,6 +1253,7 @@ unsigned int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, va_list choices); /** @@ -1250,6 +1268,9 @@ * @param primary The main point of the message. * @param secondary The secondary information. * @param default_action The default value. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param action_count The number of actions. * @param ... A list of actions. These are pairs of @@ -1265,6 +1286,7 @@ void *purple_request_action(void *handle, const char *title, const char *primary, const char *secondary, unsigned int default_action, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, ...); /** @@ -1279,6 +1301,9 @@ * @param primary The main point of the message. * @param secondary The secondary information. * @param default_action The default value. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * @param action_count The number of actions. * @param actions A list of actions and callbacks. @@ -1288,6 +1313,7 @@ void *purple_request_action_varg(void *handle, const char *title, const char *primary, const char *secondary, unsigned int default_action, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data, size_t action_count, va_list actions); @@ -1305,6 +1331,9 @@ * @param ok_cb The callback for the @c OK button. * @param cancel_text The text for the @c Cancel button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. @@ -1314,6 +1343,7 @@ PurpleRequestFields *fields, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); /** @@ -1335,28 +1365,30 @@ * A wrapper for purple_request_action() that uses @c Yes and @c No buttons. */ #define purple_request_yes_no(handle, title, primary, secondary, \ - default_action, user_data, yes_cb, no_cb) \ + default_action, account, who, conv, \ + user_data, yes_cb, no_cb) \ purple_request_action((handle), (title), (primary), (secondary), \ - (default_action), (user_data), 2, \ + (default_action), account, who, conv, (user_data), 2, \ _("_Yes"), (yes_cb), _("_No"), (no_cb)) /** * A wrapper for purple_request_action() that uses @c OK and @c Cancel buttons. */ #define purple_request_ok_cancel(handle, title, primary, secondary, \ - default_action, user_data, ok_cb, cancel_cb) \ + default_action, account, who, conv, \ + user_data, ok_cb, cancel_cb) \ purple_request_action((handle), (title), (primary), (secondary), \ - (default_action), (user_data), 2, \ + (default_action), account, who, conv, (user_data), 2, \ _("_OK"), (ok_cb), _("_Cancel"), (cancel_cb)) /** * A wrapper for purple_request_action() that uses Accept and Cancel buttons. */ #define purple_request_accept_cancel(handle, title, primary, secondary, \ - default_action, user_data, accept_cb, \ - cancel_cb) \ + default_action, account, who, conv, \ + user_data, accept_cb, cancel_cb) \ purple_request_action((handle), (title), (primary), (secondary), \ - (default_action), (user_data), 2, \ + (default_action), account, who, conv, (user_data), 2, \ _("_Accept"), (accept_cb), _("_Cancel"), (cancel_cb)) /** @@ -1372,6 +1404,9 @@ * False if it is being used to open a file. * @param ok_cb The callback for the @c OK button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. @@ -1379,6 +1414,7 @@ void *purple_request_file(void *handle, const char *title, const char *filename, gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); /** @@ -1392,12 +1428,16 @@ * @param dirname The default directory name (may be @c NULL) * @param ok_cb The callback for the @c OK button. * @param cancel_cb The callback for the @c Cancel button. + * @param account The PurpleAccount associated with this request, or NULL if none is + * @param who The username of the buddy assocaited with this request, or NULL if none is + * @param conv The PurpleConversation associated with this request, or NULL if none is * @param user_data The data to pass to the callback. * * @return A UI-specific handle. */ void *purple_request_folder(void *handle, const char *title, const char *dirname, GCallback ok_cb, GCallback cancel_cb, + PurpleAccount *account, const char *who, PurpleConversation *conv, void *user_data); /*@}*/