Change the way accounts connect while keeping backwards compatibility
Review Request #1967 — Created Oct. 26, 2022 and submitted — Latest diff uploaded
This adds a new method to
PurpleProtocol
namedcreate_connection
which allows
a protocol to return a subclassedPurpleConnection
so it can avoid using
purple_connection_[gs]et_protocol_data
. The default implementation for this
method, just creates aPurpleConnection
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
andpurple_protocol_close
respectively.The long term intent of this, is to have all protocol plugins subclass
PurpleConnection
and then remove thelogin
andclose
methods from
PurpleProtocol
and also removepurple_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.