|
|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|