Mercurial > pidgin
diff libpurple/connection.h @ 20067:143c6f34c6eb
Create purple_connection_reason_is_fatal, which is basically a replacement for
checking PurpleConnection.wants_to_die.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Mon, 17 Sep 2007 15:30:51 +0000 |
parents | 95b2b7a39585 |
children | d3bd5414eb0f |
line wrap: on
line diff
--- a/libpurple/connection.h Mon Sep 17 15:23:29 2007 +0000 +++ b/libpurple/connection.h Mon Sep 17 15:30:51 2007 +0000 @@ -372,6 +372,26 @@ PurpleDisconnectReason reason, const char *description); +/** + * Reports whether a disconnection reason is fatal (in which case the account + * should probably not be automatically reconnected) or transient (so + * auto-reconnection is a good idea. + * For instance, #PURPLE_REASON_NETWORK_ERROR is a temporary + * error, which might be caused by losing the network connection, so + * @a purple_connection_reason_is_fatal(PURPLE_REASON_NETWORK_ERROR) is + * @a FALSE. On the other hand, #PURPLE_REASON_AUTHENTICATION_FAILED probably + * indicates a misconfiguration of the account which needs the user to go fix + * it up, so @a + * purple_connection_reason_is_fatal(PURPLE_REASON_AUTHENTICATION_FAILED) + * is @a TRUE. + * + * (This function is meant to replace checking PurpleConnection.wants_to_die.) + * + * @return @a TRUE iff automatic reconnection is a bad idea. + */ +gboolean +purple_connection_reason_is_fatal (PurpleDisconnectReason reason); + /*@}*/ /**************************************************************************/