From 248a4c9b6b96a759f335ee0c1a227292fe4494e4 Mon Sep 17 00:00:00 2001 From: Alexandre Savard Date: Mon, 11 May 2009 10:34:05 -0400 Subject: [PATCH] Add codec debug tests in pysflphone --- tools/pysflphone/pysflphone_testdbus.py | 14 ++++++++++---- tools/pysflphone/sflphonectrlsimple.py | 13 +++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/tools/pysflphone/pysflphone_testdbus.py b/tools/pysflphone/pysflphone_testdbus.py index f47cd9dfa..7ef75d729 100644 --- a/tools/pysflphone/pysflphone_testdbus.py +++ b/tools/pysflphone/pysflphone_testdbus.py @@ -7,26 +7,32 @@ class SflPhoneTests(SflPhoneCtrlSimple): def test_get_allaccounts_methods(self): - print "getAllAccounts()" + print "--- getAllAccounts() ---" for account in self.getAllAccounts(): print " " + account print "\n" - print "getAllRegisteredAccounts()" + print "--- getAllRegisteredAccounts() ---" for account in self.getAllRegisteredAccounts(): print " " + account print "\n" - print "getAllSipAccounts()" + print "--- getAllSipAccounts() ---" for account in self.getAllSipAccounts(): print " " + account print "\n" - print "getAllIaxAccounts()" + print "--- getAllIaxAccounts() ---" for account in self.getAllIaxAccounts(): print " " + account print "\n" + def test_codecs_methods + + print "--- getCodecList() ---" + for codec int self.getCodecList(): + print " " + codec + print "\n" sfl = SflPhoneTests() diff --git a/tools/pysflphone/sflphonectrlsimple.py b/tools/pysflphone/sflphonectrlsimple.py index a30270f2d..377f57a02 100755 --- a/tools/pysflphone/sflphonectrlsimple.py +++ b/tools/pysflphone/sflphonectrlsimple.py @@ -342,6 +342,19 @@ class SflPhoneCtrlSimple(object): except SflPhoneError, e: print e + # + # Codec manager + # + + def getCodecList(self): + """ Return the codec list """ + return self.configurationmanager.getCodecList() + + def getActiveCodecList(self): + """ Return the active codec list """ + return self.configurationmanager.getActiveCodecList() + + # # Call management