--- a/libpurple/prpl.h Fri Aug 23 11:32:53 2013 +0200 +++ b/libpurple/prpl.h Mon Aug 26 17:21:22 2013 +0200 @@ -628,6 +628,21 @@ void (*get_public_alias)(PurpleConnection *gc, PurpleGetPublicAliasSuccessCallback success_cb, PurpleGetPublicAliasFailureCallback failure_cb); + + /** + * Gets the maximum message size for the protocol. It may depend on + * connection-specific variables (like protocol version). + * + * This value is intended for plaintext message, the exact value may be + * lower because of: + * - used newlines (some protocols count them as more than one byte), + * - formatting, + * - used special characters. + * + * @param gc The connection to query, or NULL to get safe minimum. + * @return Maximum message size, or 0 if unspecified or infinite. + */ + gsize (*get_max_message_size)(PurpleConnection *gc); }; #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \