removed @property functions
This commit is contained in:
parent
937ac41eac
commit
c21b6f9e96
2 changed files with 9 additions and 37 deletions
|
@ -22,10 +22,9 @@ class ConfigurationReader(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__cp = ConfigParser.ConfigParser(defaults=ConfigurationReader.DEFAULTS)
|
self.__cp = ConfigParser.ConfigParser(defaults=ConfigurationReader.DEFAULTS)
|
||||||
self.__pinconfig = None
|
self.pinconfig = None
|
||||||
self.__dialconfig = None
|
self.dialconfig = None
|
||||||
self.__proxyconfigs = None
|
self.phoneconfig = None
|
||||||
self.__phoneconfig = None
|
|
||||||
|
|
||||||
|
|
||||||
def __get_global_val(self, option):
|
def __get_global_val(self, option):
|
||||||
|
@ -69,7 +68,7 @@ class ConfigurationReader(object):
|
||||||
self.__cp.read(f)
|
self.__cp.read(f)
|
||||||
|
|
||||||
print 'pin_nsa:', self.__get_global_val_int('pin_nsa'),
|
print 'pin_nsa:', self.__get_global_val_int('pin_nsa'),
|
||||||
self.__pinconfig = apparatinterface.FeApPinConfiguration(
|
self.pinconfig = apparatinterface.FeApPinConfiguration(
|
||||||
gpio_numbering = self.__get_global_val('gpio_numbering'),
|
gpio_numbering = self.__get_global_val('gpio_numbering'),
|
||||||
pin_nsa = self.__get_global_val_int('pin_nsa'),
|
pin_nsa = self.__get_global_val_int('pin_nsa'),
|
||||||
pin_nsi = self.__get_global_val_int('pin_nsi'),
|
pin_nsi = self.__get_global_val_int('pin_nsi'),
|
||||||
|
@ -81,7 +80,7 @@ class ConfigurationReader(object):
|
||||||
invert_gs = self.__get_global_val_bool('invert_gs'),
|
invert_gs = self.__get_global_val_bool('invert_gs'),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.__dialconfig = statemachine.DialConfiguration(
|
self.dialconfig = statemachine.DialConfiguration(
|
||||||
self.__get_global_val_int('dial_timeout'),
|
self.__get_global_val_int('dial_timeout'),
|
||||||
self.__read_shortcuts(),
|
self.__read_shortcuts(),
|
||||||
self.__read_blacklist(),
|
self.__read_blacklist(),
|
||||||
|
@ -102,7 +101,7 @@ class ConfigurationReader(object):
|
||||||
)
|
)
|
||||||
proxyconfigs.append(proxyconfig)
|
proxyconfigs.append(proxyconfig)
|
||||||
|
|
||||||
self.__phoneconfig = phoneinterface.PhoneConfiguration(
|
self.phoneconfig = phoneinterface.PhoneConfiguration(
|
||||||
sound_device = self.__get_global_val('sound_device'),
|
sound_device = self.__get_global_val('sound_device'),
|
||||||
incoming_timeout = self.__get_global_val_int('incoming_timeout'),
|
incoming_timeout = self.__get_global_val_int('incoming_timeout'),
|
||||||
linphone_config = self.__get_global_val('linphone_config'),
|
linphone_config = self.__get_global_val('linphone_config'),
|
||||||
|
@ -111,18 +110,3 @@ class ConfigurationReader(object):
|
||||||
proxies = proxyconfigs
|
proxies = proxyconfigs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@property
|
|
||||||
def pinconfig(self):
|
|
||||||
return self.__pinconfig
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
|
||||||
def dialconfig(self):
|
|
||||||
return self.__dialconfig
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
|
||||||
def phoneconfig(self):
|
|
||||||
return self.__phoneconfig
|
|
||||||
|
|
||||||
|
|
|
@ -259,9 +259,9 @@ class DialingState(BaseState):
|
||||||
|
|
||||||
class StateMachineController(object):
|
class StateMachineController(object):
|
||||||
def __init__(self, phone, feap, dialconfig):
|
def __init__(self, phone, feap, dialconfig):
|
||||||
self.__phone = phone
|
self.phone = phone
|
||||||
self.__feap = feap
|
self.feap = feap
|
||||||
self.__dialconfig = dialconfig
|
self.dialconfig = dialconfig
|
||||||
|
|
||||||
self.__state = InitState(self)
|
self.__state = InitState(self)
|
||||||
|
|
||||||
|
@ -308,18 +308,6 @@ class StateMachineController(object):
|
||||||
self.__timeout.cancel()
|
self.__timeout.cancel()
|
||||||
self.__timeout = None
|
self.__timeout = None
|
||||||
|
|
||||||
@property
|
|
||||||
def phone(self):
|
|
||||||
return self.__phone
|
|
||||||
|
|
||||||
@property
|
|
||||||
def feap(self):
|
|
||||||
return self.__feap
|
|
||||||
|
|
||||||
@property
|
|
||||||
def dialconfig(self):
|
|
||||||
return self.__dialconfig
|
|
||||||
|
|
||||||
def stop(self, hard=False):
|
def stop(self, hard=False):
|
||||||
if hard:
|
if hard:
|
||||||
self.__running = False
|
self.__running = False
|
||||||
|
|
Loading…
Reference in a new issue