comparison libpurple/prpl.h @ 23110:bb41bdce8981

Patch from Jaywalker to let prpls add some helpful text for some account fields. This includes the update from rekkanoryo that was reverted earlier. References #2295.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 05 May 2008 06:55:00 +0000
parents 718a9c287839
children d53f72735830
comparison
equal deleted inserted replaced
23109:718a9c287839 23110:bb41bdce8981
416 * prpl->new_function(...); 416 * prpl->new_function(...);
417 * 417 *
418 * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member 418 * The PURPLE_PROTOCOL_PLUGIN_HAS_FUNC macro can be used for the older member
419 * functions (e.g. login, send_im etc.) too. 419 * functions (e.g. login, send_im etc.) too.
420 */ 420 */
421
422 /** This allows protocols to specify additional strings to be used for
423 * various purposes. The idea is to stuff a bunch of strings in this hash
424 * table instead of expanding the struct for every addition. This hash
425 * table is allocated every call and MUST be unrefed by the caller.
426 *
427 * @param account The account to specify. This can be NULL.
428 * @return The protocol's string hash table. The hash table should be
429 * destroyed by the caller when it's no longer needed.
430 */
431 GHashTable *(*get_account_text_table)(PurpleAccount *account);
421 }; 432 };
422 433
423 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ 434 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \
424 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \ 435 (((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < G_STRUCT_OFFSET(PurplePluginProtocolInfo, struct_size)) \
425 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \ 436 || (G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size)) && \