Change the way accounts connect while keeping backwards compatibility

Review Request #1967 — Created Oct. 26, 2022 and submitted — Latest diff uploaded

Information

pidgin/pidgin
default

Reviewers

This adds a new method to PurpleProtocol named create_connection which allows
a protocol to return a subclassed PurpleConnection so it can avoid using
purple_connection_[gs]et_protocol_data. The default implementation for this
method, just creates a PurpleConnection with the given protocol, account,
and password.

This also adds two new methods to PurpleConnection; connect and
disconnect. The default implementation for these two just call
purple_protocol_login and purple_protocol_close respectively.

The long term intent of this, is to have all protocol plugins subclass
PurpleConnection and then remove the login and close methods from
PurpleProtocol and also remove purple_connection_[gs]et_protocol_data.

Connected the demo account and used the account actions to test reconnecting.
Connected an XMPP account after running and at startup.
Verified that the infinite loop bug on error due to connection failure is now fixed as well.

Commits

Files