TnySessionCamel and connecting issues and problems, a refactor is needed here



Refactoring TnySessionCamel's background_connect_thread.

I'm starting to realise that I'll need to refactor this piece of code to
be more fine grained on accounts being added to the session.

Right now based on the device's connection_changed signal will accounts
go online. Initial values of the device, however, are not respected
correctly.

Meaning that the device must signal a connection-changed signal once all
accounts are created. The TnyDevice and TnyAccountStore, however, are
not intended to be implemented that way, and I feel it's not the
responsibility of the application developer to 'get this right'.

Therefore I'm planning to fix this situation by checking each time an
account gets added to the session, whether it must go online or not. On
top of that I'll also check the connection-changed signal of TnyDevice
is the current fashion to see whether an actual change occurred.

Maybe will I let each account instance become a subscriber or the
TnyDevice's connection-changed signal, in stead of the entire session.

Thoughts, ideas?


-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]