From 61d109d9d28505017f6020449e66aa54ee3d111e Mon Sep 17 00:00:00 2001 From: klonfish Date: Mon, 18 May 2015 14:42:54 +0200 Subject: [PATCH] Added states for proxy registration --- statemachinetest.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/statemachinetest.py b/statemachinetest.py index f1e36e8..c171887 100644 --- a/statemachinetest.py +++ b/statemachinetest.py @@ -9,6 +9,12 @@ class AbstractState(object): def __init__(self, controller): pass + def on_registration_in_progress(self): + raise IllegalEventError() + + def on_registration_successful(self): + raise IllegalEventError() + def on_gabelschalter_up(self): raise IllegalEventError() @@ -33,7 +39,15 @@ class AbstractState(object): def on_timeout(self): raise IllegalEventError() +class InitState(AbstractState): + def on_registration_in_progress(self): + print('registration in progress') + return ConnectingState +class ConnectingState(AbstractState): + def on_registration_successful(self): + print('registration successfull') + return IdleState class IdleState(AbstractState): def on_incoming_call(self):