diff options
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/vpn/process.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/bitmask/vpn/process.py b/src/leap/bitmask/vpn/process.py index 1ef54341..4a0bb5a2 100644 --- a/src/leap/bitmask/vpn/process.py +++ b/src/leap/bitmask/vpn/process.py @@ -30,9 +30,10 @@ from twisted.internet import protocol, reactor, defer from twisted.internet import error as internet_error from twisted.internet.endpoints import clientFromString, connectProtocol from twisted.logger import Logger +from zope.interface import implementer from leap.bitmask.vpn.utils import get_vpn_launcher -from leap.bitmask.vpn.management import ManagementProtocol +from leap.bitmask.vpn.management import ManagementProtocol, IStateListener from leap.bitmask.vpn.launchers import darwin from leap.bitmask.vpn.constants import IS_MAC, IS_LINUX @@ -42,8 +43,12 @@ from leap.common.events import catalog, emit_async OPENVPN_VERBOSITY = 4 +@implementer(IStateListener) class VPNStateListener(object): + # TODO we should move the state history to this class + # and make VPNProcess the implementer itself - or the service. + def change_state(self, state): emit_async(catalog.VPN_STATUS_CHANGED) |