Added states for proxy registration
This commit is contained in:
parent
0dde661fee
commit
61d109d9d2
1 changed files with 14 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue