API exposing the network status?
@gdesmott
Submitted by Guillaume Desmottes Assigned to Telepathy bugs list
Description
Now that Empathy's connectivity code (NetworkManager, Conman) has been ported to MC, I'm trying to remove it from Empathy. I dropped the code changing our TP presence when connectivity is dropped but can't remove the whole code because it's still used in 2 places:
a) Empathy's presence chooser is unsensitived when network is offline b) Empathy account dialog display a specific message when accounts are offline because the network is down.
Code duplication isn't great and this could also lead to some weird case where MC and Empathy doesn't agree if the network is up or not (for whatever reasons). So maybe Empathy should get the connectivity info directly from MC so we'll be sure that it reflects the actual state of MC.
b) could be solved by adding a NetworkDown Connection_Status_Reason or something. Not sure for a), maybe a new interface of the AccountManager?