summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-29 10:59:01 -0400
committerKali Kaneko <kali@leap.se>2017-08-30 16:18:15 -0400
commitf7ec527e8034c0faabeda2766918ea25b3df686a (patch)
tree6c5c009c12bd4b96c9c3098eb9b6c737fb0d5fec /src
parentded1a7c7550320a9f321c80e56891bcc75fc2da1 (diff)
[refactor] mark the listener as implementer of IStateListener
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/vpn/process.py7
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)